Test 4 - File Systems and Security

CS 438, Operating Systems Concepts


  1. A colleague of yours, in an effort to help (l)users who accidently delete their un-backed-up files, has modified the file system to allocate disk blocks using next-fit. What specifically do you think your colleague's objective was in implementing this approach?


    Your colleague was probably trying to give the users an edge when they attempt to recover their files. Next-fit allocation uses a circular scan of the free list to determine the next free block to allocate. Because the freed blocks are behind the allocation pointer, it will probably take a while for the pointer to work its way around to the just de-allocated blocks, which should give the users enough time (or at least some extra time) to recover their lost files.

    Most of the answers were sorta correct in that everybody agreed that their colleague did good in implementing next fit, but they weren't exactly clear on why it was good.


  2. You are changing a file system that implements file pointers into a file system that doesn't have file pointers. What file-related system calls would have to change in your file system to adjust for the lack of file pointers? Explain how the system calls would change.


    The file pointer is the location within the file where reads and writes take place. Without a file pointer, reads and writes will have to indicate explicitly the locations within the file where I-O will take place, which is most easily done by adding a file-location parameter to read() and write(). Any lseek()-like system calls that manipulate the file pointer can be deleted,

    Most of the answers to this question were wrong, because they confused the concept of a file pointer with the type FILE * (which we never covered in class or in the text); the part about system calls in the question should have been the tip-off that the first version of file pointer was what was meant.


  3. You are implementing a file system that uses a Unix-style directory system and contiguous allocation. Describe the changes you would make to the Unix-style directory system (if there are any) to take advantage of contiguous allocation.


    You can pretty much gut the i-nodes of any block indirect data; now it only needs to keep the start and length (or end) of the contiguous block sequence allocated to the file.

    The answers to this question were either right or completely wrong, with the wrong answers appearing to be random.


  4. Explain how encryption can be used to implement both authentication and authorization.


    Private-key encryption uses a secret key to encrypt and decrypt information. By assigning each person a unique key, it becomes possible to match keys to persons, allowing authentication.

    Similarly, by assigning keys to services, it becomes possible to authorize an agent's access to a service by giving the service's key to the agent. The agent can then present the key to the service as proof that it is allowed to access the service.

    Again, everybody agreed that encryption could be used for authorization and authentication, but the details of how it was done were less common, although many answers helpfully defined authentication and authorization.



This page last modified on 15 December 2003.