
CSE316_OS_Mastry_Quest02_Deadlock_Dominator
Authored by Sachin_K22Z 12345678
Engineering
University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
90 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about threads is/are TRUE?
Thread can only be implemented in kernel space
Each thread has its own file descriptor table for open files
All the thread belonging to a process share a common stack
Thread belonging to a process are by default not protected form each other.
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Consider three concurrent processes P1, P2 and P3 which access a shared variable D that has been initialized to 100. The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y–X is ________.
60
70
80
90
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following statements about deadlock in operating systems are TRUE? (Select all that apply)
Deadlock occurs when a set of processes are permanently blocked because each process is waiting for a resource held by another process in the set.
The Hold and Wait condition requires that a process must release all its resources before requesting new ones.
The Circular Wait condition implies the existence of a circular chain of processes where each process waits for a resource held by the next process in the chain.
Deadlock can be prevented by ensuring that at least one of the four necessary conditions for deadlock is always violated.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a=1 and b=1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption. T1: a = a + 1; b = b + 1; T2: b = 2 * b; b = 2 * a; Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
A. (a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)
B. (a = 3, b = 4); (a = 4, b = 4); (a = 3, b = 3)
C. (a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)
D. (a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A "Buffer Overflow" attack primarily targets which of the following to gain control of a program's execution flow?
The Heap
The Return Address on the Stack
The Global Data Segment
The Instruction Register
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
With respect to deadlocks in an operating system, which of the following statements is/are FALSE? [Select all that apply]
Banker’s algorithm is used to prevent deadlocks
Deadlock formation can be prevented by ensuring that the hold and wait condition is not allowed
An assignment edge in a resource allocation graph is marked from a process to a resource
A safe state guarantees that all processes can finish without formation of a deadlock
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider a system consisting of K instances of a resource R, being shared by 5 processes. Assume that each process requires a maximum of two instances of resource R and a process can request or release only one instance at a time. Further, a process can request the second instance of the resource only after acquiring the first instance. The minimum value of K for the system to be deadlock-free is____.
5
6
7
8
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?