24-08-2012, 02:02 PM
INTER-PROCESS COMMUNICATION AND SYNCHRONISATION
1INTER-PROCESS.pdf (Size: 28.73 KB / Downloads: 211)
Mutex Semaphore
Process using a Mutex blocks a critical
section in a task for taking the mutex and
unblocks on releasing the mutex.
The mutex wait for lock can be specified a
timeout .
Disadvantage
A resource of high priority should not lock the
other processes by blocking an already running
task in the following situation. Suppose a task is
running and a little time is left for its
completion.
Spinlock ( )
Suppose a task is running and a little time
is left for its completion.
• The running time left for it is less
compared to the time that would be taken
in blocking it and context switching.
• There is an innovative concept of spin
locking in certain schedulers.
• A spin lock is a powerful tool in the
situation described above.
Summary
We learnt
OS provides the IPC functions Create, Post,
Pend, Accept and Query for using mutex
semaphores. The time out and error
handling function can be provided with
Pend function as arguments.
OS provides the IPC functions for creating
and using lock ( ) and unlock ( ) for the
resource for a process and to lock and
unlock the resources for the other processes.