R. Clayton (rclayton@monmouth.edu)
(no date)
Even though your specification for programming assignment 4 states that file
size grows dynamically, can i assume that any disk file has a fixed, maximum
file size?.
Apart from assuming no file can be larger than the available disk space, you
cannot assume fixed-length files (or files of some maximum fixed length); you
should follow the spec and implement files of dynamic size.
I ask because each time a new block is added the file the metadata has to be
updated, which I think is somewhat difficult to implement if disk writes do
not work.
Disk writes do work; otherwise you couldn't have implemented paging. The
simulator reads the whole batch disk and operates on it in-memory. Disk I-O
operations work to and from the in-memory disk copy. When the simulator ends,
and if the disk copy has been modified, the simulator writes out the modified
disk to the file results.dsk. This is why you don't have to worry about
overwriting the input disk.
If that's what your worried about (which you shouldn't be), then assuming
fixed-length files (which you cannot do) isn't going to help you much. You'll
also have to assume (which you also cannot do) a fixed number of files overall.
This archive was generated by hypermail 2.0b3 on Fri Aug 23 2002 - 19:30:05 EDT