This repository is my Operating Systems project I wrote for a class at McGill. Each of these folders has a C program that will run on Linux x86_64 machines.
Created a C program that implements a shell interface that accepts user commands and executes each command in a separate process. The shell program provides a command prompt, where the user inputs a line of command. The shell is responsible for executing the command. Commands I've included are cd (change directory), pwd (present working directory), exit (leave shell), fg (send a background job to the foreground), and jobs (list background jobs). Output redirection via > and command piping via | are also implemented here.
Note there are some issues with this implementation (e.g. killing foreground process via cmd ^ C kills background processes as well).
-
Clone this repository.
git clone https://github.com/thomaschristinck/Operating-Systems -
Go to "/Operating-Systems/Assignment 1"
-
Compile as
gcc -g main.c -o executable -
Run as
./executableor, with valgrind,valgrind - -leak-check=full ./executable
Implemented an in-memory key-value store. This key- value store is setup in shared memory so that the data that is written to the store persists even after the process that writes it terminates. Because the shared memory is in RAM, the reads and writes are very fast. The amount of storage, however, is limited. Also, the store is not durable. If the machine reboots, the data is lost.
-
Clone this repository.
git clone https://github.com/thomaschristinck/Operating-Systems -
Go to "/Operating-Systems/Assignment 2"
-
Compile with -lrt and -lpthread as
gcc -g a2_lib.c -o executable -lrt -lpthread -
Run as
./executableor, with valgrind,valgrind - -leak-check=full ./executable
Designed and implement a Simple File System. I was able to demonstrate a working file system working in Linux, and got 100% on this assignment. The SFS introduces many limitations such as restricted filename lengths, no user concept, no protection among files, no support for concurrent access, etc.
-
Clone this repository.
git clone https://github.com/thomaschristinck/Operating-Systems -
Go to "/Operating-Systems/Assignment 3"
-
Compile as
gcc -g sfs_api.c -o executable -
Run as
./executableor, with valgrind,valgrind - -leak-check=full ./executable
thomaschristinck, 2018.