Sunteți pe pagina 1din 2

Alexandria University

Faculty of Engineering
Computer and Systems Engineering
Fall 2014

Homework 1
CS333: Operating Systems
Assigned: October 18, 2014
Due: October 29, 2014

Homework 1: Computer System Overview, Operating


System Overview
1. Define the 2 main categories of processor registers and the purpose for each of them.
2. What is an interrupt? How are multiple interrupts dealt with?
3. What are the three main purposes of an operating system?
4. In a multiprogramming and time-sharing environment, several users share the system simultaneously. List two security problems that can occur in these environments.
5. Define the essential properties of the following types of operating systems:
Batch
Interactive
Time-sharing
Distributed
Real-time
6. What is the difference between a multiprocessor and a multicore system?
7. Consider the following code:
for (i = 0; i < 20; i++)
for (j = 0; j < 10; j++)
a[i] = a[i] * j
(a) Give one example of the spatial locality in the code.
(b) Give one example of the temporal locality in the code.
8. Suppose a stack is to be used by the processor to manage procedure calls and returns. Can the
program counter be eliminated by using the top of the stack as a program counter?
9. A computer has a cache, main memory, and a disk used for virtual memory. 20 ns are required
to reference a word is in the cache. If the word is in main memory but not in the cache, 70 ns are
needed to load it into the cache (this includes the time to originally check the cache), and then
the reference is started again. If the word is not in main memory, 15 ms are required to fetch the
word from disk, followed by 60 ns to copy it to the cache, and then the reference is started again.
The cache hit ratio is 0.7 and the main memory hit ratio is 0.5. What is the average time in ns
required to access a referenced word on this system?
10. Explain the distinction between a real address and a virtual address.
11. Describe the round-robin scheduling technique.
12. Explain the difference between a monolithic kernel and a microkernel.

1 of 2

13. Which of the following instructions should be privileged?


(a) Set value of timer.
(b) Read the clock.
(c) Clear memory.
(d) Turn off interrupts.
(e) Switch from user to kernel mode.
(f) Access I/O device.
14. An I/O-bound program is one that, if run alone, would spend more time waiting for I/O than using the processor. A processor-bound program is the opposite. Suppose a short-term scheduling
algorithm favors those programs that have used little processor time in the recent past. Explain
why this algorithm favors I/O-bound programs and yet does not permanently deny processor
time to processor-bound programs.
15. What is the purpose of system calls, and how do system calls relate to the OS and to the concept
of dual-mode (kernel-mode and user-mode) operation?

2 of 2

S-ar putea să vă placă și