GIOS Summary
I took the summer class CS6200 Graduate Introduction to Operating Systems, which is primarily geared towards students with non-CS background like me, and I found the course to be very informative.
The lectures have covered various aspects of the OS, Linux in partical, areas includes: simple networking [1][2], threads and concurrency, scheduling, memory and I/O management, inter-process communication,virtualization, distrubted file system, distributed shared memory etc. The protjects, however, are more tightly wrapped around multithreading and handling files. C was required for the first two projects, while C++14 was used for the final one.
Memory Ownership and Pointers
Since the projects are built with Goolge Address Sanitizer, it is important to understand the memory ownership and pointers. The references from here, here, and here can be helpful to understand concept.
Multithreading - Shared Memory
PThread is used in the majority of the projects. Primary focus is using mutex
and condition variable
to avoid race conditions and deadlocks, but also to achieve good performance under heavy load. I’ve found the “Reader/Writer Example'' from the lecture below to be a good starting point.
POSIX shared memory API, such as shm
and mmap
, is also used for inter-process communication, though you may also choose system V
. Besides PThread mutex
, semaphore
is also a convenient choice.
File Handlings
File handlings, such as reads, write, and transfer various sizes of files (from tiny to huge) through either network or shared memory, are required throughout all projects. For the last project, we were asked to use Google’s open source Remote Procedure Call (RPC) framework gRPC to design and implement a simple distributed file system (DFS), where files are synchronized between multiple clients and a single server. You can find the Protocol Buffers 3 Language Guide here. I also found the C++ examples to be extremely helpful for using gRPC’s asynchronous/non-blocking APIs.
Summary
Overall the course isn’t very hard as indicated by its name. It does require certain amount of effort for coding and debugging, as well as preparing for the exam. Read carefully of the project material, many answers are already provided, and stick with the text requirements, try not to overthinking.
[1]: Beej’s Guide to Network Programming, https://beej.us/guide/bgnet/html/
[2]: libcurl - the multiprotocol file transfer library, https://curl.se/libcurl/c/