Homework #1 Solution

Assigned problems are: 1.9, 2.5, 3.1, 3.2, 3.4


Problem 1.9

Describe the differences between symmetric and asymmetric multiprocessing. What are the advantages and one disadvantage of multiprocessing?

A symmetric multiprocessing (SMP) system is one in which each processor runs an identical copy of the operating system on each processor.

In an asymmetric multiprocessing system, each processor is assigned a specific task. An example of this would be a master-slave relationship between one processor and "the rest".

Three advantages of multiprocessing are:

  1. Increased throughput - with more processors, more work can be accomplished in less time.
  2. Economy of scale - peripheral devices may be shared amongst multi-processor systems.
  3. Increased reliability - if one processor crashes, then the others may continue to operate

One disadvantage of a multi-processing system is the additional complexity in operating system and possibly application software.


 

Problem 2.5

Which of the instructions should be privileged and why?

a) Set value of timer - this instruction must be priveleged, otherwise a process could reset the timer to its own advantage and dominate the CPU resources.

b) Read the clock - this instruction should not be privileged... there is no security ramifications of a process reading the clock value.

c) Clear memory - I have two interpretations. If you mean clear memory not allocated to this process, then that instruction would be privileged. If you mean clear the memory allocated to this process, then that does not need to be privileged.

d) Turn off the interrupts - This must be a privileged instruction because turning off interrupts would disable many of the processor functions for all processes.

e) Switch from user to monitor mode - This is a privileged instruction because switching to monitor mode would give theprocess operating system privileges.


 

Problem 3.1

What are the five major activities of an operating system in regard to process management?

From page 56:
  1. Creating and deleting processes
  2. Suspending and resuming processes
  3. Process synchronization
  4. Process communication
  5. Handling process deadlock

 

Problem 3.2

What are the three major activities of an operating system in regard to memory management?

From page 57:
  1. Tracking what parts of memory are being used and by whom
  2. Deciding which processes are to be loaded into memory
  3. Allocating and de-allocating memory for processes

 

Problem 3.4

What are the three major activities of an operating system in regard to file management?

From page 58:
  1. Creating and deleting files
  2. Creating and deleting directories
  3. Supporting file and directory primitives
  4. Mapping files onto secondary storage
  5. File backup