exam1key - Operating Systems Exam 1 Name This exam is closed book and closed notes Your work must be individual Cheating will be punished according to

exam1key - Operating Systems Exam 1 Name This exam is...

This preview shows page 1 - 3 out of 6 pages.

Operating Systems, Exam 1 Name: This exam is closed book and closed notes. Your work must be individual. Cheating will be punished according to university academic integrity code. 1 Short Answer Give a brief but complete answer to each of the following questions (7 pts each). 1. Consider the following flawed solution to thecritical sectionproblem. Which of thethree requirements for a critical section solutions does this fail to satisfy?Brieflyexplain why. 1
Image of page 1
2. Pretend the following three functions will be run concurrently by three different threads.Add semaphore pseudocode to guarantee that functions Y() and Z() will never be per-mitted to execute at the same time and, for each iteration, the call to Y() will alwayscome after the call to X() has completed (i.e., theithcall to X() must return beforethe theithcall to Y() begins). Be sure to declare and initialize any semaphores youuse.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 6 pages?

  • Fall '08
  • GU
  • Operating Systems, Central processing unit, Computer multitasking

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture