
Operating Systems and Architecture
Comprehensive Exam
August 15, 2000
Computer Science Department
University of New Mexico
The test monitor will answer some parts of these questions for you if you are unsure of what
some of these terms mean. The only penalty is that you will not get any points for the part that
was answered for you. You can still answer the other parts of the question. This can get you
started on a question even if you are not sure of the definitions.
Do any five questions. Be sure that it is absolutely clear which questions you are answering.
1. Device drivers (20 points) Suppose a computer system has a SCSI controller and the SCSI
bus has three devices on it: a disk drive, a DAT drive, and a laser printer. What device drivers
will the system need to control all this (the SCSI bus and the devices on it)? Describe the
interfaces these drivers will have. What other drivers, other parts of the operating system,
device controllers, and devices will they call (or communicate with)? Who will call each of
these drivers?
2. Context switching (20 points)
(a) (8 points) Explain what context switching in an operating system is. Go into some details
and describe what happens in both the hardware and the software during a context
switch. Explain what a half-context switch is. Talk about the registers and what happens
to them.
(b) (6 points) Context switching is not possible without some help from the hardware, that is,
an instruction specially designed to do the critical part of context switching. Explain why
such instructions are necessary. Be sure to describe the problem and why it cannot be
handled with ordinary instructions.
(c) (6 points) Context switching slows down the processor by quite a bit. We are not talking
about the time to execute the context switch itself but side effects from the context switch.
Explain why this is so, that is, describe why the process is slowed down after a context
switch.
3. Address spaces (20 points) Consider a system with 40-bit physical addresses and 48-bit
logical addresses which are translated with a three-level page table. The system also has an
address cache (usually called a TLB).
(a) (6 points) Decide on a good size for each page and the number of address bits assigned
to each level. Draw a diagram of the logical address and how each part is used.
(b) (9 points) Draw a diagram that explains how the address is translated from a logical
address coming in from the processor to a physical address to the bus. Include the TLB
in your diagram and show where it fits it. Use text annotations so that the diagram stands
by itself and can be understood easily.
(c) (5 points) Suppose a memory read cycle for a physical address put on the bus takes 50
ns. The processor will not see this speed because of the overhead for address
translation. Suppose we wanted the processor to see an average 60 ns memory read
time for reads from logical addresses. What would the hit rate on the TLB have to be to
achieve this goal.
4. Authentication and Protection (20 points) Define authentication and protection in an
operating system and tell how they relate to each other. Describe one method of protection
that can be used in an operating system. Describe one method for users to be authenticated
and one method that operating systems can authenticate themselves to user. Give three
examples of security attacks, one which exploits a protection failure, one of which exploits a
user authentication failure and one of which exploits a system authentication failure.
5. Networks (20 points) Computer networks are frequently described by the ISO/OSI 7-layer