COMP 3100 Ragsdale Final
s = 0 initially. Process p1 executes the sequence: P(s); V(s); P(s); Process p2 executes the sequence: V(s); V(s); P(s) What is the value of s now?
0
A semaphore used for mutual exclusion has an initial value of ___.
1
In a process creation hierarchy, how many links can a regular process have at the next higher level?
1
To select the next process to run, the scheduler should be called how many times?
1
Processes P1 and P2 execute on a system with a single CPU and 2 identical I/O devices. Each process executes a compute-bound phase followed by an I/O-bound phase. The system uses multiprogramming without time-sharing. The following table shows the lengths of each phase. Compute I/O P1 10 40 P2 20 70 With multiprogramming, the computation terminates at time _____________.
100
Given the following table, compute the ATT for the three processes p1, p2, and p3 using SJF scheduling. Give your answer to one decimal. Arrival Time Total CPU Time p1 0 4 p2 2 5 p3 3 1
4.66
Two processes, p1 and p2, arrive at time 0 and start executing using MLF scheduling with 5 priority levels. The total CPU time of p1 is 50 time units, and p2 is 10. The quantum is Q = 10 at level 5 and is doubled at each lower level. The context switching time is negligible and therefore is ignored. What is the ATT assuming p1 goes first?
40
Which computer generation led to the development of the personal computer?
4th
The following sequence of CPU bursts have been observed: T0= 5, T1=8, and T2 = 10. Assume that 6 is the initial CPU burst estimate (S0). Use (.6) as the weighting factor alpha. Use the exponential averaging equation to predict future bursts: S(N+1) = (alpha)T(N) + { 1 - alpha} * S(N) The question posed is what is the predicted burst S? (Always round to one decimal in your calculations)
8.7 - 8.9
Which statement is true in a system with single-unit resources?
A deadlock in the wait-for-graph implies that a cycle exists
Improving system performance is achievable with which solution?
Additional physical CPUs
In an RCB data structure, what value type identifies a single-unit resource state?
Boolean
A process repeatedly executes a loop while waiting for a condition to change. As a result, CPU resources are wasted. This behavior is characteristic of which operation?
Busy-waiting
Processes A - E are related as follows: A has a younger sibling B. B has children C and D (C is older). D has one child E. Organizing these processes without using linked lists, which point to its children, requires a younger sibling and older sibling pointer in each child pcb node of the parent. D would, therefore, have the following pointers: 1) a pointer (p)arent to B, 2) a pointer (c)hild to E, 3) a pointer os to ____, and a pointer ys to NULL.
C
Depending on the OS in use, what happens first when a process is destroyed?
Child processes are destroyed.
A test-and-set machine instruction has a form of TS(R, x) where R is a register and x is a memory location. What operations are performed with R and x?
Copy x to R, then set x to 0.
A user opens Microsoft Word on a computer. As a result, what action does the OS perform?
Creates a new process
How can one detect a deadlock in a resource allocation graph?
Execute a graph reduction algorithm
A resource request can be initiated b y any process, regardless of the process's current state.
False
In a multi-threaded process the PCB is replaced by multiple TCBs.
False
Minimizing the elapsed timme from the pressing of a system's enter key until the response arrives is the goal of which process type?
Interactive
The 3rd generation of computers featured this OS type.
Interactive multi-user OS
For time-sharing to work between applications, which technique should be used?
Interrupt
An operating system is responsible for which task?
Loading an application into memory
___ is a concept that determines when a process should enter the ready state and start competing for the CPU.
Long-term scheduling
A set of all resources a process may request is known as which claim type?
Maximum
A pointer data type represents which process control block field?
Memory
Which technique improves system resource utilization by holding active programs in memory while the programs wait for I/O completion or for an event to take place?
Multiprogramming
Which function would cause the state transition running -> ready?
OS Scheduler
Which PCB field maintains a list of printers being used by the process?
Other_resources
An operating system tracks each process by utilizing which data structure to hold information?
PCB
A system that uses multiprocessors is capable of carrying out operations in which way?
Parallel
An application process is in a running state. Which process control block field cannot change?
Parent
Which paramater defines the time interval in which a repeating computation must be completed?
Period
An application can be structured as a collection of cooperating processes. Which of the following is not an advantage of the approach?
Program size is decreased
Vacuum tube based computers have which defining characteristic?
Programs on punch cards
A process in the _____ state has the necessary resources but the CPU is not available.
Ready
When executing the create process function, the process_state field is set to what value?
Ready
Which graph acts as an extension of the general resource allocation graph?
Resource claim graph
A process in the __ state has the necessary resources and control of the CPU.
Running
The ___ scheduling algorithm typically results in the shortest ATT.
SRT
When an operating system loads, the operating system may present a command interpreter. What type of interface is the interpreter?
Shell
Exponential averaging can predict total CPU time for which type of scheduling?
Short-term
Which algorithm schedules processes according to the total CPU time requirements.
Shortest Job First (SJF)
An application makes a system request of an operating system service. The application made which type of call?
Supervisor
The general semaphore s = -5 means that 5 processes executed P(s) when s was less or equal to 0 and thus became blocked on s.
TRUE
Process 1 is the child of process 0. Process 0 creates a new child 2. Which statement is true with the list-free implementation?
The parent pointer of process 2 is 0.
A computer system is running several applications and guarantees acceptable response times for all applications. The system's ability to create the illusion of simultaneous execution of the applications is known as what?
Time-sharing
An application is requesting a service from the OS, which consists of several steps. The current step is: Transfer execution back to S() in user mode. What is the next step?
Transfer execution back to application in user mode
Which event could be triggered by the CPU executing a program instruction that attempts to go beyond the bounds of an array.
Trap
A preemptive algorithm makes a scheduling decision whenever a new process arrives in the Ready List.
True
A process entering the Ready List from the CPU is subject to short-term scheduling
True
Multilevel feedback scheduling addresses the problems of fstarvation and fairness by using which technique?
Using different time quantum at each priority level
Which processor type is assigned when multiple processes are executed using time-sharing?
Virtual CPU
With single-unit resources, deadlock is avoided by preventing ___.
a cycle to form in the resource allocation graph
The concept of unification and simplification by combining simple objects into more complex objects is referred to as _____?
abstraction
If a process can access and use a resource, the resource is ___?
allocated
A process is ___ if one or more request edges directed from the process exist and a resource does not contain enough free units to satisfy all requests
blocked
In a resource allocation graph, processes are represented by ___ and resources are represented by ___.
circles, rectangles
A buffer with n slots that are accessed in increasing order modulo n is a ___ buffer
circular
When solving a bounded-buffer problem, ___ must not overtake ___ and access empty slots.
consumers, producers
Transferring control of the CPU from one process to another is called a/an _____.
context switch
A ___ section of code cannot be entered by a process while another process is executing a corresponding segment of the code.
critical
A situation where multiple processes are blocking each other indefinitely is called
deadlock
The solution to the dining-philosophers problem where all philosophers pick up the left for first may lead to ___.
deadlock
P1 executes the code: while (1) { c1 = 1; while (c2); /*wait*/ CS c1 = 0; ... } P2 executes the code: while (1) { c2 = 1; while (c1); /*wait*/ CS c2 = 0; ... } Which requirement is violated in the above solution.
deadlock is possible
A resource allocation graph is considered completely reducible if at the termination of the graph reduction algorithm, all processes have been ___.
deleted
The Banker's algorithm avoids deadlock by ____.
denyinng a request that leads to a non-reducible graph
An advantage of user-level threads over kernel-level threads is ___?
faster creation and destruction
A release resource function has been called and the waiting list is empty. As a result, the resource is marked as ___?
free
Is the following state-transition sequence valid or invalid? suspended -> blocked -> ready -> suspended -> running
invalid
The ____________ of an OS is the minimal set of functions necessary to manage the system resources (e.g., I/O devices) safely and efficiently.
kernel
During process synchronization, a ___ is used so only one process can pass through the synchronization barrier at a time.
lock
A situation where a process not attemtpting to enter a CS prevents other processes from entering the CS is called ___.
lockout
The ___ scheduling algorithm assigns new processes to the highest-level priority queue for scheduling.
multilevel feedback
The requirement that only one process may execute in a CS is called ___
mutual exclusion
Continuous deadlock detected proceeds as follows: If the current operation is a request for a resource and the requesting process p becomes blocked in s' then execute the graph reduction algorithm until either p is removed from the graph or ___.
no unblocked processes remain
Assume the following operations are executed. p1 creates p2, p3 p2 creates p4, p5 p3 creates p6, p7 p7 creates p8, p9 Which process is not destroyed by the operation destroy(p3) ?
p5
In the dining philosophers problem, when p[2] is eating then ___ can eat concurrently. Assume there are five philosophers numbered p[0] - p[4]
p[0] or p[4]
The rate monotonic (RM) algorithm schedules processes according to a time interval known as a ___.
period
A ___ scheduling algorithm may stop a running process when a new process enters the Ready List.
preemptive
A scheduler function determines whcih process should run next. The decision is based on the ___?
priority
The dining-philosophers problem is representative of situations where multiple ___ compete for shared resources but each needs more than one resource at a time
processes
Recovery from deadlock is possibly by destroying one or more of the ___ involved in the deadlock or by removing some of the ___ held by the deadlocked process.
processes, resources
When solving a bounded-buffer problem, ___ must not overtake ___ and overwrite full slots.
producers, consumers
A process at the head of a round-robin queue has the highest priority and runs for X milliseconds. The total time value for X is referred to as a ___.
quantum
When a process is in the ready state, the ___ is changing.
real time
Process p1 and p2 are sharing resource r, which contains 3 units. Which set of operations result in a state transition where p2 is blocked?
req r,2 by p1 acq r,2 by p1 req r,2 by p2
In a resource allocation graph, a directed edge from a resource to a process represents a ___.
resource allocation
A ___ resource contains one or more identical units, each of which can be requested and used by a process on a non-shared basis.
reusable
The ___ algorithm treats all processes as equals
round-robin
Consider the following implementation of the P operation P(s) { Pb(ms) s = s - 1 if (s < 0) Vb(ms) block self on s Vb(ms) } Initially, if the general semaphore value of s is 2, and the binary semaphore ms is 1, what are the values of s and ms after execution of P.
s = 1, ms = 1
With the rate monotonic (RM) algorithm, the following is true: The ___ the period, the ___ the priority.
shorter, higher
The OS kernel perceives user-level process threads as (a) ___?
single process
A situation where a process can repeatedly enter the CS while other processes are waiting to enter is called ___.
starvation
PCBs are typically organized as an array of
structures
When the value of s in a general semaphore implementation is less than 0, s corresponds to ___.
the number of blocked processes
An efficient metho for executing a portion of a program is known as using ___/
threads
The sum of the total CPU time and the waiting time is called the ___?
turnaround time
When there are at least ___ processes sharing resources, deadlock is possible.`
two