The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+37 votes
4.3k 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 (59.9k points)
edited by | 4.3k views
0
is answer C or D?
0
@sushmita-Yeah assume you are about to save a file, you pressed cntrl+s, and suddenly power goes before your content is saved!!

4 Answers

+38 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.

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

answered by Loyal (8.1k points)
edited by
0
@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?
0

according to key answer is scheduler processs

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

+2
How will device interrupt a running process?
+1
@rahul, Device can trigger interrupt at any time by sending a signal to the CPU,usually by way of system Bus.(HARDWARE INTERRUPT)
0
@ 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 ??
0
please clarify separately what is scheduler & what is dispatcher ??
0
Nice explanation !!
0
No they don't have their dedicated register set.
0

@sushmita

Means when for scheduling decision scheduler is loaded by preempting process ..it 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 ..as no Context switch so time for this is very less..but still there will be SOME small time will be involved right ??

0
Short term scheduler selects which process to schedule next while dispatcher gives the control of cpu to the selected process.
+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 Active (3.7k points)
0
yes, agreed .

All can cause an interrupt.

A, B, D  -> Hardware interrupt.

C -> software interrupt.
0

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

Please correct the question. Read this

0
according to this option D but i think all interrupt
–1
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 Loyal (9.7k points)
–4 votes
according to me option D is correct because power failure means shut down system ..so its not interrupt generated
answered by Loyal (7.2k points)
0
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
0
i think all interrupt generated so none of these
Answer:

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
47,881 questions
52,233 answers
182,129 comments
67,653 users