1/99
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Q1
Q1
Unlike processor exceptions, interrupts are triggered by process executions.
False
Consider the memory hierarchy depicted in the figure.
-Registers
-cache
-main mem
-Electronic disk
(Above Volatile)
- magnetic disk
-optical disk
- mag tapes
The access times decrease as you traverse up the memory (tapes-to-registers) hierarchy.
True
To ensure efficiency and uninterrupted execution, processes executing in the user mode are allowed to disable timer interrupts.
False
The interrupt vector table allows the processor to quickly identify the precise kernel routine to handle interrupts, processor exceptions, and system call traps.
True
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.
False
The only way a process can execute a privileged instruction is when it is running in kernel mode.
True
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.
False
Processes running in user mode do not have full access to the system's hardware. To access sensitive resources from the systems, all processes must be mediated by the Operating System, which runs in kernel mode.
True
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.
True
Consider the memory hierarchy depicted in the figure.
The cost-per-bit increases as you traverse down (registers-to-tape) the memory hierarchy.
-Registers
-cache
-main mem
-Electronic disk
(Above Volatile)
- magnetic disk
-optical disk
- mag tapes
The access times decrease as you traverse up the memory (tapes-to-registers) hierarchy.
False
Q2
Q2
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.
False
The reason that the child executes the instruction after fork() is that the child's address-space is a bitwise identical copy of the parent, including the values of the program counter.
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 ____________.
a. 31425
b. 0
c. 27182
c. 27182
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 child is ____________.
a. 31425
b. 0
c. 27182
b. 0
When fork() fails, it is possible that a child may still be created.
False
Temporary variables of a function/method are allocated on the stack.
True
How many processes in the process tree, constructed by the code-snippet below, have no child?
for (int i = 1; i < 4; i++) {
if (childid = fork()) {
break;
}
}
1 or 1 (with margin: 0)
All processes in UNIX are created using the fork() system call.
True
Every process needs its own stack and heap.
True
Process creation using fork() results in a copy of the parent's memory image. Assume that a new program is not loaded into the child using the exec() command. After the fork() operation, when a variable is changed in the parent process, this change is reflected in the child process.
False
Q3
Q3
In the Producer-Consumer problem, if a bounded buffer is used, and the producer produces at twice the rate of the consumer, then the buffer will remain full and the producer will spend time waiting for the consumer to take items off the queue.
True
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
In UNIX a child process inherits any pipes that belong to its parent.
Ture
Servers are always launched as foreground processes.
False
A device driver is based on a standard interface that the kernel provides, allowing the OS to use the underlying hardware seamlessly.
True
RPC allows a process to invoke a function in another process over the network.
True
A FIFO pipe's lifespan is no longer than the process that created it.
False
After launching a process in the shell with a trailing '&' character, you can terminate it with CTRL + C.
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
Inter-process communications using message passing is significantly faster than using shared memory communications.
False
Q4
Q4
The overheads for scheduling kernel threads is almost as expensive as that for processes.
True
Regardless of the recursion depth of an executing thread, there can only be 1 frame on that thread's stack.
False
Threads within a process cannot share the process heap.
False
A single threaded process can only execute on one core, regardless of how many cores are available.
True
In a many-to-one threading model, when one of the user-level threads in the process makes a blocking call, other user-level threads can be scheduled for execution to maximize concurrency.
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.
Ture
A process with 4 threads has 5 program counters; one for each thread, and one for the process.
False
Threads within a process share the same program counter.
False
When a process crashes, some threads within that process can continue to operate.
False
Threads within a process must have their own stack.
True
Q5
Q5
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?
- Yes; processes will take turns entering the critical section.
- Yes; processes are assured progress.
- No; processes will never enter the critical section because they are busy waiting.
- 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.
For a set of processes involved in a race condition, the outcome depends on the order in which data accesses take place.
True
In Peterson's solution, bounded wait is possible because the algorithm allows processes to take turns entering the critical section.
True
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
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
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
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
A process may have multiple, unrelated critical sections.
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
Q6
Q6
There are no scenarios when a spinlock should be used instead of a semaphore or mutex.
False
The signal() operation on a monitor is not persistent. If a signal() is performed, and no process is waiting that signal is ignored.
True
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 T4
-T5
- T3 and T5
-T4
- T3 and T5
The binary semaphore can be used in settings involving more than two processes trying to coordinate accesses to the critical section.
True
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 undone?
-T3
-T3 and T4
-T5
-T4
-T4
Every instruction must execute within the confines of a thread, but that statement may be executed by multiple threads.
True
Timestamp-based locking protocols do not suffer from deadlocks.
True
Turnstiles are queue structures containing threads blocked on a lock. Turnstiles are associated with threads not objects.
True
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
A transaction can be context-switched in the middle of its execution.
True
Q7
Q7
The round-robin (RR) scheduling algorithm could result in starvation.
False
When writing programs, you must plan for context switches that occur during process execution.
False
Scenario: Consider a set of CPU-bound processes with known execution-times waiting to be scheduled at time T0. Also assume that no other processes will enter the system later.
Question: If the objective is to minimize the average waiting time, shortest job first will be the best way to ensure this.
True
In CFS, the quantum associated with a process might change depending on how many processes are ready for execution.
Ture
Several dominant OS such as Windows, Linux, and MacOS use the Multilevel Feedback Queue (MFQ) based scheduling algorithm.
Please indicate if the following statement about MFQ is true or false:
Tasks at a higher priority preempt lower priority tasks.
True
The shortest jobs first (SJF) scheduling algorithm provides optimal waiting times for a set of jobs that arrive simultaneously.
True
In the MFQ scheduling algorithm, the quantum associated with processes at the same level is identical.
True
As CPUs get faster, the average process becomes more and more CPU-bound.
False
Several dominant OS such as Windows, Linux, and MacOS use the Multilevel Feedback Queue (MFQ) based scheduling algorithm.
Please indicate if the following statement about MFQ is true or false:
Instead of only a single queue, MFQ has multiple round-robin queues. Each queue has a different priority level and time quanta.
True
The first-come, first-served (FCFS) scheduling algorithm could result in starvation.
False
Q8
Q8
Consider a situation where there are infinite instances of all different resources types in the system. Within a set of N processes, how many safe sequences are possible?
N!
1
N
N * N
N!
Using the following vector of available resources, along with currently allocated resources to each process and their maximum needs, determine if
Allocation Max Available
A B C A B C A B C
P0 0 1 0 7 5 3 2 3 0
P1 3 0 2 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
True
The Banker's Algorithm allocates resources to requests based on the order in which they arrive. They do not stall any requests for resource allocations.
False
The state of the system at time T0 is as depicted below. At time T1, P0 decides to request 2 more instances of resource B. Is it safe to satisfy this request?
Allocation Max Available
A B C A B C A B C
P0 0 1 0 7 5 3 2 3 0
P1 3 0 2 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
False
Deadlock prevention algorithms must target all four of the conditions: mutual exclusion, hold-and-wait, no preemption, and circular wait - to eliminate the possibility of deadlocks.
False
The Banker's Algorithm allows us to identify a safe sequence for a set of processes based on the current allocation of resources and the maximum needs of each process.
True
There are limits to the number of entries in the process table, open file tables, and such. To cope with deadlocks in such situations, it is common for the OS designers to first decide on the number of users N who would be concurrently active at a given time and then place restrictions on users based on this choice of N. That is, if the number of concurrent processes is restricted to say 30000 then each user is allowed to spawn a maximum of 30000/N processes.
False
A resource allocation graph is being used to represent resource requests by processes and allocation of resources to processes. In the system that we consider, there are multiple instances of a given resource type. In this resource allocation graph, the presence of a cycle in the directed edges representing the request and assignment edges for a set of resources and processes indicates that a deadlock has definitely occurred.
False
When logging into your team's Virtual Machine for the term project, what is the username you will use?
https://infospaces.cs.colostate.edu/watch.php?id=230
kubeuser
cs370user
minikube
cs370team
kubeuser
Once in your Virtual Machine for the term project, which command do you use to start a localized Kubernetes cluster?
minikube cluster --start
kubeadm init
kubectl start --driver=docker
minikube start --driver=docker
minikube start --driver=docker
Q9
Q9
Two processes A and B are executions of the same program X. This program X has an execution sequence that results in access to a hardcoded logical-memory location 0x100ACFFED. When there are two running instances of this program, such as processes A and B, this would mean that accesses from A and B to the hardcoded logical-memory location will result in accesses to two different physical memory locations.
TRUE
In segmentation, each segment can have different protections associated with it.
True
It is impossible to avoid internal fragmentation in contiguous memory allocations.
Ture
Dynamic linking results in wasted disk space and memory utilization because of the duplication inefficiency that can result in multiple copies of key libraries.
Fasle
A pure swapping-based approach brings the entire process in to memory at a time.
True
When using segmentation, it is not possible to have multiple logical address spaces within the same process.
False
In segmentation, each segment can be of a different size.
True
Since memory is several orders of magnitude faster than disk, compaction of memory spaces is viable and performed periodically (every second) by the OS in contiguous memory allocations.
False
It is impossible to avoid external fragmentation in contiguous memory allocations.
False
The defragmentation (or compaction) overhead for the swap space on disk is low enough that the OS can perform this operation periodically.
False
Q10- all duplicates
Q10- all duplicates