Questions about how operating systems decide which process to execute at which time.
Questions tagged [process-scheduling]
152 questions
19
votes
4 answers
Does cooperative scheduling suspend processes when they perform an I/O operation?
Many operating systems references say that with cooperative (as opposed to preemptive) multitasking, a process keeps the CPU until it explicitly voluntarily suspends itself. If a running process performs an I/O request that cannot be immediately…
Ellen Spertus
- 1,592
- 13
- 30
18
votes
3 answers
What guarantees do "soft" real-time operating systems actually provide
I think I know what a "hard" real-time operating system is. It is an operating system with a scheduler that provides a contract with the application programmer. An application provides a deadline with each resource allocation request. If the…
Wandering Logic
- 17,863
- 1
- 46
- 87
12
votes
3 answers
What is the difference between Multiprogramming and Multitasking
I am finding it difficult to clearly differentiate between Multiprogramming and Multitasking.
My primary source has been Wikipedia, but the WP article seems to be a little at odds with some less reputable sources (like my college professor).
As I…
jsj
- 680
- 3
- 8
- 12
10
votes
1 answer
Are two-level schedulers only useful to manage swapping?
Two-level scheduling is useful when a system is running more processes than fit in RAM: a lower-level scheduler switches between resident processes, and a higher-level scheduler swaps groups of processes in and out.
I find no other mention of…
Gilles 'SO- stop being evil'
- 44,159
- 8
- 120
- 184
9
votes
2 answers
Round-robin scheduling: allow listing a process multiple times?
In a round-robin scheduler, adding a process multiple times to the process list is a cheap way to give it higher priority.
I wonder how practical an approach this might be. What benefit does it have over other techniques such as giving the process a…
Gilles 'SO- stop being evil'
- 44,159
- 8
- 120
- 184
9
votes
4 answers
What is meant by interrupts in the context of operating systems?
I've decided to read Operating Systems Concepts by Silberschatz, Galvin Gagne (8th edition) over the summer. I've gotten to a topic that's confusing me - interrupts and their role as it relates to operating systems.
The text says that an operating…
Ockham
- 263
- 1
- 2
- 5
8
votes
2 answers
What mechanisms prevent a process from taking over the processor forever?
Suppose a process keeps running code (e.g. an infinite loop). How can other programs take over? What prevents the process from remaining active forever?
Dionysus
- 93
- 1
- 3
8
votes
2 answers
How does the OS determine the CPU burst time of a process?
This question is related to OS. After having solved many problems in CPU scheduling I was wondering how does the CPU know the burst time of all the processes in the main memory before executing them?
Selecting a process among a pool of processes…
Ryan sams
- 376
- 3
- 5
- 11
8
votes
6 answers
What is the average turnaround time?
For the following jobs:
The average wait time would be using a FCFS algorithm:
(6-6)+(7-2)+(11-5)+(17-5)+(14-1) -> 0+5+6+10+13 -> 34/5 = 7 (6.8)
What would the average turnaround time be?
Sheldon
- 803
- 2
- 9
- 16
7
votes
6 answers
Does Deadlock imply Starvation
If there is a deadlock between the processes does that mean that there is starvation also?
My Thinking:
deadlock is no process using that resources , but starvation is like not giving chance to only that process so there is progress in starvation…
Pavan Kumar Munnam
- 398
- 3
- 12
7
votes
1 answer
How are threads implemented in different OSs?
I was reading Linux Kernel Development by Robert Love, where I came across this
Linux takes an interesting approach to thread support: It does not
differentiate between threads and normal processes.To the kernel, all
processes are the same—…
Ankit
- 1,337
- 2
- 14
- 18
7
votes
4 answers
The convoy effect in process scheduling
As I understand the convoy effect, in the context of vehicular traffic in a road system. A slow moving group of vehicles passes through the system, slowing traffic even in areas which were not directly affected by the convoy.
How does this apply in…
jsj
- 680
- 3
- 8
- 12
6
votes
2 answers
Difficulty understanding pre-emptive vs non-preemptive CPU scheduling
I'm having difficulty understanding what my book is trying to say in regards to preemptive and non-preemptive CPU scheduling.
It says the following:
CPU Scheduling decisions may take place under the following four
circumstances:
When a process…
FrostyStraw
- 393
- 1
- 2
- 11
6
votes
1 answer
How to use Parallel Semaphores for Dining Philosophers Problem
I am in an intro to OS class and we are learning about mutual exclusion and semaphores. One classical problem we learned about was the dining philosophers problem. My professor touched on the different cases using simple semaphores (i.e asking the…
Ana Vanderwoodson
- 61
- 1
6
votes
2 answers
Which queue does the long-term scheduler maintain?
There are different queues of processes (in an operating system):
Job Queue: Each new process goes into the job queue. Processes in the job queue reside on mass storage and await the allocation of main memory.
Ready Queue: The set of all processes…
Sheldon
- 803
- 2
- 9
- 16