getreadcount()
passes on both tests.- works as a syscall using the shell.
-
FCFS First come first serve.
- Add pre-processor directives in the Makefile.
- Changed the
scheduler()
function to include the (relatively) simple algorithm -- it just chooses the process with the minimum creation time using a simple iterative loop. - Change
proc.h
to notyield()
in case there is a trap caused due to the interrupt timer by just putting the yield around an#IFNDEF FCFS
macro.
-
MLFQ Multi level feedback queue.
- Added new contents to the process struct in
proc.h
. - Made sure these were initialized properly on
allocproc()
. - Updated the
update_time()
function which basically updates these parameters for every process. - Changed the
scheduler()
function yet again.- a simple iterative loop which searches for the earliest process in the highest priority queue.
- added an aging loop which checks if the processes have been waiting for too long.
- Changed the
trap.c
code to update process parameters if they have taken too much of their own time slice, reducing priority and increasing their ticks.
- Added new contents to the process struct in
-
FCFS performance Average rtime: 14 wait: 129
-
RR performance Average rtime 14 wait 156
-
MLFQ experiments
TOO_LONG
: waiting time after which process priority upgrades.TOOLONG average rtime wait 30 26 170 10 14 135 13 14 135 20 14 134 5 14 142 8 15 144 30 15 137
The code used to generate these graphs can be found in graphs python notebook.
- TCP diff
- Fixed timeout: TCP uses adaptive timers based on network conditions.
- I send acks with every request I send back from the recipient to the sender.
- I'm also not encrypting or hashing my chunks at all, they are being ordered and sent right away.
- I'm also waiting for an arbitrary amount of time before I check my ports again to prevent my server from getting ddosses by itself.
- I've already done that by implementing some kind of sleep timer which waits before sending the request again. Extensions can be:
- a sliding window to manage flow of data
- using congestion control algorithms
- a dynamic timer as mentioned in the previous answer.
- using exponential backoff (increase timer delay) if failures stack up.