Questions tagged [process-scheduling]

Questions about how operating systems decide which process to execute at which time.

Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

Solving Scheduling Problem With Gradient Descent?

I try to solve some kind of scheduling problem and wonder if there exists any theory or implementations already. Assume my shop receives a set of orders $o\in O$, each of which consisting of a ...
user avatar
  • 215
0 votes
1 answer
111 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 ...
user avatar
  • 3
0 votes
0 answers
25 views

Can a First-Come First-Serve Scheduling gives a less waiting time than non-preemptive Shortest-Job-First Scheduling?

As the title says , Can a First-Come First-Serve Scheduling gives a less waiting time than non-preemptive Shortest-Job-First Scheduling ? Moreover , in the textbook "Operating system concepts&...
user avatar
  • 3
2 votes
1 answer
54 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 ...
user avatar
  • 21
0 votes
0 answers
28 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: ...
user avatar
  • 213
0 votes
0 answers
22 views

Where is the waiting queue maintained?

I am studying CS in college where they're teaching us process scheduling in OS concepts. What I understood is that a job queue is maintained in secondary memory and a ready queue is maintained in main ...
user avatar
0 votes
0 answers
20 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 ...
user avatar
1 vote
1 answer
5k views

HackerRank August 2021 Coding Challenge - Minimum Time Needed to Finish All Tasks

I was doing the HackerRank Coding Challenge and ran into this problem. I thought through it a bit but wasn't able to come up with a concrete solution, and going through the solution was not very ...
user avatar
0 votes
1 answer
43 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 ...
user avatar
  • 111
0 votes
0 answers
67 views

Process Response time in CPU scheduling

I'm Confused about Response time in CPU scheduling because i found different definition for it, so what is exactly the Response time ? Is it : the time between a process enters ready queue and get ...
user avatar
0 votes
1 answer
63 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 ...
user avatar
0 votes
1 answer
50 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 ...
user avatar
1 vote
1 answer
134 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 ...
user avatar
0 votes
0 answers
33 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) ...
user avatar
  • 157
3 votes
1 answer
115 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 ...
user avatar
1 vote
1 answer
32 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 ...
user avatar
  • 13
0 votes
1 answer
114 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 ...
user avatar
0 votes
0 answers
19 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, ...
user avatar
2 votes
1 answer
29 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 ...
user avatar
  • 21
3 votes
1 answer
138 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 ...
user avatar
1 vote
1 answer
444 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'...
user avatar
  • 41
1 vote
1 answer
93 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 ...
user avatar
0 votes
0 answers
28 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 ...
user avatar
0 votes
1 answer
192 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....
user avatar
1 vote
1 answer
2k 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: ...
user avatar
2 votes
1 answer
149 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 ...
user avatar
  • 71
0 votes
1 answer
231 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 (...
user avatar
  • 42
2 votes
1 answer
598 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, ...
user avatar
  • 453
0 votes
1 answer
298 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 ...
user avatar
  • 141
1 vote
0 answers
21 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 ...
user avatar
1 vote
1 answer
412 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} = \...
user avatar
2 votes
0 answers
35 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 ...
user avatar
1 vote
1 answer
144 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 ...
user avatar
0 votes
1 answer
577 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 ...
user avatar
0 votes
0 answers
23 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
user avatar
2 votes
1 answer
221 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?
user avatar
0 votes
1 answer
53 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 ...
user avatar
  • 3
1 vote
2 answers
343 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 ...
user avatar
2 votes
1 answer
44 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 ...
user avatar
0 votes
1 answer
120 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 ...
user avatar
1 vote
0 answers
189 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$$ ...
user avatar
1 vote
1 answer
232 views

What is Round Robin's behavior when a process comes at the same time that the old process is swapped out?

Let's say there are two processes: p1 and p2, their arrival time and service time are 0,2 and 3,1 respectively. The time quantum is 2s. After excuting for two seconds, will the processor excute p2 ...
user avatar
-1 votes
1 answer
561 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 ...
user avatar
3 votes
1 answer
707 views

How exactly does a CPU do process scheduling?

I know in theory how various scheduling algorithms work, such as round robin, where each process is given small time slices to run a few instructions, before the operating system passes execution onto ...
user avatar
0 votes
1 answer
331 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 ...
user avatar
  • 101
1 vote
0 answers
37 views

What approach to solve an open shop problem with following constraints

Say we have an open shop scheduling problem with following constraints : No wait-time between operations of a job Multiple job types (meaning each job type has different set of operations eventhough ...
user avatar
  • 11
1 vote
1 answer
333 views

Can a schedule be conflict serializable but not serializable?

A schedule is called conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations. Then, My question is: Can a schedule be conflict serializable but ...
user avatar
2 votes
1 answer
1k views

Appreciation of the 5 state process model

I'm starting out in an Operating Systems module. I have a few understanding questions to think about, which will not be gone through in class. A process state model is an abstraction (or model) which ...
user avatar
1 vote
0 answers
5k views

Difference between Response time, Execution time, and CPU time

I studied Computer Architecture from David A. Patterson and have came across the idea of Response time. Response time also called Execution time. The total time required for the computer to ...
user avatar
  • 111
0 votes
1 answer
20 views

multithreading - duration of jobs

" How long will it take for 2 jobs to complete if they're running in parallel, knowing that both have a total of 20 minutes of CPU usage time and 50% IO" I calculated the CPU usage: ...
user avatar