CPSC 251 Fall 2001 Examination #1
Name:
______KEY_______________________________________________
Answer five (5) problems as fully as possible for full credit. Points will be lost if no
working is given (where necessary).
1.
(20 pts) Define the following terms as
fully as possible.
(i)
Multiprogramming - to increase CPU utilization by organizing jobs in
memory into queues such that the CPU is
always busy
(ii)
Multiprocessing
job execution involving more than one processor with close communication.
(iii)
Time-sharing extension of multiprogramming by CPU
executing multiple jobs switching between them frequently.
(iv)
Spooling- buffering jobs (usually output) for a device like a printer.
(v)
Batch - putting jobs with similar interests together before they are submitted.
2. ( 20 pts) (a)
List five operating systems in use today that you are aware of. How many of these have you used? Windows 9x, me, NT, Solaris, BeOS, MacOS-x,
OS/2
______________________________________________________________
_______
(b) What is a virtual machine? - When an OS, using CPU scheduling and MM,
creates an illusion that each process in the system has its own machine.
© How does it work? - The OS uses CPU scheduling and memory allocation and for each
allocated process creates an illusion that it has its own system resources
i.e. cpu, memory, etc..
3. (20 pts) (a)
What are two differences between user-level threads and kernel-level threads?
Under what circumstances is one type better than the other?
(i)
Kernel threads are slower because their
management is done by the kernel.
(ii)
In a multiprocessor environment, multiple threads
can be scheduled on more than one processor.
(b)
Describe the differences among the following schedulers:
(i)
short-term - selects jobs in the ready queue and allocates them CPU.
(ii)
medium-term selects jobs and removes them from MM
reduces degree of multiprogramming.
(iii)
long-term - selects jobs from a mass-storage like a disk and allocates them to MM.
4. (20 pts)
(a) Describe the actions taken by
a kernel to context switch between processes - During context-switch the kernel saves the context of process (cpu
registers, pc, open files, etc..)
(b) What is the purpose of a system call? to allow
a process in the user mode gain access to the kernel resources like privileged
instructions i.e. I/O instructions.
© What is a DMA?
For what types of operations is DMA useful? DMA is a direct memory access
when I/O devices without CPU intervention takes large blocks of data directly to MM. For massive data movement
between MM and devices.
5. (20 pts) (a)
In a multiprogramming and time-sharing environment, several users share the
system simultaneously. This can result in several security problems.
(i) What two such problems?
corruption of data/instruction, -
overwrite of each others address space.
( ii)
Can we ensure the same degree of security in a time-shared machine as we have in a dedicated machine?
Explain! Probably not!
(b) Describe the differences between symmetric
and asymmetric multiprocessing . What are three advantages of multiprocessor
system? In symmetric multiprocessing the processors sometimes share a CPU
clock and expanded global memory. Also they share an identical copy of the OS.
- In asymmetric multiprocessing, the processors
have independent CPU clocks and do not share OS and have limited global memory.