OS/161 Shell Project – Multi-Process Kernel

A full OS kernel extension for educational system OS/161, developed as part of the Operating Systems Internals course at Politecnico di Torino. The project introduces multi-programming to a previously single-process operating system by implementing process control, system calls, file and memory management.

Project Scope

Enhance OS/161 kernel with support for: - Multiprogramming (via fork, execv, waitpid) - Virtual memory page allocation and release - File operations with descriptor tables - Directory traversal (getcwd, chdir) - Concurrent system call handling via locks and spinlocks - User-space shell (based on /bin/sh)

Key Implemented System Calls

- fork(), execv(), exit(), waitpid(), getpid() - open(), close(), read(), write(), lseek(), dup2() - getcwd(), chdir()

Memory and Process Architecture

Implemented bitmap-based virtual memory manager to replace static allocation, enabling memory reuse and clean deallocation. Added process table with child tracking, conditional variables, and hierarchical termination logic. Uses synchronization primitives to handle concurrent execution safely.

Testing & Validation

Tested with OS/161's testbin programs: - forktest: validates fork and getpid behavior - badcall: stress-tests syscall error handling - f_test: verifies correctness and concurrency of file I/O - shell execution: validates execv by launching binaries from /bin/sh

← Back to ProjectsView Source Code on GitHub →