Operating Systems 2014F: Assignment 1

From Soma-notes
Revision as of 11:51, 5 September 2014 by Soma (talk | contribs)
Jump to navigation Jump to search

This Assignment is not yet finalized.

Please submit the answers to the following questions via CULearn by midnight on Wednesday, September 10, 2014.

  1. What is the difference between the fork and exec function in a UNIX environment? ( 1 point )
  2. What is a zombie process? ( 1 point )
  3. Give an example C program which creates a zombie process. Note that the shell by default will collect and destroy zombie processes and so you will need to avoid the shell destroying the zombie process during debugging. This can be done by delaying the parent exit (using sleep is one good way to do this). ( 2 points )
  4. Perform the modifications to your program above to avoid creating a zombie process. List the new program. ( 3 points )
  5. Permissions on Unix are grouped into three basic file operations. What are these file operations? ( 1 point )
  6. What does it mean to have execute permission on a directory? ( 1 point )
  7. What are the 6 basic file permissions within Windows? ( 1 point )
  8. What is the difference between the write and modify file permission in Windows? ( 1 point )
  9. Because all files are stored in a directory, under UNIX permission to delete, rename, and move files is determined by the users access rights on the directory the file is contained in. What attribute on the directory prevents those who can modify a directory from deleting files (hint: help on the chmod command may prove useful). ( 1 point )
  10. In Windows, a file can be associated with more than one group and each group can have different access permissions. On Unix, each file can only belong to one group and groups cannot contain other groups (groups can only contain users). Having said that, new groups can be created by the system administrator which are supersets of other groups (e.g., to create group C with members of A and B, just add all of A's and B's members to C). Given this, is it possible to develop an access permission scenario which would be impossible to implement in Unix but possible to implement in Windows? If yes, give an example. If no, explain why. ( 1 point )
  11. What does the PATH environment variable do? PWD? ( 1 point )
  12. What environment variable tells X applications where to find the X server which it should communicate with to display the output? ( 1 point )
  13. Dynamic libraries allow one copy of executable code to be used by many different processes on the system, without requiring that multiple copies of the code be stored on disk in different files. What are some problems that can arise when different programs use the same common DLLs (hint: ``DLL Hell)? ( 1 point )