CS course: Operating System

In this course, I learned operating system (OS) concepts, including process management, process synchronization, memory management, and storage management. Some OS modules are implemented using C/C++ in Linux OS, including reproducing shell, semaphore, and file system.


The image below shows the simple shell I implemented. After compiling the code, we can just type `>myshell.out` to start the simple shell. By typing `H`, it shows all commands the shell can do, which include copy, delete, echo, list, make, print, quit, surf, clear, and execute.

I also played with threads and semaphores in C/C++ to simulate a problem involving mutual exclusion. The image below shows the semaphore game I played. I'm not sure somebody played this game nearly the same as me. The semaphore code is really hard to debug~

In order to access a file stored on a disk you have to know its location and the sectors used. For user convenience we prefer to have the OS track this information. There are many algorithms we can implement to track the file on a disk. The image below shows what I implement. By playing this interesting game, it lets me know a simple computer question when I was young: why the file size is the same when I save different lengths of information? Lol~

This is a hard course~ But I finally make it! In the future, I can play more with OS. For example, implement one simple OS, control lamp in my own room.