Questions tagged [process-scheduling]
Questions about how operating systems decide which process to execute at which time.
152 questions
4
votes
1
answer
2k
views
Paging: Does the page table of a process also gets swapped out when the process gets swapped out from main memory?
Does a process's page table too gets swapped out to secondary storage from main memory when the process gets swapped out to secondary storage from main memory? And gets swapped back in when the ...
0
votes
0
answers
20
views
Interval scheduling maximization problem (ISMP) variation with flexible start time and common deadline
I'm trying to find an optimal algorithm for ISMP variation, with 2 additional details: the start of any interval can be moved forward and there's a common 'deadline' for all intervals.
Given:
Set of ...
5
votes
2
answers
1k
views
Convoy effect in priority scheduling and SJF (Non preemptive)
In books, I have read that FCFS suffers from convoy effect. I think that even SJF and priority(both preemptive and non preemptive) can suffer from convoy effect.
In SJF, if a process with large burst ...
0
votes
0
answers
21
views
Semaphores for sensor box
I am currently solving the following task for semaphores:
A sensor box consists of 3 different sensors. These sensors collect data which is then written to the local memory by a process. A fourth ...
1
vote
1
answer
135
views
Is Starvation possible in First Come first serve CPU scheduling algorithm
Let's say if we have an infinite process that never yields such that other process dosent get to run. Since FCFS is a non preemptive scheduler does it leads to starvation
6
votes
1
answer
295
views
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 ...
4
votes
2
answers
3k
views
Process Synchronization: Dekker's algorithm
This Screenshot is taken from William Stalling's Operating Systems book.
My doubt is that Bounded wait is not satisfied by this solution.
For example: P0 and P1 both want to enter critical section ...
0
votes
0
answers
20
views
Why round robin favours the process with large burst time?
From the round-robin wikipedia
In the absence of time-sharing, or if the quanta were large relative to the sizes of the jobs, a process that produced large jobs would be favored over other processes.
...
0
votes
1
answer
461
views
Calculating minimum processing time for many recipes and tools
I originally asked this question on StackOverflow but a comment was made to the effect that my problem pertains to Job Shop Scheduling and that it was more of a comp sci problem than a programming ...
0
votes
1
answer
78
views
What happens for hardware Interrupts in non-preemptive scheduling?
In non-preemptive scheduling, the running process cant be interrupted .But what will when the CPU receive a hardware interrupt such as the an interrupt from the printer indicating that the current ...
0
votes
0
answers
44
views
Is the OS kernel part of the main() of the OS or is it a seperate function?
I am wondering is usually the OS kernel which provides a link between 2 processes part of the main() of the os or is it a seperate function?In other words do we usually encapsulate the OS kernel in ...
0
votes
2
answers
50
views
Is communication between processes really important for a OS or is it just a convenience?
One of the services of a OS is communication between processes.However how much important is that?I dont think it is that important just for example if we saved a .txt file the file explorer wouldnt ...
0
votes
1
answer
29
views
What does the data field store?
This semester we have a class related to Operating Systems.The class itself is not obligatory but the class is done at the same time with a core class and I will simply not waste a year for 1 class ...
4
votes
1
answer
108
views
How does caching, paging, virtual memory, and OS all tie together for UNIX copy-on-write?
In my OS course, the instructor mentioned the following: In UNIX if a parent process creates a new child ("fork") then the child is an exact duplicate of the parent. This means its memory ...
0
votes
1
answer
171
views
Page allocation for a program
When my professor explained how the OS handles memory, he described demand paging, and how when a process starts up, the code page with the first instruction is loaded into memory, and everything else ...
2
votes
1
answer
1k
views
Question about Context Switching
I'm reading OSTEP for my Operating Systems course, and I have a question from Chp.6.3:
Note that there are two types of register saves/restores that happen
during this protocol. The first is when the ...
0
votes
1
answer
240
views
Under which circumstances a process in ready state can switch to exit without transition into any other intermediate state?
I was studying for an exam when I stumbled across this true or false statement:
In a system of 7 states diagram, a process could switch from ready state to exit state directly.
The answer to this ...
0
votes
3
answers
88
views
Trading time for work; does this concurrency phenomenon have a name?
Recently, my girlfriend and I were trying to get out of the house, when I encountered a phenomenon which I thought might be analogous to a tradeoff in concurrent systems.
Here's the real world setup.
...
0
votes
1
answer
3k
views
Context Switching in Round Robin CPU scheduling algorithm
If we have only one submitted process and we are using RR CPU scheduling algorithm. Assume that the CPU burst time for this process is 10 ms and the time quantum is 2 , then there will be multiple ...
2
votes
1
answer
61
views
Are there any operating systems that utilize only user threads?
We're going over threading models in my freshman CS class. Are there any examples of operating systems that use exclusively user threads (N:1)? It looks like 1:1 is far and away the most common model ...
0
votes
1
answer
775
views
Cores, threads and sockets: what does it mean the calculation $T = tcs$ and the number on windows task manager performance?
Well, suppose then we have an CPU system such as:
Thread(s) per core $\equiv t$ : 4
Core(s) per socket $\equiv c$: 4
Socket(s) $\equiv s$: 1
Then, we must to perform a simple ...
1
vote
1
answer
5k
views
Algorithm favours CPU bound or I/O bound processes
Some scheduling algorithms favour CPU bound processes while others favour I/O bound processes.
Which algorithm favours which type of process?
My answers:
SJF favours I/O bound processes.Explanation: ...
3
votes
1
answer
2k
views
What are the differences between Earliest Deadline First (EDF) and Earliest Due Date (EDD)?
From my understanding, the EDF (Earliest Deadline First) rule is essentially an iterative "version" of the EDD (Earliest Due Date) rule, which allows for preemption. At every point in time, ...
0
votes
0
answers
92
views
Incorrect average turnaround time calculated for FCFS schedule?
I am trying to solve the following problem:
If all of the jobs listed below are scheduled FCFS (First Come, First Serve) with no switching overhead, the average turnaround time is going to be:
...
3
votes
2
answers
4k
views
What is a student process?
According to Galvin and Silberschatz, 5 queues are maintained in multilevel queue scheduling, each for:
System Process
Interactive Process
Interactive Editing Process
Batch process
Student Process ...
0
votes
0
answers
30
views
Looking for a multi-processor job scheduling strategy simulator
I hope this is the appropriate Stack Exchange site for questions like this.
Recently, a college student and I are looking for a robust software for simulating job scheduling in multi-processor ...
0
votes
1
answer
86
views
Which overhead is smaller - function call or passing variables between processes?
the question is related to networking frameworks; callback-based approach requires you to call a callback function every time you receive a new data packet; this is not a good approach for high-load ...
0
votes
1
answer
114
views
Reason that integers are used for priorities instead of float
Why are priorities always from a fixed set of integers? In operating systems priorities are integers typically between 1..MAX. But what is the reason that this is the case, when it would obviously be ...
1
vote
1
answer
1k
views
What happens if there is context switch while executing system call?
Suppose a process does system call, hence it goes to kernel mode, the registers are saved. Now the system call will be running in process' allocated kernel stack.
Can there be a context switch when a ...
0
votes
0
answers
69
views
Process Scheduling (SRTF)-
Consider a uniprocessor system with four processes having the
following arrival and burst times:
(i) Calculate the average waiting time and also the average
turnaround time if shortest (remaining) ...
0
votes
1
answer
1k
views
Questions regarding CPU scheduling algorithms ( Round Robin and Priority scheduling )
Consider the following processes :
1) My First Question is if we need to schedule them using preemptive priority scheduling with Round-Robin for equal processes priorities with a quantum of 3. Here ...
0
votes
1
answer
509
views
Round Robin, confused about how to processes are handled related to arrival order
See this picture, in parentheses are (arrival time, execution time required)
Why doesn't the "p5" process is processed before "p6"? Why do p3 and p4 are finished and p5 is ...
3
votes
1
answer
312
views
CPU scheduling Decisions
Operating System - CPU scheduling Decisions
The question above talks about why CPU scheduling does not take place when ready to running.
But I wonder why CPU scheduling does not take place when new ...
1
vote
1
answer
54
views
Why does taking advantage of locality matter in multithreaded systems?
As we all know, when a given thread/process reaches a memory address it does not have cached, the execution will (for the most part) freeze up until said data is fetched from memory. What I don't ...
0
votes
0
answers
28
views
Scheduling Repeating, Flexible Intervals with Restrictions on Overlap
I work in 52:17 work:break intervals, as there's some evidence showing it's an effective way to structure the day. However, meetings or planned breaks often require shifting that schedule, moving, ...
2
votes
1
answer
158
views
Scheduling algorithm for a student's study times given assignments, expected time, due dates, and class times
I would like to create an algorithm that advises a student when they should work on certain assignments given the expected time each assignment will take, and the due date of each assignment.
Say that ...
1
vote
1
answer
798
views
OS: Why is it necessary to have hardware support for implementing Preemptive Scheduling Strategies?
I think, Preemption can easily be done in kernel mode, where it just have to call the Context-Switch procedure. Also, based on algorithm we can select the new process from the ready queue as well...
I'...
12
votes
3
answers
26k
views
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 ...
1
vote
1
answer
266
views
Question about pointer in PCB structure and meaning of job queue
PCB structure exists inside kernel area. And in ready queue, which is Linked List, each Node of the queue is PCB.
And this mean PCB Node has the next address of PCB in the queue, right?? Then My ...
8
votes
6
answers
133k
views
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?
0
votes
0
answers
67
views
How to place the deadlines in “Earliest deadline first scheduling” in this question?
So I followed this tutorial to get the concept of "Earliest deadline first scheduling". I have to implement this task >>> TASK. Now the thing which I am not getting in this Task is ...
1
vote
1
answer
383
views
OS: Are User-level threads and software threads (and also kernel-level threads and hardware threads) the same?
I am referencing the Book Fundamentals of Computer Algorithms" by Ellis Horowitz et al.
At the part which they talk about multi-threading models, user-level and kernel-level thread are introduced....
2
votes
5
answers
3k
views
Operating System - CPU scheduling Decisions
I understand that CPU scheduling takes place on 4 circumstances listed below:
When the process changes state from Running to Ready
Changes state from Running to Waiting
Changes state from Waiting to ...
0
votes
2
answers
917
views
Does throughput includes CPU idle time also?
I have 3 processes P1,P2,P3 having gantt chart as follows =>
Now, CPU remains idle in 0 - 2 sec and 44 - 47 seconds as I/O is taking place.
Does, this affect throughput as 3 processes can be ...
0
votes
1
answer
4k
views
Operating Systems - SJN/Round Robin - turn around time + waiting time
2.(10 pts) a) You are given 4 processes in a batch system that all arrive at time 0 with the following CPU burst times:
P1 : 35, P2: 25, P3: 13, P4: 22. Assuming there is no context switch ...
2
votes
1
answer
387
views
Early Deadline First (EDF) scheduling in real-time systems feasibility test proof
I am trying to prove Theorem 6.2 on page 127 of the book Real-Time Systems by Jane W. S. Liu: http://www.cse.hcmut.edu.vn/~thai/books/2000%20_%20Liu-%20Real%20Time%20Systems.pdf
It is based on Early ...
0
votes
1
answer
1k
views
Confused between the terms Process and Process Control Block
I was reading about the Long term scheduler, when I read that when memory is not enough and load on the CPU due to multiprogramming is too high, a process might be moved to secondary storage space (...
-1
votes
1
answer
1k
views
Calculation of speed up of a program executed in multi-threaded system
Speed up of execution of a program is to be calculated within a multi-threading rather than a single thread system. The program's 30% instruction can be executed serially & rest can be executed ...
3
votes
1
answer
4k
views
User level threads are transparent to the kernel?
Find whether given statement True or False? Explain.
User level threads are transparent to the kernel?
My attempt :
False. Since, user level threads are managed by a user level library however, they ...
0
votes
2
answers
4k
views
Peterson's vs. Bakery Algorithm
From my CS course, the Peterson's Algorithm and the Bakery Algorithm both are solutions which satisfy the 3 requirements of any solution to the critical section problem. a) What are their adv/disadv ...