06_LCD_Slide_Handout_1(4).pdf - ,

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

View Full Document Right Arrow Icon
Process Synchronization Race Conditions The Critical Section Semaphores Classic Synchronization Problems 1 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ *Property of STI J0024 Race conditions usually occur if two or more processes are allowed to modify the same shared variable at the same time. To prevent race conditions, the operating system must perform process synchronization to guarantee that only one process is updating a shared variable at any one time. 2 __________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ *Property of STI J0024 part of the process that contains the instruction or instructions that access a shared variable or resource Figure 6.1 Critical Sectionsfor ProcessP 1 and P 2 3 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ *Property of STI J0024 Software solutions to the critical section problem: SOLUTION 1 Figure 6.2 Critical Sectionsof ProcessesP 1 and P 2 for Solution 1 4 __________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
Image of page 1

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

View Full Document Right Arrow Icon
*Property of STI J0024 SOLUTION 2 Figure 6.3 Critical Section P 1 and P 2 for Solution 2 5 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ *Property of STI J0024 SOLUTION 3 (Peterson’s Algorithm) Figure 6.4 Critical Sectionsof ProcessesP 1 and P 2 for Solution 3 6 __________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ *Property of STI J0024
Image of page 2
Image of page 3
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