next up previous
Next: About this document

Operating Systems Tutorial 2 University of Wales, Cardiff

This tutorial is not assessed, but it is in your interest to attempt it, because SOON there will be one that is.

  1. How does an 'interrupt' work ? what is the main difference between an interrupt and a trap ?
  2. How do 'privileged mode' (aka 'supervisor mode') and 'user mode' instructions differ ? Give reasons for the existence of these two modes of CPU execution.
  3. Which of the following instructions should be executed in the supervisor mode :
    a. disable all interrupts
    b. read the time-of-day clock
    c. set the time-of-day clock
    d. clear memory
    e. switch from user to supervisor mode
    f. check printer queue
    g. check incoming request for information access in a web server
    h. send an email message to a friend
  4. Consider 50 jobs active on a machine competing for CPU, where 20 jobs take 10 seconds to execute, 20 jobs 20 seconds, and the remaining 10, 30 seconds. Using the round robin scheduling strategy, how would you allocate priorities to the jobs ? Develop a simple schedule, giving reasons for your choices.
  5. Identify the caveats of FIFO scheduling, and where lottery based schedule can improve performance. 10 users are connected to a web server for obtaining information on Jazz artists. Of the 10 users, 3 are local and connected via high speed networks, of the remaining 7, 5 are from the continent (Europe), and 2 from Australia. The European users are connected via high speed links, but not as fast as local connections. The Australian users are the most energetic however, making the most requests per unit time. How would you allocate priorities to each access in this scenario, so that all users are served. Where does fairness come into this model ? Should you allocate priorities according to distance ? If so, how would you do it ?

I<>Omer Rana
February 1997.



Back to the Contents Page


next up previous
Next: About this document

Omer F Rana
Thu May 8 17:53:50 BST 1997