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

The correct matching for the following pairs is:

(A) Disk Scheduling (1) Round robin
(B) Batch Processing (2) SCAN
(C) Time-sharing (3) LIFO
(D) Interrupt processing (4) FIFO
  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.6k points)
edited by | 1.4k views

2 Answers

+22 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 (527 points)
edited by
+8 votes
Answer: C
answered by Boss (34.1k 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?

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

42,599 questions
48,599 answers
63,718 users