![]() |
|
This is Part 4 of the project for this term. You are expected to build on your own previous work. The Project Expectations are all still applicable. Do not use source code files of others or even those of mine but from prior terms.
Be Considerate. Do make sure that you are using no more than 10 MB in
your home directory. The following will show your disk space usage:
du -s ~
Our goals in this part of the project are to be able to handle multiple disks and hence multiple file volumes. Subdirectories are required so that mounting is possible.
mkfs disknm.dsk
creates an initially empty file volume on the simulated
disk named disknm.dsk.
This returns an unsigned integer known as the file-system-handle.
This can be the line number in diskParams.dat of disknm.dsk. uint FileVolume::mount33fs(char
*mountPoint, uint fsHandle)mounts the file system given by the fsHandle on the directory
mountPoint. The method
should verify that a file system with the given handle exists, and that mountPoint is a reachable subdirectory. Return the
volume number (in the high 16-bits) and i-node number (in the low 16-bits) of
the mountPoint on success. On failure, return 0. Process SD remains as in Part P3 of the project. P4 is the name of the enhanced shell process of this part of the project. In the P4-to-SD pipe, P4 now writes two numbers: file-system-handle number, and the sector number. The NX of the shared memory segments RDSHM and WRSHM now becomes, similarly, two numbers.
P3 functionality is expected, so only the additional elements are
described below. Specifically mkdir and chdir should
now work in the context of mounted volumes, within any current directory,
not just the root. Below we assume that volumes were made on disks named D1 and D2 based on data stored
in diskParams.dat and their volume handles are 1 and 2 respectively.
Assume that current volume is 1. The /d1/d2 used below is just an example;
in general, it is a path name to a directory in the tree.
/d1/d2. The contents of file volume 2 are now
accessible. Print the composite number returned. The old
directory contents of /d1/d2 are now invisible; the new contents of /d1/d2
are the root directory contents of volume 2.mountmount and df for guidance on
what should be shown. /d1/d2. Note the missing
`n' in the spelling. The file volume 2 is now inaccessible.
The old directory contents of /d1/d2 are now visible.All submissions must be done in the OSIS Lab using the turnin program. We will be running your programs on the machines in OSIS Lab only. For part 4, the command to use looks like this:
/home/ceg433/ceg43300/bin/turnin P4 *.cpp *.hpp Makefile *.txt
![]() |
CEG 433/633:
Operating Systems
|
| Bonus points are awarded in recognition of good work and extra work, in addition to the max possible points. Quality is subjectively judged. Merely turning in a file will not receive full score. Some items have a cascading effect. Bonus points are extra credit points. | |
| Student | OSIS Login ID | Extra credit | Points |
| Item description | Max | Points |
| Makefile successfully builds P4 |
10 | |
Your testscript.txt
should be designed
so that all the |
10 | |
mount v1 dir-path-name (v1 is a volume
handle) |
10 | |
mount v2 dnm2 (v2 is a volume
handle, and dnm2 is a dir in the volume mounted above) |
10 | |
mount (shows mounted volumes) |
10 | |
umount |
10 | |
| write33file into a (non-root) subdirectory of a mounted volume | ||
| read33file from a (non-root) subdirectory of a mounted volume | ||
| mkdir and chdir work in the context of mounted volumes | 10 | |
| Extra credit points 50, if you implement transparent mount | E50 | |
| Extra credit points 50, if you implement the above and mount at least 4 layers | E50 | |
| Late submission: minus 2% per day late; Not accepted at all after 4 days | -2% | |
Files were not submitted using turnin program =
minus 10 points |
-10 | |
| Total | 100 |
| Copyright © 2009 pmateti@wright.edu |