
CMSC 312 Operating System
Spring 2005
Midterm Exam
Department of Computer Science
Virginia Commonwealth University
1. List five services provided by an operating system, Explain how each provides
convenience to the users. Explain also in which cases it would be impossible for
user-level programs to provide these services.
2. As a process executes, it changes state depends on the current activity of that
process.
a) Name the five states and make a short definition of states
b) Show the transition among states and explain the transition
3. What is the purpose of command interpreter? Why is it usually separate from the
kernel? What is difference between the command interpreter and system calls?
4. Describe the context switching in terms of PCB, PC and CPU. Assume that
Shortest Remaining Job First Scheduling is used for CPU scheduling, Process A
arrives at time 0 with long CPU burst (say 3 second long) and no else processes
are in the system, Process B arrives at time 4 millisecond with short CPU burst
(say 3 millisecond long).
5. Write a fortune server on the computer whose IP address is “fortune.notreal.com”.
The server delivers random one-line fortunes to the client. The server will use port
number 3000.