Advanced Operating Systems
M8: ELF Loading
At this stage, the only way to install and execute a new application on your operating system is to recompile the operating system itself. The objective of this milestone is to transition your OS to load and execute programs that are hosted by the NFS server. The CPIO archive should not be required after this milestone is complete (including for sosh).
By this final milestone you should ensure that all I/O is asynchronous. This means that your system must not block waiting for completion of file system or paging I/O, but should be able to run any process that is ready while other processes are blocked on I/O completion.
Note: you initially only need to read the ELF header of an executable file, in order to parse it and subsequently load it for execution. You can assume the header is less than the page size (4 KiB). You should only read in the file as needed when loading the executable, or completely lazily when the application faults on it.
You may also wish to modify the top level Makefile to
automatically copy your executable files into your NFS
One design decision is whether to load the whole executable image on process creation, or instead load page-wise on demand at page-fault time.
You will demonstrate (by running a
The following can be considered stretch goals. They are significantly more work, and the reward is mostly in personal understanding.
Last modified: 08 Aug 2017.