CMSC 412 Final (Spring 2003)


1.)                  (25 points) Define (or explain) the following terms:

a)       IPC

b)       Bakery Algorithm

c)       Contiguous Allocation

d)       Mutual Exclusion

e)       Encapsulation

2.)                  (20 points) Variable Geometry Disk Drives

a)       Explain how there can be a performance (speed of access) advantage for using variable geometry disk drives vs. having a fixed number of sectors/track for all tracks.

b)       If a variable geometry disk with 10 heads and 60 tracks has three zones of 20 tracks each with 20, 30, and 40 sectors/track, what is the capacity of the drive in sectors?

3.)                 (15 points) Show the routing table entries for the following situation.  The default route is through host C. Route all traffic to 128.8.128.* through host A, route all other traffic to 128.8.*.* to host B.


Net Mask

Next Hop













4.)                  (30 Points) Implement a hybrid synchronization interface that uses a busy wait with atomic-swap and semaphores to provide mutual exclusion.  The implementation should call atomic-swap at most 100,000 times and if it has not acquired mutex, it should use a semaphore to block.  Show the fields needed in the supplied struct.

struct {

} hybridMutex;

Lock(struct hybridMutex *m)

UnLock(struct hybridMutex *m)

5.)                  (20 Points) Filesystems

a)       Sally Smart coder claims that the size field in the GOSFSfileNode is not needed because she can tell how big a file is by looking at the block numbers (she used a block number 0 to indicate if a block was not used) to tell how many are valid.  Why is she wrong?

b)       ACLs in project 5 were limited to 4 entries.  Explain how you could extend GOSFS to support ACLs with up to 1024 entries without adding any fields in the GOSFSfileNode. Describe where the info would be stored and how it would be located.

typedef struct {

    unsigned int uid:28;

    unsigned int permission:4;

} aclEntry;

typedef struct {

    int size;                   // size of the file

    unsigned int isUsed:1;      // is entry active

    unsigned int isDirectory:1; // is this file or a directory

    unsigned int isSetuid:1;    // run with owner's uid/

    int blocks[10];             // 8 direct 1 indirect 1 double indirect       

    aclEntry acls[4];           // first entry is defined to be owner

} GOSFSfileNode;


6.)                 (20 points) When using UNIX style password files, it is not a major problem if normal users are able to read the password file. Explain in detail why this is the case.

7.)                  (20 points) If your project 3 had used a separate page table for the kernel (rather than the low half of the user process table), how would you have to change the Copy_From_User function?

Web Accessibility