CPU Scheduling
$30-60 USD
Paid on delivery
CPU Schedulingis one of the main tasks within any Operating System. The purpose of this project is to get "hands-on" experience in coping with the various problems arise in the design and implementation of this component. You have to design and implement a process management simulation program, including processor scheduling. Within this framework, several scheduling algorithms will be tested.
The Simulator**·**** ** **The program will read process stream from standard input and will write to standard output (note: you might use pipes…):****
In addition, the command line will support the following options:
**
| _Option_ | _Value_ |
| -npcbs | Number of PCBs |
| -time | Simulation length |
| -algorithm | Algorithm name ( RRor FCFSor JSF) |
| -quantum | Time quantum |
For example, the following command (in UNIX) :
cat [url removed, login to view] | PMSimulator ??"npcbs 20 ??"time 1000 ??"algorithm RR 3 > [url removed, login to view]
(in Windows)
type [url removed, login to view] | PMSimulator ??"npcbs 20 ??"time 1000 ??"algorithm RR 3 > [url removed, login to view]
will read the file [url removed, login to view], will run the simulator with 20 PCBS for simulation duration of 1000 time units
using the RoundRobin scheduling algorithm and time quantum of 3 time-units. Output will be written to [url removed, login to view]
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
Also, i will need the following
The scheduling algorithm will be one of {"FCFS", "JSF", "RR"}.
1. FCFSrepresents non-preemptive first-come-first-served scheduling.
2. SJFrepresents non-preemptive shorted job first scheduling
3. RRrepresents preemptive round-robin scheduling; the quantumwill be a positive integer value
· The simulated operating system uses a five-state process model:
New When process is created
Ready When process has PCB
Running When process is dispatched. While in runningstate, process may issue haltrequest (to finish), or blockrequest (to wait for I/O).
Blocked When waiting for I/O.
Exit When finished
· On each tick of simulated time, the simulator recognizes one or more of the following events (interrupt like…)
| 1. | Requests issued by processes in the Runningstate |
| 2. | Processes in the Blockedstate which have become unblocked |
| 3. | Arrival of new processes |
| 4. | The simulated OS will move processes from the Newstate to the Readystate when PCBs become available. |
| 5. | When a process issues a request to halt, the OS terminates the process and records all relevant information. |
· The file representing the process input will have the following structure: Record-1
Record-2
Record-3
.
.
.
Record-N
where, each Record-k has the following structure :
pid arrival priority cpu-1 io-1 cpu-2 io-2 … cpu-n 0
| _field_ | _Description_ | _Notes_ |
| pid | Unique process identification | Pids will be: 1,2,3,… |
| arrival | Arrival time | Start count simulation time from zero |
| priority | Between 1 and 3 (used for priority scheduling) | |
| CPU-i | CPU time in the i-th burst | |
| IO-i | IO time after the i-th burst | When zero ??" indicates end of process bursts |
Example:
| _pid_ | _arrival_ | _priority_ | _Cpu io pairs_ |
| 1 | | 1 | 10 100 5 10 3 0 |
| 2 | | 2 | 5 10 5 10 5 10 5 10 5 10 5 0 |
| 3 | 2 | 1 | 2 50 4 30 5 60 4 0 |
| 4 | 2 | 3 | 30 2 40 3 20 5 100 0 |
| 5 | 3 | 2 | 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 |
## Platform
JAVA OR TEXT PAD 4.6
Project ID: #2965697