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

Which of the following does not interrupt a running process?

  1. A device
  2. Timer
  3. Scheduler process
  4. Power failure
in Operating System by Veteran (52.1k points)
edited by | 4.6k views
is answer C or D?
@sushmita-Yeah assume you are about to save a file, you pressed cntrl+s, and suddenly power goes before your content is saved!!

(C) Scheduler Process is the correct answer. 
The reason being, A scheduler process only schedules or we can say selects a process from ready queue to be run on CPU. So no interrupt is generated in that case. When there is power failure, surely an interrupt "power-off signal" will be generated.

4 Answers

+39 votes
Best answer

Answer is (C).

Timer and disk both makes interrupt and power failure will also interrupt the system. Only a scheduler process will not interrupt the running process as schduler process gets called only when no other process is running (preemption if any would have happened before scheduler starts execution).

Quote from wikipedia

In the Linux kernel, the scheduler is called after each timer interrupt (that is, quite a few times per second). It determines what process to run next based on a variety of factors, including priority, time already run, etc. The implementation of preemption in other kernels is likely to be similar.

by Loyal (8.1k points)
edited by
How will device interrupt a running process?
@rahul, Device can trigger interrupt at any time by sending a signal to the CPU,usually by way of system Bus.(HARDWARE INTERRUPT)
@ Sachin sir,

When the timer expires for currently executing process and the scheduler is scheduled, it decides which process to load that means get that process address , then it has to call dispatcher for actually loading that process so it now scheduler is off from cpu and dispatcher is in. The dispatcher will load and save register and PC values for new process to be loaded and hand over cpu to that new process.

In want to know as scheduler and dispatcher are also processes do they have there dedicated register set ??
please clarify separately what is scheduler & what is dispatcher ??
Nice explanation !!
No they don't have their dedicated register set.


Means when for scheduling decision scheduler is loaded by preempting process will not result in context switch actually..means lets say P1 running and only one in ready Q in RR and TQ expires then scheduler will be loaded to make decision and it will see only P1 hence do nothing no Context switch so time for this is very less..but still there will be SOME small time will be involved right ??

Short term scheduler selects which process to schedule next while dispatcher gives the control of cpu to the selected process.

@reena_kandari Does it mean dispatcher interrupts the running process, as and when a process of higher priority arrives in ready queue? I'm stuck at this point that what actually interrupts a running process when a process of higher priority comes?


@Saideepak Bejawada

The timer interrupt will invoke the scheduler and the scheduler will check if any higher priority process is there in the ready queue. That process will be selected for the CPU and the dispatcher will do the context switching and all that stuffs.

+3 votes
Ans : None

A device can generate an Interrupt

Timer generates interrupt when time quantum is over in case of RR

Power failure will generate an interrupt

A scheduled process can also generate an interrupt in case of priority scheduling , when priority of scheduled process is more than Currently Running process
by Active (2.7k points)
yes, agreed .

All can cause an interrupt.

A, B, D  -> Hardware interrupt.

C -> software interrupt.

@vijaycs option (C) is scheduler process (scheduler) not scheduled process in ACE past year booklet.

Please correct the question. Read this

according to this option D but i think all interrupt
so how to deal with this kind of thing ??
0 votes
A. Device will not interrupt a running process. When a device requests service, DMA will take over, so no interruption to the running process.
B. Timer obviously interrupts a running process.
C. Scheduler Process interrupts a running process and schedules some other process.
D. Power Failure definitely generates interrupt.
by Loyal (9.2k points)
–4 votes
according to me option D is correct because power failure means shut down system its not interrupt generated
by Loyal (6.2k points)
interrupt a running process means any kind of interruption...and during power failure whole sysytem fails..all the process inside it also if u were playing a game during power failure that will also stop..means a process interrupted...none of the option matches here
i think all interrupt generated so none of these

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
49,830 questions
54,807 answers
80,840 users