CSE 410 Fall 2018

CSE 410作业代做、代写C/C++课程设计作业、代做PCB留学生作业、C/C++实验作业代写
CSE 410 Fall 2018
Computer Project #10
Assignment Overview
This assignment focuses on process management within an operating system, including processor scheduling. You
will design and implement the C/C++ program which is described below.
It is worth 50 points (5% of course grade) and must be completed no later than 11:59 PM on Thursday, 12/6.
Assignment Deliverables
The deliverables for this assignment are the following files:
proj10.makefile – the makefile which produces proj10
proj10.student.c – the source code file for your solution
Be sure to use the specified file names and to submit your files for grading via the CSE handin system before the
project deadline.
Assignment Specifications
The program will simulate the steps that an operating system takes to manage user processes. The operating
system uses a five-state process model: New, Ready, Running, Blocked, and Exit.
When a process is created, it is assigned a Process Control Block (PCB) and it moves into the Ready state.
While in the Running state, a process may issue two types of requests: a request to halt (which is issued when a
process has completed its processing and is ready to leave the system), and a request to block (which is issued
when the process must wait for some event, such as an I/O operation).
When a process becomes unblocked, it moves from the Blocked state to the Ready state.
1. Your program will process a file which contains the simulation parameters and the process stream. The first
two lines of the file will contain the simulation parameters (one item per line):
a) Length of the simulation in ticks (an integer; 0 or more for this assignment)
b) Short-term scheduling algorithm (a string; "FCFS", "Priority" or "RR" for this assignment)
2. Zero or more lines will follow the simulation parameters to represent the process stream. Each line will contain
the following fields, separated by blanks:
a) Process identification number
b) Priority (from 1 to 3)
c) Number of CPU bursts
d) Burst time (in ticks)
e) Blocked time (in ticks)
f) Arrival time (in ticks since start of simulation)
The number of CPU bursts is an integer value representing the number of times that the process uses the CPU.
The burst time is an integer value representing the length of time that the process uses the CPU before issuing a
service request.
The blocked time is an integer value representing the length of time that the process is blocked after issuing a
service request.
3. On each tick of simulated time, the program will display the following information:
a) The current tick
b) All state transitions which occur (see below)
c) Process identification number of each process in the Ready state
d) Process identification number of each process in the Running state
e) Process identification number of each process in the Blocked state
That display will reflect the state of the system immediately before the transition from one tick to the next (after
all actions associated with the current tick have occurred, but before any actions associated with the next tick).
4. On each tick of simulated time, the program will handle zero or more of the following transitions (in order):
a) Recognize a request issued by a process in the Running state
b) Recognize when a process in the Blocked state has become unblocked
c) Recognize the arrival of a new process
d) Dispatch a process in the Ready state
Whenever the program moves a process from one state to another, it will display the process identification
number and the two states. For example: PID 23: Running to Blocked
5. When a process terminates, the program will display the following information about that process:
a) All process parameters (items (2a) to (2f) above)
b) Departure time (in ticks since start of simulation)
c) Cumulative time in the Ready state (in ticks)
d) Cumulative time in the Running state (in ticks)
e) Cumulative time in the Blocked state (in ticks)
f) Turnaround time (in ticks)
g) Normalized turnaround time (with two fractional digits of accuracy)
6. The program will accept one command-line argument: the name of the input file.
7. The string "FCFS" represents non-preemptive first-come-first-served scheduling. The string "Priority"
represents non-preemptive priority scheduling, where 1 represents the highest priority. The string "RR" represents
preemptive round robin scheduling; the string will be followed by one space and a positive integer representing
the length of the quantum (in ticks).
8. The program will use “less than” on process identification numbers to break any ties. For example, if process 4
and process 5 both arrive at tick 0, process 4 will be placed in the Ready state before process 5.
9. The program will include appropriate error-handling.
Assignment Notes
1. For this assignment, you may assume that the contents of the input file will be valid.

因为专业,所以值得信赖。如有需要,请加QQ99515681 或邮箱:[email protected] 

微信:codinghelp

猜你喜欢

转载自www.cnblogs.com/welcomejava/p/10046359.html
cse