CECS 326 Final Study
Assume that the processes arrive in the order: P3, P1, P2, the burst time of P1 is 14, the burst time of P2 is 9, and the burst time of P3 is 12. The priority of P1 is 1, the priority of P2 is 2 and the priority of P3is 3. If under the Priority policy the waiting time of P1 is? -12 -0 -21 -26
0
Assume that the processes arrive in the order: P3, P1, P2, the burst time of P1 is 14, the burst time of P2 is 9, and the burst time of P3 is 12. If under the FCFS policy the waiting time of P1 is? -12 -26 -21 -0
12
Assume that the processes arrive in the order: P3, P1, P2, the burst time of P1 is 14, the burst time of P2 is 9, and the burst time of P3 is 12. If under the SJF policy the waiting time of P1 is? -12 -21 -26 -0
21
3) Which one of the following is a visual way to determine the deadlock occurrence? A Resource allocation graph B. Starvation graph C. Inversion graph D. None of the mentioned
A Resource allocation graph
For breaking the Hold and wait condition, which of the following statements is TRUE? -None of mentioned -A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it -A process must guarantee that whenever a process requests a resource, it does not hold any other resources -A process must hold at least one resource and not be waiting to acquire additional resources
A process must guarantee that whenever a process requests a resource, it does not hold any other resources
21) A process refers to 5 pages, A, B, C, D, E in the order: A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement algorithm is FIFO, the number of page transfers with an empty internal store of 3 frames is? A. 8 B. 10 C. 9 D. 7
A. 8
10) When use continuous memory allocation, operating systems (including Linux and Windows) place the users' program in? A. Low memory B High memory C. Low memory and high memory D. None of the above
A. Low memory
(13). _______ selects among available processes for next execution on CPU. A. Process scheduler B. CPU register C. None of these D. Program counter
A. Process scheduler
1) A system is in the safe state if A. The system can allocate resources to each process in some order B. There may exist a safe sequence C. The system cannot allocate resources to each process D. None of the mentioned
A. The system can allocate resources to each process in some order
(8). The goal of OS services is designed to support the user's view of system is: A. To make it easier to use or interact with the hardware B. To smoothly handle the running state of applications C. To enable efficient use of hardware resources D. To enable fair use of hardware and software
A. To make it easier to use or interact with the hardware
(10). When a system call is created from a user command or process, it will take the following function: A. Usually spawns a kernel process that implements that service. B. Traps an error or illegal operation attempted by that process. C. None of mentioned D. Converts logical I/O commands to their physical counterparts.
A. Usually spawns a kernel process that implements that service.
Which of following statement belong to deadlock avoidance? -Resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of the processes -All of mentioned -Simplest and most useful model requires that each process declare the maximum number of resources of each type that it may need -The deadlock-avoidance algorithm dynamically examines the resource-allocation state to ensure that there can never be a circular-wait condition
All mentioned
Which of following statements of no preemption is TRUE? -If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released -Preempted resources are added to the list of resources for which the process is waiting -Process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting -All of mentioned
All mentioned
Which of the followings is(are) condition(s) for solution to critical section problem? -mutual Exclusion -Bounded Waiting -Progress -All of mentioned
All mentioned
5) The processes that are residing in main memory and are ready and waiting to execute are kept on a list called A. Job queue B. Ready queue C. Execution queue D. Process queue
B Ready queue
6) In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with the priority of A. All process B. Currently running process C. Parent process D. Init process
B. Currently running process
(12). In a computer system, which of the following does NOT belong to users? A. Machines B. Data system C. Laptops D. People
B. Data system
(14). What are the process scheduling queues? A. Job queue, Running queue, Device queue. B. Job queue, Ready queue, Device queue. C. New queue, Ready queue, Device queue. D. Job queue, Ready queue, Waiting queue.
B. Job queue, Ready queue, Device queue.
(6). Mutual exclusion can be provided by A. Semaphore B. Mutex lock and semaphore C. None of mentioned D. Mutex locks
B. Mutex lock and semaphore
(2). Which of the following are states of a process? A. New, Switching, Waiting, Ready and Terminated. B. New, Running, Waiting, Ready and Terminated. C. New, Running, Waiting, Ready and Old. D. New, Jumping, Waiting, Ready and Terminated.
B. New, Running, Waiting, Ready and Terminated.
9) Which of following statements is FALSE about page table? A. On a TLB miss, value is loaded into the TLB for fastest access B. Page offset used as an index into a page table, and the page table is kept in main memory. C. Page table use of a special fast-lookup hardware cache called associative memory or translation look-aside buffers (TLBS) D. All of above
B. Page offset used as an index into a page table, and the page table is kept in main memory.
(5). Which of the following is TRUE about parent process and children process? A. Parent must share subset of children's resources. B. Parent and children could share no resources C. None of mentioned D. Children must wait until parent terminate.
B. Parent and children could share no resources
14) The number of processes that complete their execution per time unit is called: A. Waiting time B. Throughput C.Turnaround time D. Response time
B. Throughput
4) The interval from the time of submission of a process to the time of completion is termed as: A. Waiting time B. Turnaround time C. Response time D. Throughput
B. Turnaround time
The circular wait condition can be prevented by A Using thread B. Using pipes C. Defining a linear ordering of resource types D. All of the mentioned
C. Defining a linear ordering of resource types
(4). Which of the following is/are the possible solution(s) for the Dining-Philosophers Problem Algorithm? A. A philosopher must pick one chopstick in the critical section. B. At least 3 philosophers must be sitting simultaneously. C. Use an asymmetric solution while picking up the chopsticks. D. Need to interact with their neighbors to pick up chopsticks.
C. Use an asymmetric solution while picking up the chopsticks.
Which of followings is scheduling criteria? -CPU utilization, Throughput, Waiting time, Response time, Termination Period -CPU utilization, Throughput, Turnaround time, Waiting time, Response time -CPU utilization, Estimation time, Turnaround time, Waiting time, Termination Period -CPU utilization, Estimation time, Turnaround time, Waiting time, Response time
CPU utilization, Throughput, Turnaround time, Waiting time, Response time
11) Address seen by the memory unit is called: A. Logical Address B. Virtual Address C. Memory address D Physical Address
D Physical Address
15) What the following statements are true? A. Shortest remaining time first scheduling will not cause starvation * B. Round robin is worse than FCFS in terms of response time C.Shortest job first scheduling is the best practical scheduling policy D Preemptive scheduling may cause starvation
D Preemptive scheduling may cause starvation
22) A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement algorithm is Optimal, the number of page transfers with an empty internal store of 3 frames is? A. 8 B. 10 C. 9 D. 7
D. 7
13) Which of following statements define the logical address space? A. A pair of indexed and limit registers B. A pair of base and relocation registers C. A pair of relocation and indexed registers D. A pair of base and limit registers
D. A pair of base and limit registers
(9). Parent may terminate the execution of children processes using the abort() system call because: A. The parent is exiting and the operating systems does not allow a child to continue if its parent terminates B. Task assigned to child is no longer required C. Child has exceeded allocated resources D. All of mentioned
D. All of mentioned
12) Which of following statements is TRUE about main memory? A. Main memory and registers are only storage, CPU can access directly B. Program must be brought (from disk) into memory and placed within a process for it to be run C. Continuous allocation causes fragmentations. D. All of mentioned
D. All of mentioned
8) The possible solution to recover a deadlock is A. Abort all deadlocked processes B. Resource Preemption C. Abort process by process D. All the above
D. All the above
(15). Which of the following is not the function of an Operating System? A. Memory Management B. Process Management C. Device Management D. Clock Management
D. Clock Management
The four components of computer system are: A. Software, Operating system, Application programs, Database B. Software, Operating system, Application programs, Users C. Hardware, Operating system, Database, Users D. Hardware, Operating system, Application programs, Users
D. Hardware, Operating system, Application programs, Users
7) Processes are classified into different groups in A. Shortest job scheduling algorithm B. Round robin scheduling algorithm C. Priority scheduling algorithm D. Multilevel queue scheduling algorithm
D. Multilevel queue scheduling algorithm
(7). Which of the following is TRUE about Zero capacity? A. Finite length of n messages. The Sender must wait if link full. B. Infinite length. Sender never waits C. None of mentioned D. No messages are queued on a link. Sender must wait for the receiver.
D. No messages are queued on a link. Sender must wait for the receiver.
(3). What are the two primary models of interprocess communication? A. Shared memory, Memory passing B. Message receiving, Message sending C. None of mentioned D. Shared memory, Message passing
D. Shared memory, Message passing
(11). Which of the following is FALSE about clustered systems? A. Some clusters are for high-performance computing (HPC) B. Provides a high-availability service which survives failures C. Usually sharing storage via a storage-area network (SAN) D. The clustered system is exactly the same as multiprocessor
D. The clustered system is exactly the same as multiprocessor
Which of followings can bring a page into memory only when it is needed? -Segmentation -Scheduling -Swapping -Demand paging
Demand Paging
Logical and physical addresses are different in which time? -Load-time -Compile-time -Termination-time -Execution-time
Execution-time
Physical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available, that could avoid: -None of the above -Reduce storage speed, and problem of varying sized memory chunks -External fragmentation, and problem of varying sized memory chunks -External fragmentation, and reduce storage speed
External fragmentation, and problem of varying sized memory chunk
T/F Virtual memory space is always smaller than physical memory space.
F
TF Round robin scheduling falls under the category of non-preemptive scheduling.
F
TF A single-processor system is able to execute multiple process at a time
F
TF One advantage of a semaphore is that it allows many processes into the critical section
F
TF Paging can avoid internal fragmentation and problem of varying sized memory chunks.
F
TF Segmentation avoids external memory fragmentation.
F
TF Short-term scheduler selects which processes should be brought into the ready queue
F
TF Shortest Time First is the best scheduling algorithm that can be implemented in an Operating System.
F
TF Single-threaded process has one program counter specifying the location of the current instruction to execute.
F
TF The atomic instructions/calls used in Peterson's solution are acquire() and release().
F
TF The message size of interprocess communication is always fixed.
F
TFA system with 9 total resources and three threads, it's safe.
F
To break out the Mutual Exclusion, it can impose a total ordering of all resource types and require that each process requests resources in an increasing order of enumeration. T/F?
False
If a resource allocation graph has a cycle, which means -If several instances per resource type, then NO deadlock -If one instance per resource type, then deadlock -NO deadlock -None of mentioned
If one instance per resource type, then deadlock
Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating ________ computing. -Interactive -Independent -Multiple -Parallel
Interactive
Device controller informs CPU that it has finished its operation by causing a(an) ____? -Execute -Interrupt -Wait -Terminate
Interrupt
Which of the following is correct about a Mutex Lock? -It is exactly like a counting semaphore -It is essentially a boolean variable -It is not guaranteed to be atomic -It can be used to eliminate busy waiting
It is essentially a boolean variable
Which of the following is correct about a Binary Semaphore? -It is the same as mutex lock. -It is essentially an integer variable. -It allows multiple processes into the critical section -Machine dependent.
It is the same as mutex lock.
Which algorithm replaces page that has not been used in the most amount of time? -FIFO algorithm -Optimal algorithm -LRU algorithm -LFU algorithm
LRU Algorithm
Which of followings is(are) features of demand paging? -Less memory needed -More I/O needed -Less users -Slower response
Less memory needed
Address generated by CPU is divided into page number and page offset, which of followings is TRUE about it? -Page offset combined with base address to define the physical memory address that is sent to the memory unit -Page offset combined with base address to define the virtual memory address that is sent to the memory unit -Page number used as an index into a page table, but it does not contain base address of each page in physical memory -Page number used as an index into a page table which contains base address of each page in virtual memory
Page offset combined with base address to define the physical memory address that is sent to the memory unit
Which of followings is(are) TRUE about page-replacement algorithm? -All of the above -Page-replacement algorithm determines which frames to replace -Page-replacement algorithm determines how many frames to give each process -Page-replacement algorithm want lowest page-fault rate on both first access and re-access
Page-replacement algorithm want lowest page-fault rate on both first access and re-access
An edge from process Pj to Pi in a wait for graph indicates that: -Pj is waiting for Pi to release a resource that Pj needs -Pi is waiting for Pj to release a resource that Pi needs -Pi is waiting for Pj to join the system -Pj is waiting for Pi to join the system
Pj is waiting for Pi to release a resource that Pj needs
Which of the following condition does NOT need to be satisfied in the solution to the critical section problem? -Preemptive -Progress -Mutual Exclusion -Bounded Waiting
Preemptive
Which one of the following is the location of instruction to next execute in process control block? -CPU Registers -CPU Scheduling Information -Process State -Program Counter
Program Counter
Deadlock is every process in a set of processes is waiting for an event that can be caused only by another process in the set. T/F?
True
Dynamic linking - linking postponed until execution time, used with system libraries, and it particularly useful for libraries. T/F?
True
T/F: When one process is in its Critical Section, no others can be in the critical section. Each process MUST ask permission to enter critical section in entry section, may follow critical section with exit section, then remainder section.
True
The average waiting time under a FCFS policy is generally not minimal. T/F?
True
The term dispatch latency describes the amount of time it takes for the dispatcher to stop one process and start another running. T/F?
True
What are the two types of threads to be managed in a modern system? -UI thread and Kernel threads -Main thread and Worker thread -User threads and Kernel threads -User threads and Main threads
User threads and Kernel threads
The banker's algorithm is a resource allocation and deadlock avoidance algorithm, which of following statements is FALSE? -When a process requests a resource, it doesn't have to wait -Multiple instances per resource -Each process must a priori claim maximum use -When a process gets all its resources it must return them in a finite amount of time
When a process requests a resource, it doesn't have to wait
Multilevel-feedback-queue scheduler NOT defined by which the following parameters? -method used to determine when to demote a process -method used to determine when to starve a process -method used to determine when to upgrade a process -method used to determine which queue a process will enter
method used to determine when to starve a process
If there is a reference to a page, first reference to that page will trap to operating system. These traps are called: -no error -segmentation fault -page fault -fatal error
page fault
TF Signals are used in UNIX systems to notify a process that a particular event has occurred. A signal handler is used to process signals.
T
If a system is in safe state when have a possibility of deadlock T/F?
False
In Round Robin, after this time has elapsed, the process is preempted and added to the second of the ready queue T/F
False
T/F Counting Semaphore is as same as the mutex lock, the integer value can range only between 0 and 1.
False
T/F: In the system view, the Operating System is designed primarily for convenience, ease of use and good performance for users, and the resource utilization is not important.
False
T/F: Secondary storage is faster than the primary storage, but the secondary storage is smaller than the primary storage.
False
Which of followings is FALSE about main memory? -One of the main memory partitions for the operating system. -Many operating systems place the operating system in low memory -Each process contained in single contiguous section of memory -One of the main memory partitions for the user processes.
Many operating systems place the operating system in low memory
What is the meaning of Many-to-One Models? -Many kernel thread threads mapped to single user-level -Many user-level threads mapped to single kernel thread -Many user-level threads to be mapped to many kernel threads -Each user-level thread maps to kernel thread
Many user-level threads mapped to single kernel thread
What are the four conditions that hold simultaneously in a system for the deadlock situation to arise? -Single Exclusion, Hold and Wait, No preemption, Circular wait -Mutual Exclusion, Hold and Wait, No preemption, Circular wait -Mutual Exclusion, Hold and Wait, Preemption, Circular wait -Mutual Exclusion, Run and Wait, No preemption, Circular wait
Mutual Exclusion, Hold and Wait, No preemption, Circular wait
Which of the following statements about pipes are TRUE? -Ordinary pipes can be accessed without a parent-child relationship between communicating processe -Named Pipes are more powerful than ordinary pipes -Pipe acts as a conduit allowing two processes to communicate -All of mentioned
Named Pipes are more powerful than ordinary pipes Pipe acts as a conduit allowing two processes to communicate
Which one of the following is process states in operating system? -New, Running, Waiting, Ready, Terminated -New, Running, Waiting, Ready, Restarting -New, Running, Waiting, Switch, Terminated -New, Computing, Waiting, Ready, Terminated
New, Running, Waiting, Ready, Terminated
Which one of the following is not the benefits of multithreaded processes? -Resource Sharing -On-Network Information Security -Scalability -Responsiveness
On-Network Information Security
Assume that the processes arrive in the order: P3, P1, P2, the arrival time of P3 is 0, the arrival time of P1 is 3, the arrival time of P2 is 4. The burst time of P1 is 14, the burst time of P2 is 9, and the burst time of P3 is 12. If under a SRTF policy the which one ends first? -P3 -P1 -P2&P1 -P2
P3
Which one is priority scheduling where priority is the inverse of predicted next CPU burst time? -SRTF -FCFS -SJF -RR
SJF
Which of the followings is(are) TRUE about the semaphore? -Semaphore is a special program for a system -Semaphore is an integer variable -All of mentioned -Semaphore is a hardware for a system
Semaphore is an integer variable
Which one of the following is TRUE about Schedulers? -Short-term scheduler controls the degree of multiprogramming -Long-term scheduler sometimes is the only scheduler in a system -Short-term scheduler is invoked frequently -Long-term selects which process should be executed next and allocates CPU
Short-term scheduler is invoked frequently
Which one of followings is FALSE about Multiprogramming? -Single user can keep CPU and I/O devices busy at all times -A subset of total jobs in system is kept in memory -One job selected and run via job scheduling -Multiprogramming organizes jobs (code and data) so CPU always has one to execute
Single user can keep CPU and I/O devices busy at all times
Which part of process contains temporary data? -Stack -Text Section -Heap -Data Section
Stack
TF A process can be terminated by its parent process.
T
TF A program stored in virtual memory may run slower than a program stored on the RAM.
T
TF In UNIX, fork() system call creates a new process, which becomes the child process of the caller.
T
TF Indirect communication means that there is another process Z to handle and pass on the messages between X and Y.
T
TF One of the four conditions necessary for deadlock is that a process acquires a resource and holds onto it while it acquires other resources.
T
