1.0.21 • Published 1 year ago

cpuschedulerts v1.0.21

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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 cpuschedulerts

List of cpu scheduling algorithm

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

methodsdefine:returndescription
getResultclass.getResult():Process[]get a Array of result PCB
simulateclass.simulate():voidto simulate corresponding cpu scheduling simulator
getAverageWaitingTimeclass.getAverageWaitingTime():numberget a AWT of corresponding simulator
getAverageTurnaroundTimeclass.getAverageTurnaroundTime():numberget a ATT of corresponding simulator
createProcesscreateProcess(pid:number,brustTime:number,arrivalTime:number,priority:number):processcreate a Process
1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago