Pintos
Educational operating system for the x86 architecture

Project Overview
Pintos is an educational operating system designed for the x86 architecture. It provides a simplified but functional implementation of core operating system concepts, making it an ideal platform for learning OS development.
Key Features
Pintos implements several fundamental operating system components:
- Multithreading: Support for concurrent execution with thread management
- User Programs: Ability to load and run user-level applications
- File System: Basic file system implementation for data storage
- Virtual Memory: Memory management with virtual addressing
Development Environment
Pintos runs in a system simulator rather than on actual hardware. This approach allows for easier debugging and inspection of the operating system's behavior. The primary simulators used are Bochs2 and QEMU3, which accurately emulate x86 hardware.
Project Implementation
As part of UC Berkeley's CS 162 (Operating Systems) course in 2022, I worked on extending and enhancing the base Pintos implementation. The project was divided into several phases:
- Threads: Implementing thread scheduling, synchronization primitives, and priority scheduling
- User Programs: Adding support for loading and running user programs, including system calls
- Virtual Memory: Implementing page tables, demand paging, and memory mapping
- File System: Enhancing the file system with features like extensible files and subdirectories
Learning Outcomes
Working on Pintos provided valuable insights into:
- Low-level operating system design and implementation
- Concurrency and synchronization mechanisms
- Memory management techniques
- File system design principles
- System call implementation and user/kernel separation
- Debugging complex systems with limited visibility
Technical Challenges
The most challenging aspects of the Pintos project included:
- Implementing proper synchronization to avoid race conditions
- Managing memory correctly to prevent leaks and corruption
- Designing efficient algorithms for resource allocation
- Debugging issues in a simulated environment
- Balancing performance with correctness in system design