Operating System Concepts Projects
The project in short
This is a collection of 3 different projects.
Fork
I was tasked with implementing a Unix-like shell. The basic command parsing was already implemented. The assignment was to use Unix system calls (fork exec, dup2, pipe, waitpid) to create a new process when a command was entered. The challenge of this assignment was implementing command piping (command | command), executing multiple commands (command & command), and reading and writing to files (file » command » file). Here I needed to be precise with creating new forks and create pipes between the right threads to allow for proper inter-thread communication.
Synchronization
I was tasked with implementing synchronized read-write functions, with an additional logger. To do this I used mutex to synchronize the threads.
Memory
I was tasked with optimizing a given piece of code using knowledge of memory access patterns and hardware characteristics. I applied loop optimization techniques, like loop tiling, to optimizing CPU caching.
Key skills learned/used in these projects
- Utilized Unix system calls (fork exec, dup2, pipe, waitpid) for process control.
- Handled inter-thread communication using pipes.
- Performed system-level programming in C++
- Implemented concurrent read/write operations using multithreading.
- Designed thread-safe code in C++ using mutexes
- Applied loop optimization techniques, like loop tiling.
- Optimized for cache performance by aligning memory access patterns with hardware characteristics.