31-07-2012, 10:00 AM
IP Routing Protocol
IPCChap2.ppt (Size: 228.5 KB / Downloads: 31)
Interprocess communication
Processes want to exchange information with each other
Many ways to do this, including
Network
Pipe (special file): A writes into pipe, and B reads from it
Critical Sections
We should prohibit more than one process from reading and writing the shared data at the same time.
In other words, what we need is mutual exclusion.
The part of the program where the shared memory is accessed is called the critical section or critical region.
Solution Criteria
Conditions to hold to have a good solution
No two processes may be simultaneously inside their critical regions.
No assumptions may be made about speeds or the number of CPUs.
No process running outside its critical section may block other processes.
No process should have to wait forever to enter its critical region.
TSL Instruction
It is another proposal that requires a little help from hardware.
Many computers have a TEST AND LOCK instruction that works as follows:
Reads the memory into a register and stores a non-zero value into it.
IPCChap2.ppt (Size: 228.5 KB / Downloads: 31)
Interprocess communication
Processes want to exchange information with each other
Many ways to do this, including
Network
Pipe (special file): A writes into pipe, and B reads from it
Critical Sections
We should prohibit more than one process from reading and writing the shared data at the same time.
In other words, what we need is mutual exclusion.
The part of the program where the shared memory is accessed is called the critical section or critical region.
Solution Criteria
Conditions to hold to have a good solution
No two processes may be simultaneously inside their critical regions.
No assumptions may be made about speeds or the number of CPUs.
No process running outside its critical section may block other processes.
No process should have to wait forever to enter its critical region.
TSL Instruction
It is another proposal that requires a little help from hardware.
Many computers have a TEST AND LOCK instruction that works as follows:
Reads the memory into a register and stores a non-zero value into it.