Midterm Exam

CSC521

Analytical models of Operating Systems

Fall ‘10

Answer any (and only)three questions from below

Due date (by email): March 23, 2010

Test modality: Take-home exam. Answers are to be sent as .doc file using a proper Equation Editor.

  1. In the first chapter of the book (Computer Systems Overview) the issue of memory organization is one of the major issues considered. The role that a cache memory plays along with the conventional RAM memory is indicated. Obviously, one important issue would be the size of cache memory one should attempt to procure noting that too large a cache is prohibitively expensive and too small a cache would not be of much use. Derive an effective expression for in terms of relevant system parameters of your choice.

How do we expand this model to an -level cache system supporting a RAM memory?

  1. Consider a purely I/O driven process with little number crunching such as one finds in Video streaming. In such cases, data transfers directly from one device to another without ever copying any into memory would be the best way to arrange bypassing the need for any DMA support. If I know that 33ms after receiving the last video frame I should get the next frame, my choice for I/O model (in terms of what is outlined in Computer Systems Overview) could be straight-forward programmed I/O (PIO) instead of an interrupt-driven I/O. Design a system process model to facilitate such an approach.
  1. One of the major performance limiting issues in a multi-user multi-tasking system is those processes which are periodically needed to be purged out of the system as suspended processes. An ideal MMU of a future Operating Systems might identify such processes periodically, and suspend them to keep systems performance at a healthy level. To do this effectively, the system must be able to figure out two things: One, it must be able to identify the best set of candidate processes from the existing set of processes in the system for suspension; and two, the timing for affecting suspensions. Design an analytical model that would automatically carry out process suspension in a multi-user multi-tasking system.
  1. A server system may provide service to its clients via an ensemble of worker threads usually known as a thread pool. Arriving clients, if need be, would queue up in a task queue and wait there for a worker thread. A worker thread, if available would be dispatched to serve a client, and upon finishing it, the thread would return to pool to work on another waiting client. The diagrammatic layout for this is shown below:

Obviously, one contentious issue would be the maximum number of worker threads in the thread pool that a server would begin with. Show how one could approach this problem.

  1. Design a readers/writers semaphore solution where neither the readers nor the writers would be preferred priority-wise. Would this cause any starvation problem?
  1. Outline a Petri net model depicting a producer/consumer system with two types of consumers: and . The consumers are not alike; has a priority over in the following sense: So long Buffer(A) has at least one token in it, can go into its buffer and delete an item from it. However, is allowed to enter its buffer only if Buffer(A) is empty and Buffer(B) has items in it.