Advanced Linux Programming.pdf
The Linux Programming Interface.pdf
Understanding Linux Kernel.pdf
-
Process definition
- PID, PPID
- Command line argument
- Envinronment
-
Who can access to a process (Process credentials)
- UIDs and GIDs
- File-system user permissions
- Interface
-
Process creation
folk()
- File access when folk a new process
- Memory semantics
- Race condition
-
Child process monitor
wait( *status)
waitpid( pid, *status, options)
- Orphan process and zombie process
-
Program execution
execve( path, argv, envp )
- Run a shell command
system( *command)
-
Process priorities and scheduler
getpriority( which, who)
setpriority( which, who)
- Realtime scheduling
-
Process memory and resource
- Process infomation in file system (
/proc
)
- Process infomation in file system (
-
Process termination
exit(status)
- Exit handlers
atexit(void (*func)(void))
,on_exit()
- Termination flow
-
Daemon process
- Definition
- How to create a daemon process
-
Definition
-
Thread identify
pthread_self()
pthread_equal( thread_id_1, thread_id_2)
-
Thread creation
pthread_create( *thread, *attr, *(*start), *arg)
-
Thread manage
pthread_join( thread, **retval)
pthread_detach( thread)
-
Thread termination
pthread_exit( *retval)
-
Compling thread
-pthread
-
Thread synchronization
- Mutexes
- Condition variables
- Serial communication
- UART
- SPI
- I2C
- USB
- Wireless communication
- Wifi
- BLE
- Zigbee