Skip to content
/ xv6.01 Public

xv6, now with multi level feedback queues! (and a few other goodies)

Notifications You must be signed in to change notification settings

komikat/xv6.01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. Spec 1
  2. Spec 2
    1. FCFS

Spec 1

  • getreadcount() passes on both tests.
  • works as a syscall using the shell.

Spec 2

Implementation

  • 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 not yield() 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.

Comparison

  • 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

Spec 3

img

img

img

img

The code used to generate these graphs can be found in graphs python notebook.

Spec 4

  1. 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.
  1. I've already done that by implementing some kind of sleep timer which waits before sending the request again. Extensions can be:
    1. a sliding window to manage flow of data
    2. using congestion control algorithms
    3. a dynamic timer as mentioned in the previous answer.
    4. using exponential backoff (increase timer delay) if failures stack up.

About

xv6, now with multi level feedback queues! (and a few other goodies)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published