Quiz 2 Flashcards
After a “fork()” system call, what does the OS return to the parent process?
Process ID (PID) of the new child process
Why does a parent process perform a “wait()” system call?
So it knows when the child process terminates
What are the names of the six items in the PCB?
PID, process state, program counter (PC), CPU registers, memory management information, scheduling and account information
What are two main mechanisms for IPC?
Shared memory and message passing
What are the names of different states in the process state diagram?
new, ready, running, waiting, terminated, suspended
In what situation would the “ready queue” become empty?
When there are no processes in the system that are ready to execute
What is the task of the medium-term scheduler?
Process swapping
How many processes can communicate with a process that has shared memory segment?
No fixed limit
The ____ of a process contains temporary data such as function parameters, return addresses, and local variables
stack
A process control stack ___
A) Includes information on the process’s state
B) Stores the address of the next instruction to be processed by a different process
C) Determines which process is to be executed next
D) Is an example of a process queue
A
The list of processes waiting for a particular I/O device
Device queue (or I/O queue)
The _____ refers to the number of processes in memory
Degree of multiprogramming
When a child process is created, which of the following is a possibility in terms of the execution or address space of the child process?
A) The child process runs concurrently with the parent
B) The child process has a new program loaded into it
C) The child is a duplicate of the parent
D) All of the above
D
A ______ saves the state of the currently running process and restores the state of the next process to run
Context switch
A process may transition to the ready state by which of the following actions?
A) Completion of an I/O event
B) Awaiting its turn on the CPU
C) Newly-admitted process
D) All of the above
D
In a(n) ____ temporary queue, the sender must always block until the recipient receives the message
Zero capacity
A blocking send() and blocking receive()
Synchronized message
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
B
When communicating with sockets, a client process initiates a request for a connection and is assigned a port by the host computer. Which of the following would be a valid port assignment for the host computer?
A) 21
B) 23
C) 80
D) 1625
D
A()n ______ allows several unrelated processes to use the pipe for communication
Named pipe
Which of the following statements is true?
A) Shared memory is typically faster than message passing
B) Message passing is typically faster than shared memory
C) Message passing is most useful for exchanging large amounts of data
D) Shared memory is far more common in operating systems than message passing
A
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
B
Which of the following statements is true?
A) Named pipes do not allow bi-directional communication
B) Only the parent and child processes can use named pipes for communication
C) Reading and writing to ordinary pipes on both UNIX and Windows systems can be performed like ordinary file I/O
D) Named pipes can only be used by communicating processes on the same machine
C
Which of the following is not a process type in the Chrome browser?
A) Plug-in
B) Renderer
C) Sandbox
D) Browser
C