Enhancing XV6 system
Implementing fundamental OS elements through XV6
This was the course work of Operating Systems Lab at IIT BOMBAY, in Autumn 2020. Using XV6, I implemented elements like Scheduling, Memory Management, Shell building, File System handling, Forking that are critical to functioning of an operating system.
Scheduler in XV6
- Modified the current scheduler in XV6 to consider user-defined process priorities
- Used priorities as weights to implement a weighted round robin scheduler, while taking care of starvation
Custom Memory Manager
- Implemented a memory manager to allocate and deallocate memory dynamically
- Extended the allocator to be elastic and map pages only on demand
Custom Linux Shell
- Built own Linux-like shell in C
- Added support for background, serial & parallel processes, and kill signal & exit command
File System Implementation
- Emulated a disk over a text file with the superblock, inode and data blocks
- Implemented a file system on the emulated disk with basic operations like open/close/read and write
Copy-on-write Fork in XV6
- Implemented the Copy-on-Write Fork in the XV6 OS
- It allocates new pages for the memory image only on modification by the child/parent
Various Implementations can be found here: Code .