[CSE]  Advanced Operating Systems 
 COMP9242 2010/S2 
UNSW
CRICOS Provider
Number: 00098G

PRINTER Printer-Friendly Version
Administration                        
- Notices
- Course Intro
- Times
- Lecture location/time
- Statistics
- Survey Results
 
Work
- Lectures
- Selected Papers
- Project Spec
- Exam
 
Support
- Forums
- Wiki
 
Resources
- Project Resources
- Slug Lab
- L4 Debugging Guide
- Developing on a Mac
- Developing on Linux
- SOS source browser
 
Documentation
- OKL4 reference manual
- Elfweaver user manual
- IXP42X hardware manual
- OKL Wiki
- NSLU2-Linux HomePage
- Intel IXP400 Software
 
Related Info
- IBM OS Prize
- OS Hall of Fame
 
History
- 2009
- 2008
- 2007
- 2006
- 2005
- 2004
- 2003
- 2002
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser
- Kevin Elphinstone (LiC)
- Guest Lecturers (TBA)
 
Stureps
- Student Reps

 
Valid HTML 4.0!

M8: ELF Loading

This requires that when creating a process, its code and data section are loaded from the file system into some free memory, and a page table is set up which will satisfy page faults to the text and data sections from the correct frames. The OS's loader must interpret the contents of the executable file (in ELF format). Sample code for reading ELF files is provided.

By this final milestone you should ensure that all I/O is asynchronous. This means that your system must not block waiting on 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.

Code

You have been supplied with code to handle parsing ELF files.

Design issues

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 need to change your build system so that executables are no longer added to the boot image, but rather copied into your /var/tftpboot/$USER directory.

You will also need to change the way in which your executables are linked. The current build system links each executable at a different offset within the boot image, so that all of them can be executed in place. The -T linker option can be used to specify the link address for your executables. In your own interest, do not map the text section to page zero! If you make sure that page zero never needs to be mapped, you can catch most uses of uninitialised pointers -- a great help in debugging!

Assessment

You will demonstrate (by running a sosh) that your system works even with repeated and concurrent executions, and that you can execute every file (of the right contents) from your NFS directory.


Last modified: 05 Jul 2010.