Process Management Flashcards
The ____ of a process contains temporary data such as function parameters, return addresses, and local variables.
a. text section
b. data section
c. program counter
d. stack
D- STACK
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- ALL OF THE ABOVE
A _________________ saves the state of the currently running process and restores the state of the next process to run.
a. save-and-restore
b. state switch
c. context switch
d. none of the above
C- 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- ALL OF THE ABOVE
A blocking send() and blocking receive() is known as a(n) _________________.
a. synchronized message
b. rendezvous
c. blocked message
d. asynchronous message
B- RENDEZVOUS
A(n) ______________ allows several unrelated processes to use the pipe for communication.
a. named pipe
b. anonymous pipe
c. LIFO
d. ordinary pipe
A- NAMED PIPE
Imagine that a host with IP address 150.55.66.77 wishes to download a file from the web server at IP address 202.28.15.123. Select a valid socket pair for a connection between this pair of hosts
a. 150.55.66.77:80 and 202.28.15.123:80
b. 150.55.66.77:150 and 202.28.15.123:80
c. 150.55.66.77:2000 and 202.28.15.123:80
d. 150.55.66.77:80 and 202.28.15.123:3500
C
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- A PIPE IS TREATED AS A FILE DESCRIPTOR AND CHILD PROCESSES INHERIT OPEN FILE DESCRIPTORS FROM THEIR PARENTS
When a child process is created using the fork() system call, the child process is an exact copy of the parent process, including open file descriptors.
A process that has terminated, but whose parent has not yet called wait(), is known as a ________ process.
a. zombie
b. orphan
c. terminated
d. init
A- ZOMBIE
it is a process that has finished its task but is still being tracked by the operating system.
When a process completes its execution, it typically sends a termination status to its parent process and exits. The parent process is responsible for collecting this status information using system calls like wait() or waitpid(). Until the parent process collects this information, the child process remains in a zombie state.
The _______ process is assigned as the parent to orphan processes.
a. zombie
b. init
c. main
d. renderer
B- INIT
The init process, also known as process ID 1, is the first user-space process created by the Linux kernel during system startup. It has a special role in the operating system as the parent process of all other processes.
____ is a thread library for Solaris that maps many user-level threads to one kernel thread.
a. Pthreads
b. Green threads
c. Sthreads
d. Java threads
B- GREEN THREADS
Pthreads refers to ____.
a. the POSIX standard
b. an implementation for thread behavior
c. a specification for thread behavior
d. an API for process creation and synchronization
C- A SPECIFICATION FOR THREAD BEHAVIOR pthreads (POSIX Threads) is a specification for thread behavior. It defines a standard API for creating, manipulating, and synchronizing threads in a multi-threaded program
Cancellation points are associated with ____ cancellation.
a. asynchronous
b. deferred
c. synchronous
d. non-deferred
B- DEFERRED
Non-deferred cancellation, also known as asynchronous cancellation, is an alternative mechanism provided by the pthreads (POSIX Threads) API for thread cancellation. In contrast to deferred cancellation, non-deferred cancellation allows an immediate termination of the thread, regardless of its current execution state.
Synchronous cancellation does not rely on cancellation points. Synchronous cancellation refers to the immediate termination of a thread upon receiving a cancellation request, regardless of its current execution state. Synchronous cancellation allows the thread to release resources, complete critical sections, or perform necessary cleanup before termination.
Signals can be emulated in windows through ____.
a. asynchronous procedure calls
b. local procedure calls
c. remote procedure calls
d. none of the above
A- ASYNCHRONOUS PROCEDURE CALLS
By using APCs, you can deliver asynchronous notifications or perform actions in a target thread. This can be useful for implementing custom signal-like behavior or interrupting the execution flow of a specific thread.
Remote Procedure Call (RPC) is a mechanism used for inter-process communication (IPC) in distributed computing environments
_____ is not considered a challenge when designing applications for multicore systems.
a. Deciding which activities can be run in parallel
b. Ensuring there is a sufficient number of cores
c. Determining if data can be separated so that it is accessed on separate cores
d. Identifying data dependencies between tasks
B- ENSURING THERE IS A SUFFICIENT NUMBER OF CORES (other options are about ensuring there can be more than one core to begin with)