{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter05-OS7e - Operating Systems Internals andDesign...

Info icon This preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 5 Concurrency: Mutual  Exclusion and  Synchronization Operating  Systems: Internals  and Design  Principles Seventh Edition By William Stallings
Image of page 1

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

View Full Document Right Arrow Icon
   “ Designing correct routines for controlling concurrent activities proved to be one of the most difficult aspects of systems programming. The ad hoc techniques used by programmers of early multiprogramming and real-time systems were always vulnerable to subtle programming errors whose effects could be observed only when certain relatively rare sequences of actions occurred. The errors are particularly difficult to locate, since the precise conditions under which they appear are very hard to reproduce.” —THE COMPUTER SCIENCE AND ENGINEERING RESEARCH STUDY MIT Press, 1980
Image of page 2
Operating System design is concerned  with the management of processes and  threads: Multiprogramming Multiprocessing Distributed Processing
Image of page 3

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

View Full Document Right Arrow Icon
             
Image of page 4
Concurrency Table 5.1 Some Key Terms Related to Concurrency
Image of page 5

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

View Full Document Right Arrow Icon
Interleaving and overlapping  can be viewed as examples of concurrent processing both present the same problems In multiprogramming, the relative speed of  execution of processes cannot be predicted depends on activities of other processes the way the OS handles interrupts scheduling policies of the OS
Image of page 6
Difficulties of Concurrency Difficulties of Concurrency Sharing of global resources Difficult for the OS to manage the allocation  of resources optimally Difficult to locate programming errors as  results are not deterministic and reproducible
Image of page 7

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

View Full Document Right Arrow Icon
Occurs when multiple processes or  threads read and write shared data items The final result depends on the order of  execution the “loser” of the race is the process that  updates last and will determine the final  value of the variable
Image of page 8
Operating System Concerns Operating System Concerns Design and management issues raised by the existence of  concurrency: The OS must:  be able to keep track of various processes allocate and de-allocate resources for each              active  process protect the data and physical resources of each process  against interference by other processes ensure that the processes and outputs are independent of  the processing speed
Image of page 9

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

View Full Document Right Arrow Icon
P I R N O T C E E R S A S C T I O N
Image of page 10
Concurrent processes come into conflict when  they use the same resource (competitively or  shared)  for example: I/O devices, memory, processor time, clock Three control problems must be faced Need for mutual exclusion Deadlock Starvation Sharing processes also need to address  coherence
Image of page 11

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

View Full Document Right Arrow Icon
Need for Mutual Exclusion If there is no controlled access to shared data, 
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern