0% found this document useful (0 votes)
12 views12 pages

OS Unit 1st

Operating system

Uploaded by

vermagovind434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views12 pages

OS Unit 1st

Operating system

Uploaded by

vermagovind434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
What is Inter-Process Communication? Cooperating processes require an inter-process communication (IPC) mechanism that will allow them to exchange data and information. There are two fundamental models of inter-process communi (1) Shared memory (2) Message passing (1) Shared memory 1/2 In the shared-memory model, a region of memory that is shared by cooperating processes is established. Processes can then exchange information by reading and writing data to the shared region. gg Message Passing System | Message passing provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space and is particularly useful in a distributed environment, where the communicating processes may reside on different computers connected by a network. Maeda B) 1 Cee UM Peed 1 2 Leo) 3 A message-passing factlily provides at least two operations: * Sent (Message) o + Receive (Message) i Two can communicate with each other by sending and receiving messages. This communication can take place by establishing a communication link these. BED when there is more than one process accessing or modifying a shared resource | at the same time, then the value of that resource will be determined by the last | process, This is called the race condition, Process Pt Process P2 Pl Process Non Critical Section Entry Section Critical Section Exit Section > Critical Section Problem { A section of code or collection in which only one process may execute at a given time is called a critical section. Consider a system containing and processing Pl and P2. Each process has a segment of code called a critical section in which the process may change common variables, update a table, write into files, etc. When such a system works, only one process may be allowed to execute within a critical section. The execution of critical sections by the processes is mutually exclusive in time. Any solution to a critical section problem must satisfy the following three requirements: 1. Mutual Exclusion If a process is executing in its critical section, then no other processes can be entered ints the critical sections and perform the execution Pl process P2 i Non Cita Section x Eniry Section tit Section Non ial Section BD sence Watting There exists c bound on the of times that other processes are allowed to enter critical sections after a process has made a request to enter its critical section and t request is granted. Note: No Sumption can be made about speeds, No. of CPUs and No. of processor. Hon Critical Section Entry Section Critical Section Exit Section ‘Non Critical Section oO 2, Progress If no process is executing in its critical section and some processes wish to enter their critical sections. then only those processes that are not executing their remainder can participate in. the decision on which will enter its critical section next. This selection cannot be postponed indefinitely. PI —_ Process Hon Critical Section Entry Section Citieal Section Exit Section Non Critical Section Semaphore's > Semaphore proposed by Edsger Dijkstra, is a technique fo manage concurrent processes by using a simple integer value, which is known as a semaphore. Semaphore is simply a variable that is non-negative and shared between threads. This variable is used to solve the critical section problem and to achieve process synchronization in the multiprocessing environment. A semaphore S is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait} and signal }. wait () __P from the Dutch word proberen, which means ‘to test’] signal (| V rom the Dutch word verhogen, which means ‘fo Increment’] Operating System — Paccess[cPc SeneoorinGy Wont. butoviatsspace:¢ ———— ee Brean/6 TERMINOLOGY USCO TN ScrifoveinG, ALGORITHMS Garé ET PSU CNV ER 1) PianwaL TIME Tine At which Process Proves! 4) RESPONEE TIME “Tine \t takes te Start Respontig Rea. : 1 =. From Prgnal time Wteagy duis’ CAT) py areriien ~ C80 Som Procets CPu Sat eTs BM” Main Memory } 8) Turn! Broun 0 Time s How Long process takes © events 2) CompueTion TIHE:= Tine at which Process Comptes | pats CT AT aes Rxecwten CCT) | pmeaaaeH gm Choa AIT Ares, tap Process a Execution’ Pinatly* 19 wane re ETS ey Tn Sm a 3) Burst Tine + i — D Einar Tine: The Reyined by Poss for cou) BRAT Ting ae, a ’ Pra B anen aaee y oe ay nat

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy