Skip to content

tanjim17/modified-xv6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modified xv6

xv6 is a teaching OS developed in MIT. I did some modifications in it in my undergrad course "CSE 314: Operating System Sessional."

Base repo: https://github.com/mit-pdos/xv6-public

List of modifications

  1. Added a user program time which counts the time (number of ticks) taken by the program given as its argument

    prompt

  2. Implemented lottery scheduling instead of xv6's default round robin policy

    • Files modified: proc.c proc.h
    • Run the user program ps for testing
  3. Created paging system with FIFO algorithm and NRU algorithm for memory management

    • Files modified: vm.c fs.c proc.c proc.h trap.c sysfile.c mmu.h defs.h
    • Run the user program mt for testing (Before running, uncomment the lines related to printing in vm.c)
    • Use the enum variable ALGO in vm.c to switch algorithms

Other minor modifications

  • Updated xv6's atoi function which couldn't handle negative number before
  • Utilized HLT instruction to decrease CPU usage
    • Files modified: proc.c x86.h
  • Changed the boring default prompt to the cool prompt shown in the above image :3
    • Files modified: sh.c