Review
Contents
28. Review#
28.1. Common Concurrency and Synchronization System Calls#
Function |
Reference |
Brief Description |
---|---|---|
pipe() |
Creates a pipe for bidirectional interprocess communication |
|
mmap() |
Allocates a page of virtual memory |
|
pthread_mutex_init() |
man 3 pthread_mutex_init |
Creates a mutex |
pthread_mutex_lock() |
Locks a mutex |
|
pthread_mutex_unlock() |
Unlocks a mutex |
|
pthread_mutex_destroy() |
man 3 pthread_mutex_destroy |
Frees resources allocated to a mutex |
sched_yield(), sleep() |
Call scheduler to switch threads |
|
wakeup(), wakeup_all() |
Moves threads from the wait queue to the ready queue |
|
sem_init() |
Initialize a semaphore |
|
sem_wait() |
||
sem_post() |