CS 1550 Lecture 3: CS 1550 InterProcess Communication

57 views6 pages
14 Feb 2017
School
Course

Document Summary

Two processes that can share information: tail and a[] Programmers must consider where race conditions might exist in their code (nothing will tell you where race conditions will be) Implement these function such that we solve the race condition problem. Code that has a potential race condition. Start by figuring out what is to blame. Instead of preventing preemption, we want to prevent two equivalent critical sections from running at the same time (mutual exclusion: make b wait until a is out of it"s critical region (block) No two processes can be inside their critical regions at the same time. No assumptions about cpu speed or number of cpus. No process outside its critical region may block another process. No process should have to wait forever to enter its critical region. Nothing in while loops, we keep looping until preempted. Following proper implementation, we are guaranteed mutual exclusion.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents