The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+15 votes

The correct matching for the following pairs is:
$$\begin{array}{l|l}\hline \text{(A) Disk Scheduling}  &  \text{(1) Round robin}  \\\hline  \text{(B) Batch Processing} & \text{(2) SCAN} \\\hline  \text{(C) Time-sharing} & \text{(3) LIFO} \\\hline  \text{(D) Interrupt processing} & \text{(4) FIFO} \\\hline \end{array}$$

  1. $\text{A-3 B-4 C-2 D-1}$

  2. $\text{A-4 B-3 C-2 D-1}$

  3. $\text{A-2 B-4 C-1 D-3}$

  4. $\text{A-3 B-4 C-3 D-2}$

asked in Operating System by Veteran (59.8k points)
edited by | 1.6k views

3 Answers

+27 votes
Best answer

(C) is answer. Interrupt processing is LIFO because when we are processing an interrupt, we disable the interrupts originating from lower priority devices so lower priority interrupts can not be raised. If an interrupt is detected then it means that it has higher priority than currently executing interrupt so this new interrupt will preempt the current interrupt so, LIFO. Other matches are easy

answered by Junior (583 points)
edited by
+8 votes
Answer: C
answered by Boss (34k points)
In case of interrupt it could be both LIFO and FIFO .

Based on the priority of the interrupts..

Am i right?

no it lifo - in practice we take this see page number 13

see here

But when a high priority interrupt is executing and then a low priority int arrives then we first execute high priority interrupt
In the given link, page number 11 says "the interrupt with the highest priority is selected if multiple interrupts occurred during the last instruction and are pending for service". If this is true, then how can lifo be correct always?
+1 vote
Scan algorithm is under Disk scheduling.

Interrupt processing is based on LIFO.

Time-sharing is related to CPU scheduling which is under the Round robin algorithm.

Batch processing is based on FIFO.

answered by (331 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,126 questions
53,252 answers
70,502 users