Skip to content

flightno23/OS161

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS161

OS-161 is an instructional OS created by Harvard University as a standalone kernel and a simple userland, all written in C.

The source code contains implementations to the following things (added by me):

  1. Implementation of Locks, Condition Variables and Reader-Writer Locks
  2. Implementation of file system calls - open, close, read, write, getpid, dup2
  3. Implementation of Process System calls - fork, execv, sbrk
  4. Implementation of a fully functional virtual memory subsystem - uses paging and swapping to manage memory

To understand the code better, I have put together a guide of where the important files are present in the source and their contents.
This will enable others to read my code and understand the internal workings of the OS if they want to.
a. kern/syscall/execv.c - Execv() system call implementation
b. kern/syscall/fileOperations.c - implementation of open(), close(), read(), write(), dup2(), chdir(), getcwd(), lseek()
c. kern/syscall/fork.c - fork() system call implementation
d. kern/syscall/waitpidexit.c - waitpid() and exit() system calls implementation
e. kern/vm/pageTable.c - implementation of a linked list based page table structure for the new virtual memory subsystem
f. kern/vm/swapOperations.c - implementations of swapin, swapout such that pages are moved between the disk and memory
g. kern/arch/mips/vm/vm.c - VM implemntation ; algorithm to allocate and free pages (as well kernel pages ) and the coremap functionality has been added.

About

Source Code for the OS161 Assignments - Synchronization Primitives, File and Process System Calls and Virtual Memory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published