Skip to content

themaxsmith/os-xv6-riscv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maxwell Smith xv6 riscv changes 
- Have added two scheduler, rr and stride
- added runtime, stride, pass values according to the HW requiments
- used sorted queue based on pass value
- testStride test to make sure stride is working correctly

Files added/changed:
defs.h
main.c
param.h
proc.c
proc.h
pstat.h
sysproc.c
pstat.c
user/testStride.c

Runnong testStride:
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 209070
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 99990
ID: 2 pid: 4  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 72720
ID: 3 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 4 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 5 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 6 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 7 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 209070
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 99990
ID: 2 pid: 4  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 72720
ID: 3 pid: 5  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 9090
ID: 4 pid: 6  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 9090
ID: 5 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 6 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 7 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 209070
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 99990
ID: 2 pid: 4  inuse: 1 nice: 10 runtime: 2 stride: 9090 pass: 99990
ID: 3 pid: 5  inuse: 1 nice: 14 runtime: 5 stride: 22222 pass: 107068
ID: 4 pid: 6  inuse: 1 nice: 19 runtime: 3 stride: 66666 pass: 151512
ID: 5 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 6 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 7 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 1 stride: 9090 pass: 209070
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 99990
ID: 2 pid: 4  inuse: 1 nice: 10 runtime: 2 stride: 9090 pass: 118170
ID: 3 pid: 5  inuse: 1 nice: 14 runtime: 7 stride: 22222 pass: 151512
ID: 4 pid: 6  inuse: 1 nice: 19 runtime: 3 stride: 66666 pass: 151512
ID: 5 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 6 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0
ID: 7 pid: 0  inuse: 0 nice: 0 runtime: 0 stride: 0 pass: 0

You can see that that the lower stride get called more often for the run in 2 seconds in. The pass values will end up being the same at 6 seconds due to them going to the lowest one.


Runing pstat twice:

pstat 1:
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 199980
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 81810
ID: 2 pid: 3  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 45450

pstat 2:
ID: 0 pid: 1  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 199980
ID: 1 pid: 2  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 99990
ID: 2 pid: 4  inuse: 1 nice: 10 runtime: 0 stride: 9090 pass: 63630

About

Operating System Development Practice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published