Operating Systems Final

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

115. When a program marked SETUID is executed a. the process acquires an effective UID potentially different from its real UID. b. its UID is check to ensure it matches that of the owner of the directory in which the program's executable file is located. c. None of the above.

115. When a program marked SETUID is executed a. the process acquires an effective UID potentially different from its real UID.

53. How many bytes of data were contained on a punched card? a. 500 b. 80 c. 100

b. 80

70. The binary protection code in MINIX 3 has a. 11 bits. b. 9 bits. c. 8 bits

a. 11 bits

48. The operating system frequently translates a trap into a. a signal to the currently-executing process. b. a visible indication of the trap on the standard output device (usually a terminal). c. a decrement of the number of such traps that were originally permitted when the currently-executing process was started.

a. a signal to the currently-executing process.

15. How is possible that the fork system call can be used to create processes on so many different UNIX systems when we know that different machine language instructions are used by different processor architectures to invoke system calls? a. A fork function is provided for each unique system (and language), and it is this function that actually includes the specific machine language instruction(s) necessary to invoke the fork system call. b. The invocation of system calls is done from application programs using scripts that are interpreted by special code in the BIOS of every system. c. Every processor ever built can interpret a limited subset of instructions that are used to allow the execution of a limited set of system calls, including fork.

a. A fork function is provided for each unique system (and language), and it is this function that actually includes the specific machine language instruction(s) necessary to invoke the fork system call.

76. What instruction on the Intel X86 family of processors could be used to achieve the same effect as that provided by the IBM mainframe instruction used to assist in the implementation of mutual exclusion? a. Exchange (XCHG) b. Add (ADD) c. Load task register (LTR

a. Exchange (XCHG)

67. Which of the following is not a necessary condition for a good solution to the mutual exclusion problem? a. No assumptions may be made about the speeds of, or the number of processors. b. No process should have to wait forever to enter its critical section once it has indicated a desire to do so. c. No process should have to limit the size of the memory region it is using.

a. No assumptions may be made about the speeds of, or the number of processors.

74. Modern processors usually have special instructions that make implementation of solutions to the mutual exclusion problem much simpler. What is the name of an instruction found on IBM mainframe computer systems to support such operations? a. Test and set b. Signal and set c. Signal and wait

a. Test and set

44. Which of the following operating systems is most frequently used on high-end computer workstations and network servers? a. UNIX (or a derivative) b. DEC's VAX/VMS c. IBM's OS-390

a. UNIX (or a derivative)

63. A sequence of instructions that modifies, updates or accesses a resource shared by multiple threads or processes is called a. a critical section. b. a critical process. c. a threaded section.

a. a critical section.

119. The most common operating system structure is called a. a monolithic system. b. a virtual machine. c. a microkernel system.

a. a monolithic system.

97. The read and write system calls have three parameters. The second parameter is a. a pointer to an integer into which will be stored the number of bytes actually read or written when the call completes. b. an integer containing the file descriptor. c. a pointer to a buffer

a. a pointer to an integer into which will be stored the number of bytes actually read or written when the call completes.

86. When the buffer in the producer-consumer problem is completely full a. a producer that has created an object must block until an empty space becomes available in the buffer. b. additional consumer processes are created to handle the large number of objects. c. the size of the buffer is increased by fifty percent.

a. a producer that has created an object must block until an empty space becomes available in the buffer.

54. A process is a. a program in execution. b. the set of instructions executed in kernel mode by a system call. c. the set of control cards used to run a batch program.

a. a program in execution.

44. An interrupt vector is a. an array of interrupts, each of which is simultaneously generated by some special events. b. the directed path through the code or instructions comprising an interrupt handler. c. a one-dimensional array containing the addresses of interrupt handlers, indexed by interrupt number, and used in many processor architectures.

a. an array of interrupts, each of which is simultaneously generated by some special events.

126. In a monolithic system, system calls provided by the operating system a. are dynamically linked to a process that wants to use them. b. are requested by executing a kernel call or a supervisor call. c. are linked to every application program.

a. are dynamically linked to a process that wants to use them.

76. A block special file a. can be used to model a disk. b. is a virtual file that contains a list of blocked processes. c. can only appear in a mounted file system.

a. can be used to model a disk.

51. In most cases, sending a signal to a process that does not have an appropriate handler for that signal will a. cause termination of the process. b. cause the signal to be ignored. c. cause the signal to be queued until such time as the process registers an appropriate signal handler.

a. cause termination of the process.

114. The chmod system call a. changes the protection bits associated with a file. b. changes the mode associated with a terminal (raw, cbreak, or cooked). c. changes the base of the numbers used with the mod function.

a. changes the protection bits associated with a file.

81. Placing an ampersand after a command a. directs the shell to not wait for the command to complete before prompting for another command. b. causes the output of the command to be discarded. c. causes the command to be treated as a comment (that is, not executed).

a. directs the shell to not wait for the command to complete before prompting for another command.

52. The CMS system a. is a single-user interactive system commonly used with VM/370. b. was the first operating system used on the Intel 8080. c. none of the above.

a. is a single-user interactive system commonly used with VM/370.

38. The priority associated with an interrupt a. is higher for faster or more important devices than for slower or less important devices. b. is variable; it is up to the device to determine how important its interrupt should be. c. is always one smaller than the priority associated with the process currently being executed.

a. is higher for faster or more important devices than for slower or less important devices.

47. The process which generates a fault a. is the currently executing process. b. is the last process moved to the blocked state. c. is the process that was most recently terminated.

a. is the currently executing process.

118. The time system call a. returns the current time, in seconds, since midnight on on January 1, 1970. b. returns the total CPU time used in user and kernel mode by the current process. c. None of the above.

a. returns the current time, in seconds, since midnight on on January 1, 1970.

98. The lseek system call is used to a. specify the file offset of the next byte in a file to be read or written. b. seek in a file for a specified contiguous string of bytes. c. seek to the beginning of the next line in a file.

a. specify the file offset of the next byte in a file to be read or written.

8. A process is a. the activity of a processor in carrying out the actions associated with a set of instructions. b. one or more programs being executed by one or more processors. c. a static set of instructions and data for a processor.

a. the activity of a processor in carrying out the actions associated with a set of instructions.

72. If the x permission bit is set for a directory, then a. the directory may be searched. b. no files in the directory may be executed. c. the directory is being exclusively used by a user.

a. the directory may be searched.

49. System calls are a. the extended instructions provided by an operating system. b. calls from the operating system to device drivers. c. network requests made by a network or distributed operating system.

a. the extended instructions provided by an operating system.

35. Where is the unique identification of a process normally found? a. the process table entry for the process b. the entry for the process preceding it in the ready state c. the process ID register in the processor

a. the process table entry for the process

26. In which generation of computers was the first minicomputer developed? a. the third generation b. the fourth generation c. the second generation

a. the third generation

43. The Microsoft Windows operating system a. was originally a GUI that ran on top of MS-DOS. b. was originally a derivative of the NT operating system. c. was the first to run on a 32-bit processor.

a. was originally a GUI that ran on top of MS-DOS.

29. A request by a process for the current time of day a. will not likely cause the process to block. b. will cause a process to be moved to the ready state until the next 100-millisecond clock transition. c. will not cause a process to block as long as at least one other process has made the same request within the last second.

a. will not likely cause the process to block.

73. Peterson's solution to the mutual exclusion problem is much less cryptic than Dekker's solution. It also uses a turn variable. What else distinguishes Peterson's solution to the problem? a. His solution works only for systems with a single processor. b. His solution uses an array with one element per process to indicate which processes are interested in entering their critical sections. c. None of the other choices characterize Peterson's solution to the mutual exclusion problem.

b. His solution uses an array with one element per process to indicate which processes are interested in entering their critical sections.

75. The IBM mainframe instruction used to simplify the implementation of critical sections works by doing what? a. It disables interrupt recognition on all the processors in a group, not just a single processor like the earlier interrupt disabling techniques. b. It uses special atomic lock memory which is not the same as the ordinary memory available to processes. c. It eliminates the possibility of another process (or even another processor) examining the value of the control variable in memory between examining its value and then setting it to a known state.

b. It uses special atomic lock memory which is not the same as the ordinary memory available to processes.

28. What was the PDP-1? a. It was the first system to use multiprocessing. b. It was the first minicomputer. c. It was the first UNIX operating system.

b. It was the first minicomputer.

91. What happens when a signal is sent to a process, and the process has indicated it is willing to handle that particular signal? a. The process to which the signal was sent is terminated, and a new process begins execution with the signal handler. b. The signal handler for the signal is called, if the signal's delivery has not been blocked. c. A new process is created automatically to handle the execution of the signal handler; this process terminates when the signal handler returns.

b. The signal handler for the signal is called, if the signal's delivery has not been blocked.

70. Solutions to the mutual exclusion problem that require a process to check a lock variable repeatedly until it has a specified value, even if implemented correctly (that is, if they prevent multiple processes from entering their critical sections at the same time), still have a significant problem. What is that problem? a. The process that is waiting to enter its critical section is continually consuming the processor resource, checking and checking again, significantly delaying other processes from using the processor and potentially relinquishing their use of the desired resource. b. The solution will not work correctly on systems with multiple processors. c. The solution can only be correctly implemented on systems with multiple processors.

b. The solution will not work correctly on systems with multiple processors.

46. What is a major difference between a network operating system and a distributed operating system? a. A distributed OS always requires significantly more primary memory for each processor than a network OS. b. With a network OS, users are aware of the existence of multiple computers; a distributed OS appears to users as a traditional uniprocessor OS. c. A network OS obviously requires a network to connect the individual machines; a distributed OS only needs multiple processors (as in, for example, a modern multicore processor).

b. With a network OS, users are aware of the existence of multiple computers; a distributed OS appears to users as a traditional uniprocessor OS.

58. If threads are implemented as part of the kernel of an operating system, then a. they will not be able to use trap-generating instructions to request operating system services (that is, they will not be able to make system calls). b. a context switch is required each time a processor is switched between threads, even if the threads belong to the same process. c. they will be immune to the delivery of signals.

b. a context switch is required each time a processor is switched between threads, even if the threads belong to the same process.

109. In UNIX/LINUX/MINIX, a directory is essentially a. a set of (disk locations, ASCII name) pairs. b. a set of (i-number, ASCII name) pairs. c. a list of file names.

b. a set of (i-number, ASCII name) pairs.

123. The THE operating system was a. designed by Edgser Dijkstra at the University of Texas. b. a simple batch system organized as a set of layers. c. organized as a client-server system.

b. a simple batch system organized as a set of layers.

82. The objects that are being produced in the producer-consumer problem are generally characterized as a. data objects, like indications of keys pressed or released on a keyboard. b. a stream of bits, with variable numbers of bits used to represent actions to be taken by processes. c. static data items that cannot be altered by a process.

b. a stream of bits, with variable numbers of bits used to represent actions to be taken by processes.

120. When an monolithic operating system is constructed, a. the entire operating system kernel has its source code in a single file which is compiled and linked with each application program. b. all the files containing the code are compiled and linked together in a single object file. c. the individual functions are compiled, but are not linked with the remainder of the operating system kernel until a process requrests use of a service provided by that function.

b. all the files containing the code are compiled and linked together in a single object file.

83. The processes in the producer-consumer problem are assumed to run a. on the same single processor. b. at different and arbitrary rates, as is required by good solutions to race condition problems. c. at exactly the same rate

b. at different and arbitrary rates, as is required by good solutions to race condition problems.

42. An interrupt handler is not allowed to a. execute subroutine or function calls. b. block. c. be preempted.

b. block.

79. When a shell is given a user command to execute, it a. checks to see if the owner of the file containing the program to be executed has explicitly allowed the current user to execute the command. b. creates a child process to execute the command. c. searches for the command in its list of acceptable commands, and if found, executes the function for that command.

b. creates a child process to execute the command.

43. When an interrupt occurs, the type of interrupt is used to a. determine whether one or two additional instructions will be completed before the interrupt handler is executed. b. determine the location of the interrupt handler. c. determine which process will handle the interrupt

b. determine the location of the interrupt handler.

10. Processes may be created in UNIX systems by using which of the following system calls? a. pipe b. fork c. creat

b. fork

86. The first argument to the function with which the execution of a process begins a. a pointer to the process table entry for the process. b. is an integer that indicates the number of string arguments pointed to by entries in the second argument. c. a pointer to an integer that indicates the number of command line arguments.

b. is an integer that indicates the number of string arguments pointed to by entries in the second argument.

41. An interrupt handler a. runs only when a process is blocked. b. is the set of instructions executed as a result of an interrupt being reported to a processor. c. is the hardware device that connects an interrupt to a processor.

b. is the set of instructions executed as a result of an interrupt being reported to a processor

88. The sbrk system call a. is preferred by programmers over malloc. b. is used to change the size of the data segment for a process. c. is used to set breakpoints during a debugging session.

b. is used to change the size of the data segment for a process.

55. Which of the following resources does a thread not share with other threads in the same process? a. the resource usage quotas b. its stack c. none of the above

b. its stack

110. In many operating systems a block cache is used to a. record a list of modifications made to files so they can be repeated if the system or device should later fail. b. keep copies of recently used blocks to avoid having to repeatedly read them. c. keep track of which processes are blocked waiting on a disk read or write operation to complete.

b. keep copies of recently used blocks to avoid having to repeatedly read them.

93. Which of the following system calls may be used to send a signal? a. signal b. kill c. transmit

b. kill

107. In traditional UNIX/LINUX/MINIX file systems, a link is a. a pointer (perhaps one of many) identifying the disk addresses of the blocks comprising a file. b. may be used to allow a file to have multiple names, often in multiple directories. c. an alternate name for an i-node.

b. may be used to allow a file to have multiple names, often in multiple directories.

96. Which of the following system calls is probably the most heavily used? a. fork b. read c. close

b. read

100. The pipe system call, if successful, a. is only used by a shell to connect the standard output of one command to the standard input of another. b. results in the creation of two open file descriptors, one for reading, and one for writing. c. creates a virtual file that can then be opened for reading and writing.

b. results in the creation of two open file descriptors, one for reading, and one for writing.

101. Which of the following system calls may be used to change a terminal's mode to raw? a. ioctl b. tcsetattr c. setraw

b. tcsetattr

87. The regions of memory into which a MINIX 3 process are divided are a. prog (containing code), var (containing variables), and const (containing constants). b. text (containing code), data (containing variables), and stack. c. allocated using memory that originally belonged to the parent process.

b. text (containing code), data (containing variables), and stack.

51. One modern processor that provides hardware support for the ring mechanism is a. the Intel Pentium. b. the IBM PowerPC. c. all of the above.

b. the IBM PowerPC.

29. What was the last computer in the PDP series? a. the PDP-9 b. the PDP-11 c. the PDP-10 d. the PDP-7 e. the PDP-8

b. the PDP-11

78. In some systems with priority-based processes, a problem can occur that results in the highest priority ready process being prevented from running by a lower priority process. This problem is called: a. the lowest priority problem. b. the priority inversion problem. c. the inappropriate priority problem.

b. the priority inversion problem.

49. When a trap or an interrupt is successfully recognized by the processor, a. the processor is always switched into user mode. b. the processor is always placed in supervisor mode. c. the idle process is executed until the trap or interrupt has been processed.

b. the processor is always placed in supervisor mode.

9. Which of the following is not part of a process? a. the quotas (if any) associated with the use of various system resources by the process b. the processor on which the process is being executed c. the set of privileges associated with the user on whose behalf a process is being executed

b. the processor on which the process is being executed

45. The X Window system is a. an experimental Microsoft product that may eventually replace Windows. b. the windowing system most commonly found on UNIX systems. c. the predecessor to the Y Window system.

b. the windowing system most commonly found on UNIX systems.

122. In a monolithic system, it is common for the supervisor or kernel call instruction, or trap instruction, a. to result in the state of the executing process, including its memory image, to be saved on disk. b. to be located in a library procedure, possibly written in assembly language. c. to be executed immediately after the system call to which it is related has completed execution.

b. to be located in a library procedure, possibly written in assembly language.

61. A race condition exists when a. two or more threads/processes are attempting to use a set of resources in a manner that causes each of them to wait on a resource that one of the others holds. b. two or more threads/processes attempt to use a resource in a manner that doesn't guarantee consistency, c. a processor's clock become unstable and the execution of threads/processes proceeds in random order

b. two or more threads/processes attempt to use a resource in a manner that doesn't guarantee consistency,

50. The MULTICS operating system a. was designed as an illustration of the layering concept, but was never actually implemented. b. utilized hardware support for a series of concentric rings, with more privileged code executing running in smaller-numbered rings. c. None of the above.

b. utilized hardware support for a series of concentric rings, with more privileged code executing running in smaller-numbered rings.

28. A process is moved from the running state to the ready state a. when it is ready to move to the next stage of execution. b. when the scheduler decides another process is more suitable for execution (for example, a ready process has higher priority than a running process). c. when it has completed all input operations.

b. when the scheduler decides another process is more suitable for execution (for example, a ready process has higher priority than a running process).

34. What was the name of the most popular operating system used on Intel 8080 computer systems? a. OS-80 b. AOS c. CP/M

c. CP/M

27. What company developed the first minicomputer? a. GE b. IBM c. DEC

c. DEC

72. Dekker presented the first recognized solution to the mutual exclusion problem. What hardware property is assumed by his solution? a. Write operations by multiple processors to the same memory location will be done atomically. b. Dekker's solution requires that there be only a single processor. c. Dekker's solution requires that there be at least two processors.

c. Dekker's solution requires that there be at least two processors.

58. Which of the following will result in a signal being sent to a process? a. A process executes an illegal instruction. b. A timer set by a process expires. c. Each of the above will result in a signal being sent.

c. Each of the above will result in a signal being sent.

30. On which computer system was UNIX development first started? a. Bendix G15 b. IBM 360 c. PDP-7

c. PDP-7

23. In what programming language was MULTICS written? a. FORTRAN b. JOVIAL c. PL/I

c. PL/I

56. A shell is a. a representation of the memory region that will be used by a process that is being created. b. a process that is just a placeholder for another process that is being created. c. a process that reads commands and arranges for their execution.

c. a process that reads commands and arranges for their execution.

79. Suppose a low-priority process L holds a resource needed for the execution of a high-priority process H, but that L is prevented from running because a medium-priority process M is continually ready to run, and only a single processor is available. What is the name of an algorithm that could be used to deal with this problem? a. priority adjustment b. reverse sorting c. aging

c. aging

55. A process table is a. a table that maps from user IDs to process IDs. b. a table that maps from user IDs to the primary memory regions occupied by processes. c. an array or linked list of structures with one entry for each process in existence.

c. an array or linked list of structures with one entry for each process in existence.

36. Interrupts are used to notify the processor of various events, usually those related to the hardware. For example, notifying the processor that a disk input/output operation has completed is generally sent as _____ notification. a. a low-priority b. a preemptive c. an asynchronous

c. an asynchronous

74. A mounted file system is a. one that has been copied from a removable device. b. immutable (that is, it cannot be modified). c. attached to a directory using the mount system call.

c. attached to a directory using the mount system call.

23. If a process is waiting on keyboard input from a user, then it will be in the ____ state. a. running b. ready c. blocked

c. blocked

69. A process can change its current working directory a. by closing the current working directory and opening the new working directory. b. by writing the new working directory name into the root directory. c. by issuing the appropriate system call.

c. by issuing the appropriate system call.

116. The umask system call a. masks the UID and GID associated with the owner of an executable file. b. removes any mask associated with the UID or GID of the owner of an executable file. c. can be executed by ordinary user processes.

c. can be executed by ordinary user processes.

112. The chdir system call a. changes the name of a directory. b. adds or removes a directory entry. c. changes the current working directory for a process.

c. changes the current working directory for a process.

46. A trap can be generated for each of the following reasons except a. attempting to execute an invalid instruction. b. executing an INT instruction on an Intel x86 processor. c. completing a disk operation.

c. completing a disk operation.

105. Which of the following system calls can be used to control advisory file locking? a. lock b. alock c. fcntl

c. fcntl

85. Access to the buffer in the producer-consumer problem a. is always permitted for producers, but consumers must obtain explicit permission from a producer to access the buffer. b. is controlled by the last object removed from the buffer. c. is shared by producers and consumers, and so must occur only inside a critical section.

c. is shared by producers and consumers, and so must occur only inside a critical section.

39. If an interrupt is masked a. it will be reported to the processor only after all other masked interrupts have been reported. b. it causes all other interrupts to be ignored until it has been recognized by the processor. c. it will not be reported to the processor, but it remains pending.

c. it will not be reported to the processor, but it remains pending.

65. The most obvious condition necessary for a good solution to the race condition problem is that a. no two processes may be simultaneously inside their critical sections. b. no two processes may be blocked at the same time. c. no two processes may be sharing any region of memory at the same time.

c. no two processes may be sharing any region of memory at the same time.

45. A trap a. is a debugging tool used to diagnose processor hardware problems. b. a type of interrupt that can be disabled by a user process. c. occurs synchronously with the execution of an instruction.

c. occurs synchronously with the execution of an instruction.

52. Which of the following will usually cause the generation of a SIGINT signal in a UNIX system? a. a memory protection error b. division by zero c. pressing the control-C key

c. pressing the control-C key

106. The rmdir system call is used to a. remove a directory; any files it previously contained are moved to its parent directory. b. remove a directory if it is empty. c. remove a directory and any files it contains.

c. remove a directory and any files it contains

99. The dup system call a. duplicates the contents of a file and gives it a new file name. b. repeats the last read or write operation on a file, but at the updated file offset. c. returns a file descriptor that references the same file as another that referenced by another open file descriptor.

c. returns a file descriptor that references the same file as another that referenced by another open file descriptor.

90. Which system call may be used by a process to announce that it is prepared to handle a particular type of signal? a. signal_setup b. ssig c. sigaction

c. sigaction

111. In MINIX 3 (and other similar UNIX systems), the sync system call a. synchronizes the system time with the time from a well-known stable time source. b. causes the block cache to be cleared. c. tells the system to begin writing all modified blocks back to the devices from which they were originally read.

c. tells the system to begin writing all modified blocks back to the devices from which they were originally read.

40. What processor was first used in the Apple Macintosh? a. the Intel Xeon b. the Sun SPARC c. the Motorola 68000

c. the Motorola 68000

59. If threads are implemented through user library functions, then a. providing the memory sharing required for threads will be much more difficult than if a kernel thread implementation was used. b. each thread must necessarily have a separate stack, which is not required with a kernel thread implementation. c. there is much less overhead (due to context switches) required when switching from one user thread to another in the same process.

c. there is much less overhead (due to context switches) required when switching from one user thread to another in the same process.

14. Recall that special trap instructions (like INT on Intel X86 processors and SVC on IBM mainframes) are often used to invoke system calls. For high-level languages, these instructions are a. only executed in supervisor, kernel, or privileged mode. b. only executed by a special process charged with the interface between user processes and the kernel of the operating system. c. usually found in libraries of functions specific to the language and the operating system being used.

c. usually found in libraries of functions specific to the language and the operating system being used.

26. A process is moved from the running state to the blocked state a. when it has completed execution. b. when a more appropriate process becomes ready to execute, and the scheduler decides to preempt it. c. when it requests a resource that is not currently available, but which will become available in the future.

c. when it requests a resource that is not currently available, but which will become available in the future.

88. Assume a producer process is blocked while waiting on empty space in the buffer. In this case, a consumer process a. change its priority to be at least as high as that of the the blocked producer process. b. will remove and discard sufficient data objects (from the buffer) to make space available for the blocked producer to place additional objects in the buffer. c. will awaken a producer when it removes an object from the buffer, allowing space for the producer to place another object.

c. will awaken a producer when it removes an object from the buffer, allowing space for the producer to place another object.


Set pelajaran terkait

NUR 1068 Health Assessment Ch 14- Assessing skin, hair, and nails

View Set

Lab Practicum #2 Question Set - 7. Oxidase Test

View Set

Alabama Insurance License- Alabama Insurance Law Common to All Lines

View Set

Life insurance - practice test questions

View Set