Linux operating system experiment
2021SC@SDUSC
Project environment:
Raspberry pie 4bUbuntu Desktop 21.04
Process control:
1. Create process:
In Linux system, the parent process creates a new running child process by calling the fork function.
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
The fork function has the following features:
The chi ...
Posted by php_wiz_kid on Sun, 10 Oct 2021 17:10:33 +0200
[C + + beginner level] Introduction to C + + Chapter 1 (namespace, input & output, default parameters, function overloading, etc.)
(1) Foreword
C + + is the inheritance of C language and is compatible with most C syntax. Some syntax is added on the basis of C + + in order to solve the problems that C language can't do and the modifications are not good enough
What is C++
C language is a structured and modular language, which is suitable for dealing with smal ...
Posted by ywickham on Sun, 10 Oct 2021 15:17:16 +0200
In depth C language 2 - Advanced pointer
Welcome back to continue learning C language. After the data storage section, we come to the most important content in C language, pointer. Pointer can be said that in the eyes of beginners of C language or C + +, we are old friends who can't see their heads up. The data structure pointer of C language version is also the protagonist, Therefore ...
Posted by timcclayton on Sun, 10 Oct 2021 07:19:04 +0200
Fundamentals of cuda Programming
Chapter I
Purpose: accelerate 3D imaging, computational fluid dynamics, molecular simulation, etc. most of these application scenarios require a lot of scientific computing. The powerful parallel computing ability of GPU enables it to complete these super large number of computing tasks, shorten the computing time and reduce the computing ...
Posted by spicey on Sat, 09 Oct 2021 14:12:17 +0200
Detailed explanation of C&Golang function call process
The previous article talked about the call instruction calling the sum function in main.
At this time, the CPU jumps to sum and starts to execute the following commands:
0x0000000000400526 <+0>:push %rbp 0x0000000000400527 <+1>:mov %rsp,%rbp 0x000000000040052a <+4>:mov %edi,-0x14(%rbp) 0x000000000040052d < ...
Posted by anf.etienne on Sat, 09 Oct 2021 08:03:08 +0200
On select function (C language)
1. Introduction
Select is still important in Socket programming, but for beginners of Socket, they don't like to write programs with select. They are just used to writing blocking programs such as connect, accept, recv or recvfrom (the so-called blocking method block, as the name suggests, means that a process or thread must wait for an ev ...
Posted by unerd.co.uk on Sat, 09 Oct 2021 06:34:59 +0200
C language address book program
Design requirements:
It can store the information of 1000 people. Each person's information includes name, age, gender, telephone and address
Address book functions include:
1. Add contacts
2. Delete the specified contact
3. Find the designated contact
4. Modify the designated contact
5. Show all contacts
6. Exit address book
Train of ...
Posted by ldoozer on Fri, 08 Oct 2021 10:10:52 +0200
[template question] breadth first search (BFS)
1, Maze problem
[Title Description] Given an n × A two-dimensional integer array of m is used to represent a maze. The array contains only 0 or 1, where 0 represents the road that can be taken and 1 represents the wall that cannot be passed. Initially, a person is located at the upper left corner (1,1), and it is known that the person ca ...
Posted by designerguy on Fri, 08 Oct 2021 03:41:11 +0200
Mutex and deadlock
Function and operation of mutex
mutex Mutex is a solution to the conflict caused by multiple threads operating on shared resources at the same time when multiple threads access shared resources. When executing, which thread holds the mutex and locks the shared resources before operating on shared resources. At this time, other threads cannot ...
Posted by 555sandy on Fri, 08 Oct 2021 03:23:20 +0200
1079 delayed palindromes (20 points)
1079 delayed palindromes (20 points)
Given a k+1 Bit positive integer N. Write ak⋯a1a0 The form in which all i yes 0≤ai<10 And ak>0. N It is called a palindrome number if and only if for all i yes ai=ak−i. Zero is also defi ...
Posted by Zeradin on Fri, 08 Oct 2021 01:46:20 +0200