Programming
Project 7:
Due Date: ______________________________
Project Duration: One week
In this project, you will implement the syscalls relating to file I/O: Open, Read, Write, Seek, and Close. These syscalls will allow user-level processes to read and write to files stored on the BLITZ DISK file. The goal is for you to understand the syscall mechanism in more detail, to understand what happens when several processes operate on a shared file system, and to understand how the kernel buffers and moves data between the file system on the disk and the user-level processes.
The files for this project are available in:
http://www.cs.pdx.edu/~harry/Blitz/OSProject/p7/
The following files are new to this project:
TestProgram4.c
Program1.h
Program1.c
Program2.c
The following files have been modified from the last project:
makefile
DISK
The makefile has been modified to compile TestProgram4, Program1, and Program2. The DISK file has been enlarged, since the previous version was too small to accommodate TestProgram4, Program1, and Program2.
All remaining files are unchanged from the last project.
Implement the following syscalls:
Open
Read
Write
Seek
Close
New files cannot be added to the disk. We will not implement the Create syscall in this project. All files must already be on the DISK before they can be opened and accessed. (Files can be added to the BLITZ DISK with the diskUtil command.)
The p7 directory contains a new user-level program called:
TestProgram4
Please change InitUserProcess
to load TestProgram4 as the initial
process. Then run it several times, once for each of the
tests it contains.
There is some sample output, collected together into a separate file called DesiredOutput.pdf in the p7 directory.