Operating Systems, 12.5.2016                                 suomeksiToisella puolella suomeksi

Write in each answer sheet course name, date, your name, signature and student id.
For each question, it is sufficient to give a 1-2 page answer.
Please write the answer to each problem in its own answer sheet.
Each problem is also a miniexam of the same number. The replacement exams for miniexams 4-7 are problems 4-7. Miniexam 8 is problem 8. Term exam is problems 5-8.
NOTE: Please return the answer for each problem in the correct pile!

  1. [6 p] Memory management, virtual memory. Page size is 4 KB. Referenced byte address is 0x00B06012.
    1. [2 p] How is virtual memory address translation done with 2-level page tables? What benefit is there with 2-level page tables as compared to 1-level page tables?
    2. [2 p] How is virtual memory address translation done with inverted page tables? What benefit is there with inverted page tables as compared to ordinary page tables?
    3. [2 p] How is TLB used in virtual memory address translation?
      What do you gain with TLB in practice?
     
  2. [6 p] Process scheduling
    1. [1 p] How do you define the "Shortest Process" in SPN (Shortest process Next) scheduling? Which process is the "Shortest Process"?
    2. [1 p] Why is SPN better than FIFO?
    3. [1 p] How can you define what the "Shortest Process" is, when you do not know the resource requirements for each process in advance?
    4. [1 p] Why can one usually not use ordinary simple scheduling algorithms (like Round-Robin or priority based algorithms) in real time systems? What is special with real time systems scheduling?
    5. [2 p] Under what circumstances can you use priority based scheduling in a real time system? What is required from such system? How does the solution work? Why can't you always use priorities?

  3. [6 p] I/O management, file systems
    1. [2 p] N-Step-SCAN. Which (C-SCAN) problem does it solve and how does it do it?
      What do you gain with it? What is bad with it?
    2. [2 p] Linux Anticipatory Scheduler. Which (C-SCAN) problem does it solve and how does it do it? What do you gain with it? What is bad with it?
    3. [2 p] Indexed serial file. What is its structure? Give an example where it would be the best file organization? Why would heap, serial file, or indexed file be not good file organization types with your example case?

  4. [6 p] Embedded systems, distributed systems
    1. [2 p] What is good with eCos event flags?
    2. [1 p] How would you using the eCos event flags solve the three runner (A, B, and C) synchronization problem, where A must wait after every lap until either B or C has run at least equal number of laps. (Use loosely defined pseudo-eCos syntax. Remember to define your event flags with their initial values.)
    3. [3 p] Remote procedure Call (RPC). Why do you need it? How is it implemented? What do you gain with it as compared to ordinary subroutine call? How is parameter passing implemented and what problems does it involve?

  5. [6 p] Data security
    1. [3 p] Buffer overflow attack. What is it? Give an example on its use?
      In which ways can the system be protected from it?
    2. [3 p] Password "salt". What is it? Why do you need it? What do you gain with it? How do you use it? Give an example on how it is used.