Operating Systems (8 cr), separate exam 13.9.2016  suomeksiToisella puolella suomeksi

Write in each answer sheet the course name, date, your name, signature and student id.
This exam is a separate (final) exam. Answer all questions. For each question, it is sufficient to give a 1-2 page answer. Exam grading is done only after 18.9.2016.

  1. [6 p] Synchronization problem
    1. [3 p] What is the readers/writers problem? What synchronization problems does it contain? Who waits for whom and when?
    2. [3 p] We have 80 character buffer B. Process P writes to B every now and then. If B is full, P must wait until there is room in B. Process Q reads from it every now and then. If B is empty, Q must wait until there are characters to read in B. Give the pseudocodelevel semaphore-based solution to the synchronization problem between P and Q.

  2. [6 p] Deadlocks.
    1. [3 p] How can you detect that some processes have deadlocked. How can you recover from such detected deadlock?
    2. [3 p] You can prevent deadlocks from ever occurring by reserving the resources always in some given order. Why does this method work? What problem is there with this deadlock solution?

  3. [6 p] Virtual memory
    1. [3 p] How does the address translation for 1-level paged virtual memory occur at hardware and software level? How long will the address translation take in different cases? Do not forget TLB.
    2. [3 p] Which problem relating to virtual memory is solved with Page Fault Frequency (PFF) algorithm? How does PFF work in main principles?

  4. [6 p] Shortest Process Next (SPN) Scheduling
    1. [2 p] What problem does the SPN exactly solve? What property does the word "Shortest" refer to in SPN?
    2. [2 p] How does it work in principle? Why is it better than FIFO?
    3. [2 p] How do you know what is the “shortest process”, if the length information is not given? How do you compute it?

  5. [6 p] Real Time Scheduling
    1. [2 p] Why you usually can not use the same scheduling algorithms (e.g., FIFO or priority based systems) with real time systems than with ordinary systems?
    2. [2 p] However, Rate Monotonic Scheduling (RMS) is a priority based algorithm specifically intended for real time systems. When can you use it, and how does it work? How are the priorities defined?
    3. [2 p] What is the the priority inversion problem sometimes occurring in real time systems? How can you solve it?

  6. [6 p] Disk management
    1. [2 p] What problem does disk management algorithm SCAN (elevator) solve?
      In main principles, how does SCAN work?
    2. [2 p] Why is C-SCAN (Circular SCAN) better than SCAN? Which problem relating to SCAN does it solve? How does the solution work?
    3. [2 p] Which problem relating to C-SCAN is solved with Linux Anticipatory Scheduler? In main principles, how does the solution work?