DOC PREVIEW
UE CS 470 - Process Management Project

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 470 - Operating SystemsSpring 2011 - Process Management Project40 pointsOut: January 19, 2011Due: February 2, 2011The purpose of this project is to gain an appreciation of the work involved in managing processes. The assignment is to write a simple process manager simulation. Problem StatementThe program should simulate the process state structure shown in Figure 3.2 on page 103 of the textbook and covered in Lecture 2. Input to drive the simulation must be read in from a file, and output must be written to a file. The format of the input file will be discussed below. In the simulation, each process is identified by a unique process ID (UID). For our purposes, the process control block (PCB) of each process will keep track of at least the parent of each process, all of the children of each process, and the remaining burst time for the process (i.e., what is left of the total amount of time requested), and the remaining quantum time for the current process' quantum. All processes are preemptible. When any interrupt occurs, the running process is "preempted," and its remaining burst time and remaining quantum time is decremented by 1. When the remaining burst time of a process reaches 0, it terminates. Whenever a process terminates, all its children also must be terminated. I.e., this simulation has cascading termination semantics. After an interrupt, if the current process is not continuing, the first process on the Ready Queue becomes the running process with a new time quantum. If there are no processes on the Ready Queue, assume that an "init" process with UID 0 runs, but this process is never put on the Ready queue. (Thus when the simulation first begins, the only thing in the system is the init process 0, and it is the parent of the first "real" process.) Input consists of a series of actions each of which is initiated by an interrupt. (I.e., all actions interrupt the current running process.) Any requests come from the current running process. The actions are: C n bCreate a process with UID n with initial burst size b and add it to the Ready Queue. The parent is the current running process.D nDestroy the process with UID n and any children processes that it has. Only the parent of process n or process n itself can destroy process n. Other requests are ignored. You may assume that there will not be any requests to destroy UID 0. ITimer interrupt. This represents the system clock tick.W nCurrent process has initiated a wait for event with event ID (EID) n and moves to the Wait Queue. E nEvent with EID n has taken place. The process waiting for this event moves to the Ready Queue.01/17/2011 Page 1 of 3 D. HwangXExit the program. The program should output the current state of the simulation before exiting. For the purposes of this simulation, each action counts as a timer interrupt in time. For example, when a process creates a child process, the parent's remaining burst time is decremented by 1 (as is its remaining quantum time). For actions, D, I and W, if there is no current running process, the action is ignored. For action E, if there is no process waiting for the EID event, then the action is ignored. Output should consist of a log of actions performed (i.e., the input and any state transitions that processes make) and the state of the Ready Queue and Wait Queue. See the example below.Assignment(20 points) This project is to be done individually. Each student must implement a simulation meeting the specifications above for the RR scheduling algorithm for a quantum size that can be set for each run of the program.The simulator may be written in any language. However, the instructor can provide assistance only for C/C++ projects. Provide a makefile that will make your project if it needs to be compiled. The file names and quantum size value may be provided to the simulation either as command-line arguments or interactively. Hardcoding the test file names or quantum size into the program is not acceptable.(10 points) Each student must provide a high-level functional analysis and design of the program describing the functionality of the major components of the program and how they interact with each other, and a more detailed analysis and design for the data structures and algorithms used in implementing the Ready and Wait Queues. (10 points) Students must provide the result files of running their simulation using the test files provided on csserver in /home/hwang/cs470/project1 (to be released on or before January 26) for q= 1, 5, and 10. In addition, each student should answer the following questions: 1. Compare the test files and their resulting output. What can be said about the RR scheduling algorithm? What can you say about the effect of different quantum sizes? 2. What aspect of process management did you find most difficult to implement? 3. What aspect of process management did you find easiest to implement? 4. What, if anything, would you change in your current design? 5. What, if anything, did you find interesting or surprising about process management that you did not know before doing this project? Example Program OutputFor RR (q=3) scheduling, you might have the following output log (shown in three columns to conserve paper), where the lines in italics echo the input file, "UID n b" means process n with burst time b remaining, and "with q left" means q time left in the current quantum. In the Wait Queue, the third number is the event ID being waited upon. In this example, processes being added to the Ready Queue due to creation or event completion are place there before the current running process transitions.01/17/2011 Page 2 of 3 D. HwangUID 0 running C 3 10 IReady Queue: UID 3 10 placed on Ready Queue UID 1 0 terminatedWait Queue: UID 1 3 running with 2 left UID 2 2 terminatedC 1 7 Ready Queue: UID 3 10 UID 3 7 terminatedUID 1 7 placed on Ready Queue Wait Queue: UID 2 2 4 UID 0 runningUID 1 7 running with 3 left I Ready Queue:Ready Queue: UID 1 2 running with 1 left Wait Queue:Wait Queue: Ready Queue: UID 3 10 C 5 5I Wait Queue: UID 2 2 4 UID 5 5 placed on Ready QueueUID 1 6 running with 2 left E 4 UID 5 5 running with 3 leftReady Queue: UID 1 1 placed on Ready Queue Ready Queue:Wait Queue: UID 2 2 placed on Ready Queue Wait Queue:C 2 3 UID 3 10 running with 3 left C 6 3UID 2 3 placed on Ready Queue Ready Queue: UID 1 1 UID 2 2 UID 6 3 placed on Ready QueueUID 1 5 running with 1 left Wait Queue: UID 5 4 running with 2


View Full Document

UE CS 470 - Process Management Project

Download Process Management Project
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Process Management Project and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Process Management Project 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?