Tutorial Week 2


Computer Architecture

Q1: What are some of the differences between a processor running in privileged mode (also caled kernel mode) and user mode? Why are the two modes needed?

Q2: Describe the memory hierarchy. What types of memory appear in it? What are the characteristics of the memory as one moves through the hierarchy? How can do memory hierarchies provide both fast access times and large capacity?

Q3: Given that disks can stream data quite fast (1 block in tens of microseconds), why are average access times for a block in milliseconds?

Q4: You have a choice of buying a 3 Ghz processor with 512K cache, and a 2 GHz processor (of the same type) with a 3 MB cache for the same price. Assuming memory is the same speed in both machines and is much less than 2GHz (say 400MHz). Which would you purchase and why? Hint: You should consider what applications you expect to run on the machine.

Q5: Cache memory is divided into (and loaded in) blocks (also called cache lines). Why divide the cache into cache lines? What might limit the size of a line? You can ignore implementation issues of the cache itself.

Operating System Intro

Q6: What are the two main responsibilities or identifying features of an Operating System?

Q7: What are the characteristics of a good operating system?

Q8: What is multiprogramming (also termed multitasking)?

Q9: Why was timesharing not widespread on early so-called "batched" systems)?

Q10: Which of the following instructions (or instruction sequences) should only be allowed in kernel mode?

  1. Disable all interrupts.
  2. Read the time of day clock.
  3. Set the time of day clock.
  4. Change the memory map.
  5. Write to the hard disk controller register.
  6. Write all buffered blocks associated with a file back to disk (fsync).

Q11: On UNIX, which of the following are considered system calls? Why?

  1. read()
  2. printf()
  3. memcpy()
  4. open()
  5. strncpy()