next up previous
Next: About this document ...

Ceng 328 Operating Systems
Midterm
July 28, 2009 10.40-12.30
Good Luck!
Answer all of the questions.
  1. (5 pts) What are the two main purposes of an operating system?
  2. (5 pts) You are supposed to design a highly reliable operating system. What is meant by ``reliable''? Which criteria and measures should be taken care?
  3. (10 pts) What is multiprogramming? Describe and compare single programming and pure multiprogramming. What is thrashing?
  4. (10 pts) What is the purpose of system calls? For each of the following system calls, give a condition that causes it to fail: fork and exec.
  5. (10 pts) What is a Critical Region? List and explain the four conditions that need to be satisfied to solve the critical-region problem?
  6. (10 pts) In the solution to the dining philosophers problem, why is the state variable set to HUNGRY in the procedure take_forks?
  7. (15 pts) Consider the following sets of processes, with the length of the CPU-burst time given in milliseconds. Arrival time is the time at which the process is added to the ready queue.
    Process Burst Time Arrival Time
    P1 30 0
    P2 15 0
    P3 9 0
    P4 12 0
    P5 6 12
    P6 3 18
    i
    Draw appropriate charts illustrating the execution of these processes using FCFS, SJF non-preemptive, and SJF preemptive.


    ii
    Calculate the wait times of each process for each strategy. Calculate the average wait times under each strategy.
    Process FCFS SJF-nonpre SJF
    P1      
    P2      
    P3      
    P4      
    P5      
    P6      
    Average:      
  8. (10 pts) A computer uses the relocation scheme of base-limit pair. What are the problems with such a protected system (compared to a paged or segmented system)? A program is 10000 bytes long and is loaded at address 40000. What values do the base and limit register get according to the scheme?
  9. (10 pts) Describe internal and external fragmentation and explain the difference between them. Which one(s) occurs in paging systems? Which one(s) occurs in systems using pure segmentation? Explain.
  10. (20 pts) What is the memory management unit (MMU) and what does it do? Illustrate the internal operation of the MMU with 8 8-KB pages.



next up previous
Next: About this document ...
Cem Ozdogan 2009-08-10