The Critical Section Problem
- set of instructions that must be controlled so as to allow exclusive access to one process
- execution of the critical section by processes is mutually exclusive in time
Solution to the Critical Section Problem must meet three conditions...
- mutual exclusion: if process is executing in its critical section, no other process is executing in its critical section
- progress: if no process is executing in its critical section and there exists some processes that wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision of which will enter its critical section next, and this decision cannot be postponed indefinitely
- if no process is in critical section, can decide quickly who enters
- only one process can enter the critical section so in practice, others are put on the queue
- bounded waiting: there must exist a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted
The wait is the time from when a process makes a request to enter its critical section until that request is granted
In practice, once a process enters its critical section, it does not get another turn until a waiting process gets a turn (managed as a queue)
In practice, once a process enters its critical section, it does not get another turn until a waiting process gets a turn (managed as a queue)
No comments:
Post a Comment