This project is based on the XV6 open-source operating system developed by MIT. Through various development phases, this project aims to implement system enhancements, custom commands, system calls, scheduling algorithms, synchronization mechanisms, and shared memory capabilities. Each phase introduces new functionalities and modifications to the basic XV6 OS structure, allowing for hands-on learning in OS development.
-
Objective: Customize boot settings and enhance user interface commands within XV6.
-
Tasks:
- Modify XV6 boot configurations.
- Implement arrow key navigation, including:
ARROW-UPandARROW-DOWNfor command history.- Cursor movement between characters.
- Clear terminal function.
-
Objective: Create and implement new system calls using register-based argument handling.
-
Tasks:
- Implement system calls that retrieve arguments through registers instead of traditional methods.
- Develop a
copy_filesystem call to copy files from a source to a destination. - Write additional system calls, such as:
get_uncle_count: Counts the number of "uncle" processes.get_process_lifetime: Calculates the lifespan of a given process.
-
Objective: Implement new scheduling features and prevent process starvation.
-
Tasks:
- Integrate an Aging feature within XV6 to avoid process starvation.
- Add multiple scheduling algorithms:
- Circular Queue
- LCFS (Last Come First Serve)
- BJF (Best Job First)
- Create system calls for scheduling functionalities, such as changing queues for process management.
-
Objective: Enhance process synchronization and measure CPU coherency.
-
Tasks:
- Design and implement a
Priority Lockfor process synchronization based on priority, includingacquireandreleasefunctions. - Introduce new variables in the CPU struct to track system calls per CPU, allowing experimentation with CPU coherency.
- Design and implement a
-
Objective: Implement shared memory for inter-process communication.
-
Tasks:
- Develop shared memory allocation for XV6 processes.
- Implement system calls for shared memory management, such as
openandclose.
- Cloning and Setting Up: Clone the XV6 project and ensure all dependencies are met.
- Build and Run: Use
maketo build the project andmake qemuto run in a virtual environment. - Contributions: Contributions and discussions are welcome; please open issues or pull requests to collaborate.
This project is inspired by MIT's XV6 OS. The phases in this project follow educational objectives to enhance understanding in operating systems development.
Feel free to explore and contribute to the project as we expand XV6 with these new features!