The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+26 votes
2.5k views

Which of the following does not interrupt a running process?

  1. A device
  2. Timer
  3. Scheduler process
  4. Power failure
asked in Operating System by Veteran (68.8k points)
edited by | 2.5k views
is answer C or D?

4 Answers

+29 votes
Best answer

ans 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.

https://www.quora.com/How-does-the-timer-interrupt-invoke-the-process-scheduler

answered by Boss (8.4k points)
selected by
but what is it is say SRTF.....a process can be interrupted here even though scheduled?
So ans is NONE or C ?
When a process A running, and to run another process B. I need scheduler to schedule.
But scheduler itself is a process, so to schedule the scheduler i need one more scheduler? and this goes on ?.

No, it doesn't happen that way, otherwise it will be vicious cycle.
We take support from hardware here. A Hardware timer runs along with process, when this timer expires, it generates a hardware interrupt. The interrupt handle routine pauses execution of current process and schedules the scheduler. Now scheduler decides which process to schedule next.
@Arjun sir but in case of priority scheduling algorithm it will be interrupt the current running process .So how can we say that scheduled process will not interrupt the running process ?
Scheduler is not a process and invokes by timer interrupt.It does not generate interrupt by itself. The timer interrupt handler runs the OS scheduler. If the process that was just interrupted has used up its time quantum, and there is some other runnable process, then the scheduler "returns" to that other process. (Later, when the timer interrupts some other process, the scheduler will "return" to this process).
In case of priority scheduling who will pre-empt running process if the process with high priority arrives in ready queue?
SCHEDULER is an operating service routine whose function is to determine  which user process should run in the next time slice .

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

So basically scheduler process never interrupt a running process Scheduler just select process which is in runnable state not blocked state.
Yes. But who will interrupt the running process?
except scheduler process all 3 option interrupt running process
Scheduler is like Boss who only decide which process will run next and assign the work of preemption to dispatcher.Dispatcher is like worker who will stop the current process do Context switch and all other work like saving the value of registers and all.Thus Scheduler itself never interrupt the running process.
My question is in case of high priority process arrives in the ready queue ,then who will interrupt the running process?I dont think from any of the three options interrupting the process,no one will interrupt in this particular case,so who will interrupt in case a high priority process arrives?
Irrespective of any case, schedular choose the next process and dispatcher will interrupt the current process and do preemption.
Ok got it.Thanks.:)
@reena everything is fine in your answer except the fact that how can you say that long term scheduler is scheduler only i think dispatcher is also scheduler(short term scheduler ) because scheduler have three types and we all know them .(short,medium,long)

Correct me if i am wrong?

according to key answer is scheduler processs

http://www.ankurgupta.net/gate-solutions/gate2001cs/

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)
+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
answered by Loyal (4.4k 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.
answered by Veteran (10.5k points)
–4 votes
according to me option D is correct because power failure means shut down system ..so its not interrupt generated
answered by Boss (7.4k points)
interrupt a running process means any kind of interruption...and during power failure whole sysytem fails..all the process inside it also fails....like 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


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

32,330 questions
39,146 answers
108,247 comments
36,501 users