General info about processes
Virtual mem
Race conditions
happen when multiple processes try to access and manipulate shared data at the same time.
shared mem
is a common method for IPC, where multiple processes can access the same mem to exchange info
threads
synchro
synchro strategy: lock variables
lock is global lock variable. critical section must acquire it and release it afterwards (similar to binary semaphore)
Lamport bakery algo
before a process is allowed to enter the critical section, it is assigned a wait number, this number indicates the position of the process in the queue to enter the critical section. The lowest wait number is the first to enter the critical section.
Busy waiting
synchro strategy: cli and sti
Active waiting
synchro strategy: semaphore
Unilateral synchro
producer and consumer, consumer waits for resources produced by the producer
Multilateral synchro
mutual exclusion