due 2017-12-20 5:30PM
For this assignment, you can choose one project among the list below. The grading will depend on the correctness and thoroughness of your implementation. Each of the projects can get you full credit if you prove to us that you did a thorough research and a substantial amount of coding.
You will create a branch
lab6 and push it to the
$ cd ~/cpsc422/mcertikos $ git checkout lab5 $ git checkout -b lab6 $ git push --set-upstream origin lab6 $ # You can simply use git push afterwards to publish your code
Change the bootloader to switch the video mode to a graphic mode. Implement text output (in the console driver) by having a font built in the kernel (as a simple array of bytes).
Expose the VGA memory through a memory mapping, add system calls to turn on and off a "video" mode inside the kernel. When video mode is enabled, map the VGA buffer into userspace. Your driver should support at least 4 colors and a resolution of 640x480.
Implement a little user program that does cool things in video mode. For example, write a user program to display a screensaver application or any other interesting animation, and add some control to allow the user to interact with the program with keyboard inputs.
The shell of the previous assignment is only a mock of a real UNIX shell. This project makes it a lot more interesting and has you go down the same design decisions UNIX creators went through.
Unify console IO, IPC, and FS read/writes.
Create a new kernel abstraction of "file descriptor" (represent them in userspace as integers). Two special file descriptors are the console input and the console output. Other file descriptors can either be a pipe between two processes, a write sink to a file, or a read source from a file.
Add a new system call to create a file descriptor in one of the 3 modes above. Have the kernel initialize the console in and console out file descriptors.
Once you have your new abstraction, remove the readline, puts
produce, and consume system calls. They are now functionally
subsumed by two new system calls
write that read
from the input channel and write to the output channel of the
The input/output channels of a process are specified in extra arguments you will add to spawn, the shell is started with the console in and console out channels.
Finally, make the shell able to parse redirections from and to files and other processes. Demonstrate the full functionality of your new shell with pipelines like:
cat file | rot13 > file.encrypted
Read on the guts of debuggers, then implement a system call API to have a debugging mechanism. Your debugger process should be able to spawn another process, place a few breakpoints in it, dump some interesting memory contents while the debuggee is stopped, and resume the execution.
Your debugger will run in 3 phases:
dump 0x12345678) or resume the execution (
Give us a sample run in the README together with an explanation as to why it is interesting.
Read the literature on dynamic priority-based schedulers. Implement one and showcase its new scheduling features on an example with multiple processes running.
Your new scheduler also needs to implement a load balancing mechanism to make sure that all the CPUs of the computer are fully utilized.
Detail your scheduling algorithm extensively in the README, and justify your comments by providing comprehensive benchmark results. Your scheduler implementation should be cache efficient. Do some research on the multi-core cache hierarchy models and illustrate clearly how each of your design decisions impacts the cache performance. Back up your claim with concrete benchmarks.
You can study the Plan 9 scheduler as it provides a simple base to work upon and the code is clear.
Study how qemu supports the audio, then enable appropriate audio devices in qemu, and implement related drivers. Then expose reasonable API to the user level so that user programs can manipulate the sound, and implement some interesting user applications. For example, you can implement a simple piano application with limited notes, and then implement another application to play a self-composed song with provided notes. Make sure that the sound is of reasonable quality. Try to decode and play an audio file stored in the hard disk. You can use some open source decoders if you like.
We are open to propositions. The above list simply provides some sample projects to give you an idea about the scope. Even if you choose one of the projects in the list, you do not have follow the guidelines exactly, as long as you demonstrate that the project is as interesting and challenging as the sample projects.
If you wish to make a proposal, please send us a mail with a detailed description of your proposal. We will evaluate it and get back to you quickly.