30.10.2014 Views

Operating Systems - David Vernon

Operating Systems - David Vernon

Operating Systems - David Vernon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Processes<br />

InterProcess Communication IPC<br />

– Mutual Exclusion with Busy Waiting<br />

» Both Peterson’s Solution and the TSL solution are<br />

correct<br />

» But both require busy waiting:<br />

if a process wants to enter its critical region,<br />

it checks a flag to see if entry is allowed<br />

if it is, proceed<br />

otherwise, loop continuously until it is<br />

» Not only is busy waiting wasteful of CPU time, it<br />

also causes other problems: priority inversion<br />

Copyright © 2007 <strong>David</strong> <strong>Vernon</strong> (www.vernon.eu)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!