Skip to content

This repository contains a collection of Operating Systems lab assignments implemented using xv6, an educational Unix-like OS. The labs cover key OS concepts such as system calls, process scheduling, synchronization, and memory management, with hands-on coding tasks. Each lab provides step-by-step instructions and key theoretical insights

Notifications You must be signed in to change notification settings

tahamajs/xv6-Modified_OS_Lab_Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Operating Systems Lab Projects

This repository contains a series of Operating Systems lab assignments implemented using xv6, an educational Unix-like OS.

Table of Contents

  1. Lab 1: Introduction to xv6
  2. Lab 2: System Calls
  3. Lab 3: Process Scheduling
  4. Lab 4: Synchronization
  5. Lab 5: Memory Management

Lab 1: Introduction to xv6

Description:
This lab introduces students to xv6, a minimalistic OS developed at MIT for educational purposes.
Tasks include:

  • Setting up xv6 on QEMU.
  • Implementing console improvements like cursor movement and command history.
  • Adding support for clipboard operations in the terminal.

Resources:

  • Official xv6 repository: xv6-public
  • Compilation & Execution:
    make qemu

Lab 2: System Calls

Description:
This lab focuses on system calls in xv6.
Tasks include:

  • Understanding the trap mechanism for system calls.
  • Implementing new system calls.
  • Exploring how user programs interact with the kernel.

Key Concepts:

  • System Call Handling
  • Trap Gate in xv6
  • Wrappers in usys.S

Lab 3: Process Scheduling

Description:
This lab covers CPU scheduling mechanisms in xv6.
Tasks include:

  • Studying Round Robin (RR) scheduling used in xv6.
  • Implementing a Multi-Level Feedback Queue (MLFQ) scheduler.
  • Ensuring correct context switching between processes.

Key Concepts:

  • Context Switching
  • Scheduler Implementations
  • Process Life Cycle in xv6

Lab 4: Synchronization

Description:
This lab explores concurrency control and synchronization mechanisms.
Tasks include:

  • Understanding spinlocks, sleep locks, and semaphores in xv6.
  • Implementing mutex-based synchronization.
  • Debugging race conditions in multi-threaded applications.

Key Concepts:

  • Spinlocks vs. Sleep Locks
  • Race Conditions
  • Process Synchronization in xv6

Lab 5: Memory Management

Description:
This lab covers memory management in xv6.
Tasks include:

  • Understanding paging and segmentation.
  • Exploring virtual memory translation in xv6.
  • Implementing memory allocation mechanisms.

Key Concepts:

  • Page Tables & Address Translation
  • Physical vs. Virtual Memory
  • Swapping & Memory Allocation in xv6

Setup & Usage

Prerequisites:

  • GCC and Make
  • QEMU Emulator
  • Clone the repository:
    git clone https://github.com/tahamajs/xv6-Modified_OS_Lab_Projects.git
    cd OS-Labs

Running xv6:

make qemu

Contributors

  • Ali Ghanbari & Nesa Abbasi (Lab 1)
  • Mehdi Noori & Golrashidi (Lab 2)
  • Mohammadreza Nemati & Behrad Elmi (Lab 3)
  • Ali Ataollahi & Mehdi Haji (Lab 4)
  • Arian Firoozi & Puriya Tajmehrabi (Lab 5)

License

This project is for educational purposes only. Feel free to use and modify it.

About

This repository contains a collection of Operating Systems lab assignments implemented using xv6, an educational Unix-like OS. The labs cover key OS concepts such as system calls, process scheduling, synchronization, and memory management, with hands-on coding tasks. Each lab provides step-by-step instructions and key theoretical insights

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •