Saturday, October 18, 2014

OPERATING SYSTEM SYNCHRONIZATION BASICS FOR UGC NET


Synchronization : The concept of Synchronization is concerned with cooperating
processes that share some resources. Co-operating processes must
synchronize with each other when they use shared resources. Thus we can view the Synchronization as a set of constraints on the ordering of events.
 
Semaphores : A Semaphore is a protected variable whose value can be accessed and altered only by operations P and V.
 
A Semaphore Mechanism basically consists of the two primitive operations
SIGNAL and WAIT.

The Semaphore variable can assume only positive integer value. The integer
value of the Semaphore in the wait and signal operations must be executed
indivisible. That is, when one process modifies the Semaphore value, no other process can simultaneously modify that same Semaphore value.

Importance of semaphores :
(i) Semaphores can be used to deal with n process critical section problem.
As the n processes shares the semaphores, mutex (standing for mutual
exclusion), is initialized to 1.
 
(ii) Semaphores can also be used to solve various synchronization problems.
Co-operating Processes : The concurrent processes executing in the Operating
System may be either Independent Processes or Co-operating Processes.
A process is Co-operating if it can affect or is affected by the other processes
executing in the System. That means any process that shares data with other processes is a Co-operating Process.
Inter-Process Communication : Cooperating processes can communicate in a
shared-memory environment. Cooperating processes communicate with each
other via an Inter-Process-Communication (IPC) facility. IPC provides a
mechanism to allow processes to communicate and to synchronize their actions.
Inter-Process Communication is best provided by a Message System. Message
System can be defined in many different ways. An IPC facility provides at least
the two operations - send(message) and receive(message).

No comments:

Post a Comment