CMPSCI 377: Operating Systems
Homework 1
Due: Oct 3, 2014
Note: Please submit your solutions via moodle.
- Explain the difference between uniprogramming and multiprogramming. Can
you implement multiprogramming on a uniprocessor? Can you implement uniprogramming on a multiprocessor?
- Explain why the mode bit on the CPU to switch between user mode and
kernel mode can only be switched by the hardware or the OS but not by applications. What is the purpose of the user and kernel modes on a CPU?
- Explains the steps perfomed by the OS to implement a system call.
- Give an example to illustrate why the OS needs to implement protection
between processes.
- What is the purpose of the following registers: program counter, stack pointer?
- Why is I/O a privileged operation on a hardware?
- Explain any two methods for passing parameters to the OS for a system call.
- What is a micro-kernel architecture for an OS kernel?
- Consider the MLFQ scheduler discussed in class. Assume that three
jobs arrive into the system with lengths 30, 20 and 10. Assume two queues
with time slices of 1 and 2 time units for MLFQ. Assume that the first two
jobs are CPU bound and the third job does I/O for 1 second after 1 second
of computation. What are the completion and wait times for each job?
Assume that the job length of 10 seconds consists of only CPU time and
does not include any I/O times.
- Repeat the above question by assuming that the 10seconds for job
3 includes I/O (i.e., it needs 5 seconds of exection time and does 5 seconds
of I/O). Also for this question assume that the time slices for the two
queues are 2 and 4 time units.