Q. What is the main disadvantage od semaphore?5marks
Q. About spinlock..3marks
20 MCQ’s and 6 questions
1. Write data structures for bakery algorithm? (2 marks)
2. Which command is used for suspending a foreground process? (2 marks)
3. Which command is used to resume the execution of a suspended job in
the background? (3 marks)
4. Define race condition? (3 marks)
5. How to implement RR scheduling? (5 marks)
6. Highlight critical sections of this code? (5 marks)
do
{
while (TestAndSet(lock)) ;
Critical section
lock=false;
Remainder section
} while(1);
Write the formula/ procedure for calculating the waiting time in preemptive Shortest Job First scheduling.
Question No: 22 ( Marks: 2 )
What are the common data structures in Bakery Algorithm?
Question No: 23 ( Marks: 3 )
If a process exits and there are still threads of that process running, will they continue to run?
Question No: 24 ( Marks: 3 )
What are the important characteristics of TestAndSet? What will be its advantage.
Question No: 25 ( Marks: 5 )
Considering the Resource sharing feature of thread, what do you think is ‘resource sharing’ an advantage of a thread or disadvantage of a thread. Explain yours answer briefly.
Question No: 26 ( Marks: 5 )
Analyze the given algorithm proposed to solve the critical section problem. Identify the shortcomings of this algorithm.
do{
while(turn!=j);
critical section
turn=j;
remainder section
} while(1)
1. List and define the different metrics by which might evaluate a scheduler (List at least 4). 5 marks
2. Write brief the multilevel feedback queue scheduling. 5 marks
3. Assumption made while formulating a solution to the critical section problem. 2 marks
4. There are many commands. Write the method through which these commands can communicate with each other. 3 marks
5. Write Difference between SJF and Shortest Remaining Time First Scheduling algorithm. 3 marks
6. Write formula for calculating waiting time in preemptive Shortest Job First Algorithm. 2 marks
3 Questions of 2 marks:
1) What assumptions should be kept in mind while formulating a solution to critical section problem
2) Differentiate between independent processes and cooperative processes
3) Differentiate between fifo and pipe
2 Questions of 2 marks:
1) What are the three requirements for the solution of critical section problems
2) mkfifo() call may fail due to many reason. Describe the situations in which mkfifo() command will terminate and also describe the situations in which the mkfifo() command will not terminate
2 Questions of 5 marks:
1) What are the advantages of Round Ribon scheduling algorithm and what are the disadvantages of this scheduling algorithm
2) Highlight the shortcoming in the following hardware solution
do
{
while(testandset(lock));
critical section
lock=false;
remainder section
}while(1);
1.Analyze the given algorithm proposed to solve the critical section problem. Identify the shortcomings of this algorithm.
do{
while(turn!=j);
critical section
turn=j;
remainder section
} while(1)
: 5marks
3. How can you differentiate between a library call and a system call? Explain briefly giving at least one example.
3marks
4. Define the terms “Bounded Waiting” and “Progress” with respect to Critical Section Problem. (3 marks)
5. How can you differentiate between the fifo and pipe?(2 marks)
6. There are number of commands in Linux/Unix. Write the method through which these commands can communicate with each other?
(2 marks)
- Define Waiting time with respect to CPU Scheduling? 2 marks
- True or False? (and explain): the Multi-Level Feedback Queue (MLFQ) scheduling algorithm is the same as Shortest-Job-First.
- What does the term ‘input redirection’ mean? Write down the basic syntax for input, output and error redirection of UNIX/LINUX system. 5 marks
- What are pros and cons of multithreading?5 marks
- What is waiting time in context of CPU burst?2marks