1/65
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
The cost-per-bit increases as you traverse down (registers-to-tape) the memory hierarchy. (T or F)
False
If in 2025 there is a technology that allows main memory to be just as fast as the CPU, then continuing to use a cache would be just as valid as it is now. (T or F)
False
Processes must be able to have read access permissions to regions in memory that belong to other processes to maximize performance and ensure high throughput. (T or F)
False
The code for the kernel is a small fraction of the codebase for the Operating System and provides core functionality for the OS processes to use. (T or F)
True
Main memory is managed by the ___________.
OS
The access times decrease as you traverse up the memory (tapes-to-registers) hierarchy. (T or F)
True
To ensure efficiency and uninterrupted execution, processes executing in the user mode are allowed to disable timer interrupts. (T or F)
False
Operating Systems act as a "glue" by making sure that users understand every mechanism of every device on a given computer system before using it. (T or F)
False
The ISA (Instruction Set Architecture) for most processors include instructions that operate on disk addresses in addition to those that operate on registers and memory locations. (T or F)
False
Caches are important because of the difference in speed between the CPU and main memory. (T or F)
True
END CHAPTER ONE
End of Chapter One
Temporary variables of a function/method are allocated on the stack. (T or F)
True
A single processor may be shared among several processes. (T or F)
True
Consider the code snippet:
childPID = fork()
The parent has a process-ID of 31425 and the newly created child has a process-ID of 27182.
The value of the variable childPID in the parent is ____________.
27182
The process control block (PCB) contains information about a process and is used during context-switching between processes. The PCB for every process is maintained in the cache. (T or F)
False - its stored in main memory
All processes in UNIX are created using the fork() system call. (T or F)
True
Allocation of memory is enough to make a program a process. (T or F)
False
To run the program, the kernel copies the instructions and data from the executable image into physical memory. (T or F)
True
When a child process is created with fork() it inherits its parent's group ID. (T or F)
True
ISA tracks IDs and process states. (T or F)
False
When fork() fails, it is possible that a child may still be created. (T or F)
False
END OF CHAPTER 2
END OF CHAPTER 2
An advantage of the Microkernel architecture is that since most functionality is provided as user processes, even if one of these user processes crashes, it does not result in a crash of the operating system.
True
A FIFO pipe's lifespan is no longer than the process that created it.
False
When performing IPC between processes using shared memory, it is the kernel's responsibility to ensure safety among processes by avoiding race conditions.
False
Processes D, E, and F all send a message to a mailbox owned by process A. Who can receive the messages that arrive in the mailbox owned by A?
- Only A
- Only the original sender and A
- D, E, F, and A
Only A
Consider a process A that has created a shared memory segment. If process B knows the memory address of this segment, process B does not need to attach itself to this segment and can directly access the shared memory. (T or F)
False
RPC allows a process to invoke a function in another process over the network.
True
Inter-process communications using message passing is significantly faster than using shared memory communications.
False
In UNIX a child process inherits any pipes that belong to its parent.
True
After launching a process in the shell with a trailing '&' character, you can terminate it with CTRL + C.
False
Ordinary pipes in Unix and Windows require a parent-child relationship.
True
END CHAPTER 3
END OF CHAPTER 3
Consider a Thread T1 that invoked method x, which resulted in the invocation of method y, which resulted in the invocation of method z.
All stack frames on the thread T1's stack must be of the same size.
False
The POSIX threading library includes routines to create multiple processes within a thread.
False
In the case of user-level threads, it is the programmer's responsibility to avoid lock-out situations by forcing CPU-bound threads within that process to yield control.
True
Though threads simplify sharing within a process, context-switching between threads within a process is just as expensive as context-switching between processes.
False
User-level threads within a process can only compete for processor resources allocated to the process.
True
The many-to-one thread model mapping multiple user-level threads to a kernel-level thread results in true concurrency.
False
When a process crashes, some threads within that process can continue to operate.
False
Temporary variables of a function/method are allocated on the stack.
True
Context-switching between threads is more time-consuming than context-switching between processes.
False
A single threaded process can only execute on one core, regardless of how many cores are available.
True
END OF CHAPTER 4
END OF CHAPTER 4
In Peterson's solution, bounded wait is possible because the algorithm allows processes to take turns entering the critical section.
True
Consider a system of n processes, each with a different critical section where common variables are being modified. At most 2 processes can execute in their critical section at the same time.
False
In the priority inheritance protocol, a process accessing a resource needed by higher priority process forces the higher priority process to lower its priority while it finishes resource usage.
False
For a set of processes involved in a race condition, the outcome depends on the order in which data accesses take place.
True
A process executing an atomic hardware instruction cannot be context-switched regardless of how many clock cycles it takes to complete that instruction.
True
The critical section is a segment of code where changes are made to resources (files, memory, etc.) shared by multiple processes.
True
Consider the code snippet below which someone claims is the entry section to the critical section for process Pi in Peterson's solution.
flag[i] = TRUE;
turn = i;
while (flag[i] && turn==i) {;}
Is this a valid entry section?
- No; processes will never enter the critical section because they are busy waiting.
- Yes; processes will take turns entering the critical section.
- Yes; processes are assured progress.
- No; processes don't have to wait to enter the critical section
No; processes will never enter the critical section because they are busy waiting.
In solutions to the critical section problem, processes that are executing in their remainder section make decisions about who gets to enter the critical section next.
False
Solutions to the critical section problem must target mutual exclusion but not necessarily bounded-wait.
False
Peterson's solution is a software solution to the critical section problem involving an arbitrary number of processes.
False
END OF CHAPTER 5
END OF CHAPTER 5
Spinlocks are suited for cases where critical section segments have thousands of lines of code.
False
In the FIRST readers-writers problem, no reader should wait for other readers to finish simply because a writer is waiting. In this case the readers may starve.
False
In the producer-consumer problem with a bounded-buffer, if the buffer is full and the producer is ready to add content, the size of the buffer is automatically extended to reduce producer wait times.
False
Assume a system crashes and is brought back up with the following checkpoint-based log.
/ begin of log //
// end of log //
Which transactions must be redone?
T3 and T5
Mutual exclusion is provided within a monitor.
True
Threads can be blocked on more than one object at a time.
False
The binary semaphore can be used in settings involving more than two processes trying to coordinate accesses to the critical section.
True
Every instruction must execute within the confines of a thread, but that statement may be executed by multiple threads.
True
Turnstiles are queue structures containing threads blocked on a lock. Turnstiles are associated with threads not objects.
True
The signal() operation on a monitor is not persistent. If a signal() is performed, and no process is waiting that signal is ignored.
True
END OF CHAPTER 6
END OF CHAPTER 6