Operating Systems and Systems Integration

Quiz 4: End Module 5, Prep Shell Programming

Do not refer to any printed material. No talking or discussion is allowed until the answer sheets are all collected.

Review:

1. The file /etc/fstab:

(A) determines which kernel to load at boot time (B) chooses filesystems the kernel will mount at boot time (C) determines whether the kernel supports the Ext3 filesystem type (D) determines the maximum number of open files (E) lists all filesystem types supported by the kernel

2. $ ls -ld directory
drwxr-xr--   3 lee students 48 Feb 11 09:10 directory

(A) members of group staff cannot list files in directory (B) members of group students can delete files in directory (C) It is impossible for user lee to be a member of group students (D) both user lee and members of group students can delete files in directory. (E) members of group students can change to directory

3. The program pppd has the set user id (suid) permission set:

$ ls -l pppd
-rwsr-xr-x  1 root nicku  184348 Sep  6 02:55 pppd

When user 012345678, who has primary group students, executes this program, the resulting process will: (A) be owned by the user root (B) be owned by the user 012345678 (C) have group owner nicku (D) have no group owner (E) be non-existent, since only root is allowed to execute a suid program

Preparation:

4. A shell script:

(A) cannot support normal programming using loops and function calls (B) is compiled into machine language before it is executed (C) is always optimised for performance, and executes faster than Java programs (D) is often used for system administration (E) can only be written by professional programmers

5. Select one statement that is most correct:

(A) There is very little documentation for shell programming, but the O’Reilly books are good

references (B) The man page for bash does not provide enough information about the language for a reference

guide (C) There is a free online book about shell programming (D) Shell programs are always quite long.

Nick Urbanik <nicku(at)nicku.org>  ver. 1.0