Operating Systems, term exam, 2.5.2014                 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 note: Please return the answer for each question on separate answer sheet in the proper pile!

  1. [6 p] Memory management.
    We have 48-bit virtual byte addresses and 32-bit physical byte addresses. Page size is 4KB.
    1. [3 p] How many entries do you need for 1-level virtual memory page table? How many entries are needed for inverted page table?
    2. [3 p] Explain, how virtual address 0x123456789ABC is translated to physical address 54321ABC using (i) 1-level page table and (ii) inverted page table.
      Consider cases TLB hit, TLB miss, and page fault exception.
     
  2. [6 p] Scheduling
    1. [2 p] Give three different scheduling methods for uniprocessor environment.
      For each one of them, explain when and why you would want use that one instead of the other two.
    2. [2 p] How does deadline scheduling work in principle?
      For what environment and for what problem is it ment for?
      Why is it not suitable for your standard home desktop system?
    3. [2 p] What is the priority inversion problem relating to scheduling?
      In what type of environment would it occur and how does it hurt the system?
      How can you solve it?
       
  3. [6 p] File management
    1. [2 p] Give an example situation where it would be better to use a B-tree indexed file instead of an indexed serial file? Explain.
    2. [2 p] Give an example situation where it would be better to use an indexed serial file instead of a B-tree indexed file? Explain.
    3. [2 p] What is the structure of a B-tree index? How do you locate the correct record with a B-tree index?

  4. [6 p] Embedded OS, eCos
    1. [4 p] How do you implement a monitor in eCos?
      How do eCos condition variables differ from the usual condition variables in a monitor?
      How does critical section protection in eCos monitor implementation differ from the usual monitor implementation?
      How do data structure visibility rules in eCos monitor implementation differ from the usual monitor implementation?
      What type of signalling semantics (who continues after a signal) is used in eCos monitor implementation?
    2. [2 p] What are eCos event flags?
      Give an example on a synchronization problem which would be easier to solve with event flags than with semaphores.