Professional Documents
Culture Documents
Disabling interrupts.
This feature enables a process to disable interrupts before it starts
modifying a shared variable. If interrupts is disabled, the CPU will
not be switched from one process to another. The operating system
will then simply allow the process to complete the execution of the
critical section even though its time quantum has finished. Upon
exiting the critical section, the process will enable interrupts.
Restrictions:
1. A philosopher cannot start
eating unless he has both
forks.
2. A philosopher cannot pick up
both forks at the same time.
He has to do it one at a time.
3. He cannot get the fork that is
being used by the philosopher
to his right or to his left.