1.0.21 • Published 3 years ago
cpuschedulerts v1.0.21
CPU SCHEDULING SIMULATOR
This packing to get result of process by using various cpu scheduling algorithm
INDEX
How to download
#right only js and ts are supported
npm i cpuschedulertsList of cpu scheduling algorithm
- FCFS, First come first serverd
- SJF, Shortest Job First
- NPP, non-Preemptive Priority
- HRN, Highest Response-ratio Next
- PP, Preemptive Priority
- RR, Round Robin
- SRT, Shortest Remaining Time
Scheduling algorithm declaration
FCFS, First come first serverd
// declaration
fcfs()//eg
const FCFS = new fcfs();
FCFS.simulate(processArray)SJF, Shortest Job First
// declaration
sjf()//eg
const SJF = new sjf();
SJF.simulate(processArray)NPP, non-Preemptive Priority
// declaration
staticPriority()//eg
const StaticPriority = new staticPriority();
StaticPriority.simulate(processArray)HRN, Highest Response-ratio Next
// declaration
hrn()//eg
const HRN = new hrn();
HRN.simulate(processArray)Preemptive Priority
// declaration
dynamicPriority()//eg
const DynamicPriority = new dynamicPriority();
DynamicPriority.simulate(processArray)RR, Round Robin
// declaration
rr(timeQuantum:number)//eg
const RR = new rr(3);
RR.simulate(processArray)SRT, Shortest Remaining Time
// declaration
srt(timeQuantum:number)//eg
const SRT = new srt(10);
SRT.simulate(processArray)Available Methods
| methods | define:return | description |
|---|---|---|
| getResult | class.getResult():Process[] | get a Array of result PCB |
| simulate | class.simulate():void | to simulate corresponding cpu scheduling simulator |
| getAverageWaitingTime | class.getAverageWaitingTime():number | get a AWT of corresponding simulator |
| getAverageTurnaroundTime | class.getAverageTurnaroundTime():number | get a ATT of corresponding simulator |
| createProcess | createProcess(pid:number,brustTime:number,arrivalTime:number,priority:number):process | create a Process |
1.0.21
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago