Questions tagged [process-scheduling]
Questions about how operating systems decide which process to execute at which time.
154
questions
0
votes
0
answers
18
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
0
answers
21
views
Deadline Monotonic formula with same priority
I have a question related with the response time of Deadline Monotonic scheduling...let's assume that there are 4 tasks, and the processor only allows to have 3 task priorities, thus there will be 2 ...
0
votes
1
answer
41
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
27
views
Which queue does `wait()` suspended process goes into?
According to javatpoint, ready and wait queue are different. But according to wikipedia they are synonymous, in this context. Now I am more confused.
What I want to know is, when the parent process ...
0
votes
0
answers
43
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
42
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
22
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 ...
0
votes
0
answers
34
views
Trapframe vs Scheduler Context in Process Management
So a process have scheduler context and trapframe and both of them are allocated in the kernel stack (kstack).
When process wants to transition from user mode to kernel mode, usually due to traps (...
0
votes
1
answer
102
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 ...
0
votes
0
answers
23
views
Problems with writing short job first algorithm(for scheduling of processes) in C language
Hy everyone.
I'm trying to write the SJF (short job first) algorithm NON-PREEMPTIVE for scheduling processes in C. I want to implement an algorithm that orders some processes by the burst of the ...
2
votes
1
answer
742
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
101
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
3
votes
1
answer
87
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
3
answers
86
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
2k
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
57
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
0
answers
76
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:
...
0
votes
0
answers
27
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
56
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
93
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 ...
0
votes
1
answer
173
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 ...
1
vote
1
answer
914
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
55
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) ...
3
votes
1
answer
269
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
43
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
1
answer
394
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 ...
0
votes
0
answers
27
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
130
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 ...
5
votes
1
answer
243
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 ...
1
vote
1
answer
727
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'...
1
vote
1
answer
235
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 ...
0
votes
0
answers
61
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
339
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....
1
vote
1
answer
4k
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: ...
2
votes
1
answer
327
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
719
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 (...
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
1
answer
678
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
0
answers
26
views
Understanding proofs Lemma 11 & 10 in this specific Computer Science Scheduling Paper
I'm having a hard time wrapping my head around the proofs Lemma 11 and Lemma 10 (Pages 10 and 11) in this paper called: Preemptive and Non-Preemptive Real-Time UniProcessor Scheduling.
Generally the ...
1
vote
1
answer
597
views
Polynomial-Time reduction from Partition to MakeSpan
Partition Problem:
Input: $A:=$ {$a_{1}, ..., a_{n} $}. $a_{i} \in \mathbb{N}$ $\forall i \in$ $\{1, \ldots, n\}$.
Question: Exists a subset $A_{1} \subset A$ with: $\sum_{a_{i} \in A_{1}} a_{i} = \...
2
votes
0
answers
49
views
Finding the timestamps of processes implementing Lamport's clocks
I have been asked this question, but don't know how to go about answering it.
Three process, which are implementing Lamport's clocks, are running and a lot of events are taking, place including some ...
1
vote
1
answer
163
views
Scheduling of process manufacturing with setup times
Overview
The process manufacturing is (in contrast to discrete manufacturing) focused on the production of continuous goods such as oil. The planning is typically solvable by means of Linear ...
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
0
answers
54
views
In completely fair scheduler in Linux, how to calculate the initial virtual run time of a process
I am trying to implement a completely fair scheduler. I want to know how to calculate the initial value of virtual run time of a process in order to insert the process into a red black tree
2
votes
1
answer
285
views
What is cold-start penalty ? What are some ways to reduce it?
when a new process is created using a fork() function, there is a cold start penalty, what is this and why does it happen?
1
vote
1
answer
239
views
Round Robin time slice(quantum time)
In all books about this topic, I read that there is a rule of thumb is that 80% of the process execution time is lower than time slice. But how do I calculate this value? I looked at every article ...
1
vote
2
answers
491
views
Does pre-emption of a process occur when that process is busy waiting?
I was reading about Peterson's Solution for Synchronisation. Let's assume the two shared variables to be int bool flag[2] and ...
2
votes
1
answer
53
views
How does a dual core microprocessors run so many programs?
I have a laptop with Intel dual core and it runs, the OS windows, and many application from Opera, age of empires, word, excel etc open at once just fine. If it only has 2 cores, how can so many ...
0
votes
1
answer
249
views
When does a semaphore issue a wait and when does it issue a signal?
In my textbook, Operating Systems: Internals and Design Principles (9th Edition) by William Stallings in chapter 5, it explains how semaphores work:
The fundamental principle is this: Two or more ...
1
vote
0
answers
347
views
Expected value of next CPU burst using exponential averaging
The burst time is needed for Shortest Job First (SJF) and Shortest Run Time First (SRTF) scheduling. To get the approximate burst time, we use the equation
$$\tau_{n + 1} = t_n + (1 - \alpha)\tau_n$$
...