Group C assignment 2 on communication.pptx

jennygriffin246 15 views 8 slides Oct 13, 2024
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

it is about process synchronization and how it is used i operating systems


Slide Content

Process Synchronization Process synchronization refers to the coordination of activities or operations performed by multiple processes in a concurrent computing environment. It involves ensuring that processes or threads coordinate their activities and enforce a specific order of execution. by Jerry K

Primary Goals of Process Synchronization 1 Mutual Exclusion This ensures that only one process or thread accesses a shared resource at a time, preventing data corruption or inconsistencies. 2 Ordering and Coordination Allows processes or threads to coordinate their activities and enforce a specific order of execution, enabling synchronization points. 3 Deadlock Avoidance Process synchronization techniques help prevent or resolve deadlocks by providing mechanisms for resource allocation and release.

Critical Section Problem 1 Mutual Exclusion Only one process is executed at a time in the critical section, preventing simultaneous access to shared resources. 2 Progress Ensures that processes not executing in their remainder sections can participate in the decision of entering the critical section. 3 Bounded Waiting Places a limit on the number of times other processes can enter their critical sections after a request is made.

Semaphores Binary Semaphore Primarily used for solving mutual exclusion problems where only one process or thread can access a shared resource at a time. Also known as mutex locks. Counting Semaphores Used to control access to a finite number of resources or to solve synchronization problems involving multiple processes or threads. Allow multiple processes/threads to access a resource simultaneously, up to the available count specified by the semaphore value. Uses of Semaphores Enforce mutual exclusion, solve the producer-consumer problem, synchronize the execution of multiple processes or threads, manage a finite pool of resources, prevent or resolve deadlocks, and control traffic flow.

Semaphore Operations 1 wait() (P) Decrements the value of the semaphore, blocking the process/thread if the value is already 0. 2 signal() (V) Increments the value of the semaphore, releasing the blocked process/thread if any.

Types of Semaphores Binary Semaphore Primarily used for mutual exclusion Counting Semaphores Control access to a finite number of resources Uses of Semaphores Enforce mutual exclusion, solve the producer-consumer problem, synchronize the execution of multiple processes or threads, manage a finite pool of resources, prevent or resolve deadlocks, and control traffic flow.

Semaphore Classifications Binary Semaphore Behaves like a binary semaphore, primarily used for mutual exclusion. Bounded Semaphore Prevents the count from exceeding a specified limit, useful in scenarios like resource pools. Unbounded Semaphore Allows unlimited resources to be allocated based on demand.

Uses of Semaphores Mutual Exclusion Enforces that only one process or thread can access a shared resource at a time. Producer-Consumer Problem Regulates access to a shared buffer to ensure that the producer and consumer do not access it simultaneously or when it is empty/full. Process Synchronization Used to synchronize the execution of multiple processes or threads.
Tags