Exam Questions Chapter 3 Processes - Operating System Concepts 10e Complete Test Bank by Abraham Silberschatz. DOCX document preview.
Chapter 3
Multiple Choice Questions
1. Which of the following contains dynamically allocated data during program run time?
A) text section
B) data section
C) heap section
D) stack section
Feedback: 3.1.1
Difficulty: Easy
2. Which of the following contains the executable code?
A) text section
B) data section
C) heap section
D) stack section
Feedback: 3.1.1
Difficulty: Easy
3. Which of the following contains global data?
A) text section
B) data section
C) heap section
D) stack section
Feedback: 3.1.1
Difficulty: Easy
4. Which of the following contains memory allocated by malloc()?
A) text section
B) data section
C) heap section
D) stack section
Feedback: 3.1.1
Difficulty: Easy
5. Which of the following memory space dynamically grows from high memory to low memory?
A) text section
B) data section
C) heap section
D) stack section
Feedback: 3.1.1
Difficulty: Easy
6. Which of the following process state will be switched from “running” state when an interrupt occurs?
A) ready
B) terminated
C) waiting
D) new
Feedback: 3.1.2
Difficulty: Easy
7. Which of the following process state will be switched from “running” state when an I/O event occurs?
A) ready
B) terminated
C) waiting
D) new
Feedback: 3.1.2
Difficulty: Easy
8. Which of the following process state will be switched from “ready” state?
A) ready
B) terminated
C) waiting
D) running
Feedback: 3.1.2
Difficulty: Easy
9. Which of the following data structure is used to manage the processes in Linux?
A) tree
B) linked list
C) hash map
D) stack
Feedback: 3.2
Difficulty: Easy
10. Which of the following structures defines the process control block for Linux system?
A) task_struct
B) files_struct
C) mm_struct
D) schedu_entity
Feedback: 3.2
Difficulty: Medium
11. What is the degree of multiprogramming for a single-processor system?
A) 0
B) 1
C) 2
D) 3
Feedback: 3.2
Difficulty: Easy
12. Which of the following is true?
A) An I/O-bound process is one that spends more of its time doing I/O than it spends doing computations
B) An I/O-bound process is one that spends more of its time doing computations than it spends doing I/O
C) Both A and B
D) None of the above
Feedback: 3.2
Difficulty: Easy
13. Which of the following cases could force a process removed from the CPU?
A) I/O request
B) fork a child
C) interrupt or time slice expired
D) all of the above
Feedback: 3.2.1
Difficulty: Medium
14. The list of processes waiting to execute on a CPU is called a(n) ____.
A) standby queue
B) device queue
C) ready queue
D) interrupt queue
Feedback: 3.2.2
Difficulty: Easy
15. Which of the following selects from among the processes that are in the ready queue to execute and allocate the CPU to one of them?
A) CPU scheduler
B) context switch
C) swapping
D) job scheduler
Feedback: 3.2.2
Difficulty: Easy
16. If process P0 is switched to process P1, state for P0 will be saved into ____, and state from ___ will be reloaded?
A) PCB0, PCB0
B) PCB0, PCB1
C) PCB1, PCB0
D) PCB1, PCB1
Feedback: 3.2.2
Difficulty: Medium
17. The ________ application is the application appearing on the display screen of a mobile device.
A) main
B) background
C) display
D) foreground
Feedback: 3.2.3
Difficulty: Easy
18. What is done by command “spy -el” on Unix and Linux systems?
A) list complete information for all processes currently active in the system
B) list complete information for all processes currently running in background
C) list complete information for all files currently open in the system
D) list complete information for all folders currently open in the system
Feedback: 3.3.1
Difficulty: Easy
19. Which of the following system calls is used to have a new program loaded into the new process’s memory space?
A) fork()
B) exec()
C) wait()
D) exit()
Feedback: 3.3.1
Difficulty: Easy
20. Which of the following system calls is used to let the parent process create a child process?
A) abort();
B) wait();
C) fork();
D) exec().
Feedback: 3.3.1
Difficulty: Easy
21. Which of the following IPC mechanism is easier to implement in a distributed system?
A) shared memory
B) message passing
C) socket communication
D) ordinary pipe
Feedback: 3.4
Difficulty: Easy
22. Which of the following is not a process type in the Chrome browser?
A) Plug-in
B) Renderer
C) Sandbox
D) Browser
Feedback: 3.4
Difficulty: Medium
23. Assume the shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. Which of the following is true?
A) The buffer is empty when in == out; the buffer is full when ((in + 1) % BUFFER SIZE) == out;
B) The buffer is full when in == out; the buffer is empty when ((in + 1) % BUFFER SIZE) == out;
C) All the elements of the buffer can be used;
D) Both A and C
Feedback: 3.5
Difficulty: Medium
24. Which of the following is true in a Mach operating system?
A) All messages have the same priority.
B) Multiple messages from the same sender are guaranteed an absolute ordering.
C) The sending thread must return immediately if a mailbox is full.
D) It is not designed for distributed systems.
Feedback: 3.7.2
Difficulty: Medium
25. Child processes inherit UNIX ordinary pipes from their parent process because:
A) The pipe is part of the code and children inherit code from their parents.
B) A pipe is treated as a file descriptor and child processes inherit open file descriptors from their parents.
C) The STARTUPINFO structure establishes this sharing.
D) All IPC facilities are shared between the parent and child processes.
Feedback: 3.7.4.1
Difficulty: Medium
Short Answer Questions
1. Name and describe the different states that a process can exist in at any given time.
Feedback: 3.1.2
Difficulty: Medium
2. Explain the main differences between a short-term and long-term scheduler.
Feedback: 3.2.2
Difficulty: Medium
3. Explain the difference between an I/O-bound process and a CPU-bound process.
Feedback: 3.2.2
Difficulty: Medium
4. Explain the concept of a context switch.
Feedback: 3.2.3
Difficulty: Easy
5. Ordinarily the exec() system call follows the fork(). Explain what would happen if a programmer were to inadvertently place the call to exec() before the call to fork().
Feedback: 3.3.1
Difficulty: Medium
6. Explain the fundamental differences between the UNIX fork() and Windows CreateProcess() functions.
Feedback: 3.3.1
Difficulty: Medium
7. Describe how UNIX and Linux manage orphan processes.
Feedback: 3.3.2
Difficulty: Medium
8. Explain why Google Chrome uses multiple processes.
Feedback: 3.4
Difficulty: Medium
9. Name the three types of sockets used in Java and the classes that implement them.
Feedback: 3.8.1
Difficulty: Medium
10. What is a loopback and when is it used?
Feedback: 3.8.1
Difficulty: Medium
11. Explain the purpose of external data representation (XDR).
Feedback: 3.8.2
Difficulty: Hard
12. Explain the term marshalling.
Feedback: 3.8.2
Difficulty: Medium
13. Explain the terms "at most once" and "exactly once" and indicate how they relate to remote procedure calls.
refers to making sure that the message is executed on the server once and only once so that there is a guarantee that the server received and processed the message.
Feedback: 3.8.2
Difficulty: Hard
14. Describe two approaches to the binding of client and server ports during RPC calls.
Feedback: 3.8.2
Difficulty: Hard
True/False Questions
1. The difference between a program and a process is that a program is an active entity while a process is a passive entity.
Feedback: 3.1.1
Difficulty: Easy
2. For a single-processor system, there will never be more than one process in the Running state.
Feedback: 3.1.2
Difficulty: Easy
3. The iOS mobile operating system only supports a limited form of multitasking.
Feedback: 3.2.3
Difficulty: Medium
4. The exec() system call creates a new process.
Feedback: 3.3.1
Difficulty: Easy
5. init is the very first process for a typical Linux system.
Feedback: 3.3.1
Difficulty: Easy
6. All processes in UNIX first translate to a zombie process upon termination.
Feedback: 3.3.2
Difficulty: Hard
7. Background processes are not apparent to users.
Feedback: 3.3.2
Difficulty: Easy
8. All access to POSIX shared memory requires a system call.
Feedback: 3.7.1
Difficulty: Easy
9. The Mach operating system treats system calls with message passing.
Feedback: 3.7.2
Difficulty: Medium
10. Local Procedure Calls in Windows XP are similar to Remote Procedure Calls.
Feedback: 3.7.3
Difficulty: Easy
11. Using a section object to pass messages over a connection port avoids data copying.
Feedback: 3.7.3
Difficulty: Medium
12. Sockets are considered a high-level communications scheme.
Feedback: 3.8.1
Difficulty: Medium
13. Ordinary pipes in UNIX require a parent-child relationship between the communicating processes.
Feedback: 3.7.4.1
Difficulty: Easy
14. Ordinary pipes in Windows require a parent-child relationship between the communicating processes.
Feedback: 3.7.4.1
Difficulty: Easy
15. Ordinary pipes are unidirectional, allowing only one-way communication.
Feedback: 3.7.4.1
Difficulty: Easy
16. The communication with named pipes requires parent-child relationship.
Feedback: 3.7.4.2
Difficulty: Easy
Document Information
Connected Book
Operating System Concepts 10e Complete Test Bank
By Abraham Silberschatz