ipc examples

ipc examples - Interprocess Communication 1. Ways of...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities 3. Proper sequencing in case of dependencies 2 and 3 apply to threads as well.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Race Conditions Two processes want to access shared memory at the same time. The final result depends on who runs precisely when.
Background image of page 2
3 Critical Regions (1) Part of the program where shared memory is accessed. Four conditions to provide mutual exclusion: 1. No two processes simultaneously in critical region 2. No assumptions made about speeds or numbers of CPUs 3. No process running outside its critical region may block another process 4. No process must wait forever to enter its critical region
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Critical Regions (2) Mutual exclusion using critical regions
Background image of page 4
5 Attempts for Mutual Exclusion Using Busy Waiting 1. Disabling all interrupts (only by kernel!) 2. Lock variables => fatal race condition 3. Strict alternation using spin locks - violates condition 3 4. Peterson’s solution 5. Test-and-set locks (TSL) Priority inversion problem
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Strict Alternation Proposed solution to critical region problem (a) Process 0. (b) Process 1.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 25

ipc examples - Interprocess Communication 1. Ways of...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online