Deck 3: Understanding Processes and Threads in Operating Systems
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/29
Play
Full screen (f)
Deck 3: Understanding Processes and Threads in Operating Systems
1
Which of the following is not typically part of a process's address space?
A) text region
B) register region
C) data region
D) stack region
A) text region
B) register region
C) data region
D) stack region
register region
2
Which of the following is a synonym for "process"?
A) task
B) program
C) executable code
D) all of the above
A) task
B) program
C) executable code
D) all of the above
task
3
How many processes truly can execute concurrently in a system at any time?
A) any number
B) at least as many as there are processors
C) at most as many as there are processors
D) none of the above
A) any number
B) at least as many as there are processors
C) at most as many as there are processors
D) none of the above
at most as many as there are processors
4
Which of the following states is not a discrete process state?
A) running state
B) blocked state
C) ready state
D) unblocked state
A) running state
B) blocked state
C) ready state
D) unblocked state
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
5
Typically, the ready list of ready processes is maintained in ________ order, while the blocked list of blocked processes is ________.
A) prioritized, unordered
B) random, prioritized
C) alphabetical, ordered chronologically
D) chronological, prioritized
A) prioritized, unordered
B) random, prioritized
C) alphabetical, ordered chronologically
D) chronological, prioritized
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
6
When a user runs a program, processes are created and inserted into the ________ list.
A) running
B) ready
C) blocked
D) dispatched
A) running
B) ready
C) blocked
D) dispatched
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
7
________ assigns a processor to the first process in the ready list.
A) Initializing
B) Instantiating
C) Dispatching
D) Loading
A) Initializing
B) Instantiating
C) Dispatching
D) Loading
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
8
A process control block (PCB) typically includes which of the following information?
A) the process's execution context
B) the process state
C) the process identification number (PID)
D) all of the above
A) the process's execution context
B) the process state
C) the process identification number (PID)
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following typically is not part of a process's execution context?
A) general-purpose registers that store process data
B) process management registers
C) pointers to the process's parent and child processes
D) registers that store pointers to the process's address space
A) general-purpose registers that store process data
B) process management registers
C) pointers to the process's parent and child processes
D) registers that store pointers to the process's address space
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following statements is true?
A) A child process may belong to multiple parents at once.
B) Each parent process may create only one child process.
C) Spawning new processes yields a hierarchical process structure.
D) none of the above
A) A child process may belong to multiple parents at once.
B) Each parent process may create only one child process.
C) Spawning new processes yields a hierarchical process structure.
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following may occur when a process is destroyed?
A) The process's memory and other resources are returned to the system.
B) The destroyed process's children are destroyed.
C) The process is removed from any system lists or tables.
D) all of the above
A) The process's memory and other resources are returned to the system.
B) The destroyed process's children are destroyed.
C) The process is removed from any system lists or tables.
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
12
What operation is particularly useful for detecting security threats and debugging software?
A) dispatch
B) suspend
C) block
D) abort
A) dispatch
B) suspend
C) block
D) abort
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the following can occur?
A) A running process may suspend itself.
B) A running process may be suspended by a blocked process.
C) A running process may be suspended by a ready process.
D) none of the above
A) A running process may suspend itself.
B) A running process may be suspended by a blocked process.
C) A running process may be suspended by a ready process.
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
14
What must occur for a system to perform a context switch?
A) The kernel must save the current running process's execution context to the process's PCB.
B) The kernel must load the previous execution context of a ready process.
C) both a and b
D) none of the above
A) The kernel must save the current running process's execution context to the process's PCB.
B) The kernel must load the previous execution context of a ready process.
C) both a and b
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
15
An operating system must be designed such that ________.
A) context-switching time is maximized
B) context switches are transparent to processes
C) as many "useful" computations as possible are performed while switching contexts
D) all of the above
A) context-switching time is maximized
B) context switches are transparent to processes
C) as many "useful" computations as possible are performed while switching contexts
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
16
A(n) ________ is a set of instructions to be executed in response to a certain type of interrupt.
A) context switch
B) trap
C) interrupt handler
D) interrupt vector
A) context switch
B) trap
C) interrupt handler
D) interrupt vector
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
17
________ can be used instead of interrupts to inform the processor of changes in device status?
A) Polling
B) Querying
C) Exceptions
D) Events
A) Polling
B) Querying
C) Exceptions
D) Events
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
18
The interrupt vector ________.
A) is an array of pointers to PCBs of processes generating interrupts.
B) can be modified only by running processes.
C) is an array of pointers to interrupt handlers.
D) stores information about each interrupt that occurs.
A) is an array of pointers to PCBs of processes generating interrupts.
B) can be modified only by running processes.
C) is an array of pointers to interrupt handlers.
D) stores information about each interrupt that occurs.
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
19
Software-generated interrupts in the IA-32 architecture can be used to ________.
A) indicate errors occurring in hardware
B) perform system calls
C) indicate an I/O completion
D) none of the above
A) indicate errors occurring in hardware
B) perform system calls
C) indicate an I/O completion
D) none of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
20
What type of exception would occur in the IA-32 architecture if a process attempts to divide by zero?
A) fault
B) trap
C) abort
D) any of the above could occur
A) fault
B) trap
C) abort
D) any of the above could occur
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
21
________________ employs interprocess communication.
A) A text editor sending a document to a print spooler
B) A Web browser retrieving data from a distant server
C) A distributed application used to find large prime numbers
D) all of the above
A) A text editor sending a document to a print spooler
B) A Web browser retrieving data from a distant server
C) A distributed application used to find large prime numbers
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following statements about signals is true?
A) Signals often are used to pass data between processes.
B) All operating systems use the same set of signals.
C) Signals notify a process that an event has occurred.
D) all of the above
A) Signals often are used to pass data between processes.
B) All operating systems use the same set of signals.
C) Signals notify a process that an event has occurred.
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
23
When a process ________ a signal, the operating system responds to the signal using the default signal handler; however, when a process ________ a signal of a particular type, the operating system does not deliver signals of that type and does not respond to the signal.
A) masks, catches
B) ignores, masks
C) catches, masks
D) masks, ignores
A) masks, catches
B) ignores, masks
C) catches, masks
D) masks, ignores
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
24
A ________ send is an example of ________ communication that requires the sender to wait for receipt notification before continuing program execution.
A) blocking, synchronous
B) blocking, asynchronous
C) nonblocking, synchronous
D) nonblocking, asynchronous
A) blocking, synchronous
B) blocking, asynchronous
C) nonblocking, synchronous
D) nonblocking, asynchronous
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
25
Which of the following statements about pipes is true?
A) A pipe serves as a buffer through which two or more processes can exchange data.
B) The operating system synchronizes access to a pipe.
C) After a process reads data from the pipe, the data is removed from the pipe.
D) all of the above
A) A pipe serves as a buffer through which two or more processes can exchange data.
B) The operating system synchronizes access to a pipe.
C) After a process reads data from the pipe, the data is removed from the pipe.
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
26
Sending and receiving processes often use ________ to ensure that messages are properly received.
A) a receipt protocol
B) an acknowledgment protocol
C) a synchronization protocol
D) an authorization protocol
A) a receipt protocol
B) an acknowledgment protocol
C) a synchronization protocol
D) an authorization protocol
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following statements about UNIX processes is true?
A) The UNIX kernel allows user processes to modify PCBs as needed.
B) UNIX processes are provided with a range of physical addresses in which to store its code, data and stack.
C) The process table allows the operating system to access information regarding every process.
D) all of the above
A) The UNIX kernel allows user processes to modify PCBs as needed.
B) UNIX processes are provided with a range of physical addresses in which to store its code, data and stack.
C) The process table allows the operating system to access information regarding every process.
D) all of the above
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
28
When a child process is spawned, the UNIX fork system call returns ________ to the parent process and ________ to the child process.
A) a value of zero, the PID of the parent process
B) a value of one, the PID of the parent process
C) the PID of the child process, a value of zero
D) the PID of the child process, a value of one
A) a value of zero, the PID of the parent process
B) a value of one, the PID of the parent process
C) the PID of the child process, a value of zero
D) the PID of the child process, a value of one
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck
29
In UNIX systems, kernel processes often have ________ numerical priority values and typically have ________ scheduling priority than user processes.
A) positive, higher
B) positive, lower
C) negative, higher
D) negative, lower
A) positive, higher
B) positive, lower
C) negative, higher
D) negative, lower
Unlock Deck
Unlock for access to all 29 flashcards in this deck.
Unlock Deck
k this deck