The goal of this assignment is to come up with a plan for your course project.
The project is a more open-ended assignment, where you have the flexibility to pursue an OS topic or subsystem that interests you. The goal of the first part of this assignment then, is to identify roughly what you will be doing for the rest of the assignment.
If you work with a research group, I encourage your to adapt your research into a project. The idea should be your own and should be new, but it can significantly leverage your research group's infrastructure. You must do the writeup and the presentation completely on your own (though if you need to use a figure or two from your research group, you may do so with attribution).
I encourage you to come up with your own project idea, but there are suggestions at the end of this assignment for projects for those wishing for more guidance.
The best thing you can do for your project is to think it out early and do some exploratory hacking to make sure your project is feasible. A project proposal that has preliminary experiments will get better feedback from me and you will be more confident of what you are trying to do.
You must submit a proposal (1-2 pages long), meeting the guidelines and answering the basic questions enumerated below:
Planning is important. So I will review your proposal and give you feedback. If signficant refinement is needed, I will ask you to hand in a revised proposal in the few weeks after the proposal due date.
Don't worry if what you work on for your project diverges from your proposal. The point is to write code, measure systems, and explain your ideas. Most good project drift from the initial idea as plans hit reality.
You can work in groups of up to 2 for your project.
If you want to recreate and extend a result from a paper, you can do that. Please indicate what paper and exactly how you plan to recreate the experiments and what you hope to learn. This can be an exceptionally valuable endeavor.
Find more than one C++ thread pool implementation (e.g., the boost library has one) and compare them for different use cases like increasing storage bandwidth or accepting incoming network connections. You can investigate synchronization issues internal to the thread pool implementation or discuss the need to additional thread-level synchronization. You can look at interactions with OS-level scheduling. You can look at problems scaling the number of threads in the pool.
BS::thread is another simple thread pool.
If you want to get into coroutines, which are lightweight, language-level threads, you can also look at them. libcoro is a coroutine library for C++.
The DPDK library allows user programs to directly interact with your network card. The SPDK library allows direct control of high performance storage devices. Pick one and efficiently implement a task like a simple networked file server or a scan of all files on a device.
Port as much of an application's system calls as you can to use io_uring. Here is a good description for how to get going with some storage-oriented systems calls.
Or use io_uring to optimize cp -r
. Compare Linux's aio calls
with io_uring. Build benchmarks to demonstrate performance trade offs.
When doing a recursive copy, how can you take advantage of global information
like how much total storage you will need? Can you look for file pages
that are already in memory? Can you use fallocate
? How
can you best use concurrent storage requests?
Here is a recent study of io_uring and PMDK.
For those who feel that fork is no longer a good process creation primitive, what can you do to convince others?
Look at porting an application to use posix_spawn
. Also look at hacking in kernel functionality
that could support an alternative to fork. Develop microbenchmarks and also benchmarks to quantify the arguments
for your changes.
There are many resources concerning device drivers (in addition to the actual code/documentation that came with the kernel source). For example, there is a book "Linux Device Drivers" by Rubini & Corbet. (A slightly older 2nd edition is available online at this site.
I will review your proposal, and I might request a revision.Emerging hardware such as FPGAs, GPUs, Crypto and Compression co-processors remain a major challenge for modern OSes because the stack has been slow to adjust to them, motivating vendors to build systems that go "around" the OS. Re-inventing the OS to deal with this is well beyond the scope of a class project, but empirical characterization of strengths and weaknesses of existing OS support for such devices is an extremely valuable first step toward developing better OS support. The same is true (perhaps more so) for virtualization layers below the OS. A project that begins by examining OS support for some class of emerging devices is almost certain to yield fruitful future research opportunities.