Skip to main content

Questions tagged [process-scheduling]

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

Filter by
Sorted by
Tagged with
-3 votes
1 answer
989 views

A Dead-lock in an Operating System is

A Dead-lock in an Operating System is Desirable process Undesirable process Definite waiting process All of the above My attempt: As "If a process is unable to change its state indefinitely because ...
Mithlesh Upadhyay's user avatar
1 vote
0 answers
68 views

How to partition a digraph for later parallel computation? [duplicate]

I have a directed graph where all the nodes represent some task that needs to be computed. I need to compute the order of these tasks and also detect any cycles. Running Tarjan's algorithm on the ...
Chicony's user avatar
  • 153
1 vote
2 answers
1k views

Question on Virtual memory and Physical memory

This is the question where I'm stuck: With a 32-bit virtual address, 4 KB pages(12 offset bits), and 4 bytes per page table entry, we can compute the total page table size: Number of page table ...
electronics's user avatar
3 votes
2 answers
2k views

Is bounded waiting ensured in given version of Dekker's solution for critical section problem?

William Stallings discuss various step by step process in developing Dekker's algorithm in his Operating Systems book. In process, he reaches to following version of algorithm (which is incomplete as ...
Mahesha999's user avatar
  • 1,773
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 ...
Dhruv Ghulati's user avatar
1 vote
1 answer
2k views

How does the OS Scheduler give/take control of HW?

Imagine a uniprocessor system with a simple operating system with non-threaded processes and basic virtual memory (paging, no segmentation, no replacement to disk, etc). Now assume a simple ...
Dylan Jager-Kujawa's user avatar
-1 votes
1 answer
2k views

Two threads are waiting on a mutex. Which one is unblocked?

Suppose there are three threads A, B, C and thread A has acquired a mutex lock and it is processing. If threads B and C try to acquire the same mutex, they will be blocked according to the mutex lock ...
user avatar
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 ...
user921020's user avatar
5 votes
1 answer
5k views

example for weakly fair v.s. strongly fair scheduling in concurrency

I am having difficult time understanding the difference between weakly fair and strongly fair schedulers. Can someone provide an example and explain how they are different? for reference, here are ...
JDOdle's user avatar
  • 153
1 vote
1 answer
393 views

How and which component of an Operating System is responsible for the transition of a process from the blocked state to the ready queue?

A process in an Operating System is considered to occupy several states and a process transitions between these states. A scheduler is responsible for assigning CPU time to a process. However, a ...
kauray's user avatar
  • 519
-3 votes
1 answer
131 views

Which process comes first?

Let's say we have 3 processes: Process 1 service time 6 arrival time 0 Process 2 service time 2 arrival time 1 Process 3 service time 5 arrival time 3 We know that: after 1 time, process 2 will ...
user avatar
0 votes
1 answer
2k views

Can you explain this exercise solution to me? [closed]

A process running on CTSS (Compatible Time Sharing System) needs 30 quanta to complete. How many times must it be swapped in, including the very first time (before it has run at all)? • Answer : The ...
Luna M's user avatar
  • 11
3 votes
3 answers
10k views

Highest Response Ratio Next (Scheduling Algorithm)

In CPU scheduling HRRN(Highest Response Ratio Next) algorithm chooses the next process to be scheduled using the formula (W+S)/S where W-> waiting time & S->Service Time. Can someone share their ...
Ryan sams's user avatar
  • 376
5 votes
1 answer
15k views

Operating system processes

I'm a bit confused about this question: "Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing 10 minutes of CPU time, start ...
user2976568's user avatar
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 ...
Mithlesh Upadhyay's user avatar
8 votes
2 answers
11k views

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? ...
Ryan sams's user avatar
  • 376
0 votes
2 answers
375 views

Is the program in secondary memory can be a process?

Let us consider the following scenario, The cpu started executing a program, which is in secondary memory with n lines of code, so, it brings m ( < n ) lines of code in to main memory and started ...
hanugm's user avatar
  • 515
1 vote
0 answers
117 views

Processes running in Distributed Systems (Advanced Operating System)

I had a test today, there was a question that was a bit confusing. Anyway I am asking the question, from memory, and explaining what I answered. It would be great if someone could explain if I did ...
Deewanagan's user avatar
6 votes
2 answers
2k views

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 ...
FrostyStraw's user avatar
2 votes
1 answer
1k views

Starvation Condition in CPU/Process Scheduling?

Let's say OS is using preemptive CPU scheduling. A process P1 gets a chance to run for some time and then next higher priority process comes and preempts P1. After that higher priority processes are ...
Neelesh Shukla's user avatar
1 vote
1 answer
691 views

Can the processor just turn off the interrupt request line?

I was doing some of the interrupts question online and found this Multiple choice question How can the processor ignore other interrupts when it is servicing one a) By turning off the interrupt ...
alkabary's user avatar
  • 133
2 votes
0 answers
317 views

Optimality of EDF

For Earliest Deadline First, I have read that if utilization is less or equal to 1, the task set is schedulable under EDF. But does this criteria expresses the optimality for EDF? If not, how can we ...
Dumbo's user avatar
  • 121
3 votes
1 answer
1k views

Time quantum assignment to processes

In a book I am reading it is stated that an input/output intensive process should receive a higher time quantum whereas a computing intensive process on the other hand should receive a lower one. Here ...
Omar Sharaki's user avatar
2 votes
0 answers
134 views

Processes concurrency

I am getting ready for my end of year exams and I got stuck on this question. Consider the following 3-process concurrent program which uses semaphores S1, ...
Fellow Rémi's user avatar
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 ...
MAKZ's user avatar
  • 139
2 votes
1 answer
5k views

Can Shortest Job First Scheduling be subject to convoy effect?

Look at the below table for example : Look at the Non-Preemptive SJF table Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have ...
Siddharth Thevaril's user avatar
1 vote
2 answers
4k views

Switching between user-level and kernel-level threads

After reading difference between user-level threads and kernel-level threads ,now I am in doubt of context switching.Context switching is managed by OS when switching between processes/threads but ...
tonny's user avatar
  • 59
0 votes
1 answer
1k views

Round-Robin Scheduler - What exactly is the quantum time used for?

Suppose you have three stages for a job: Creation stage = the job gets created Executing stage = the job is executed/served Finishing stage = the job is "marked" as finished. Now, say the quantum ...
Force444's user avatar
  • 137
5 votes
1 answer
3k views

How are system calls handled in a virtual machine?

Quoting wikipedia, a system call is: In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services (e.g. ...
Adam Matan's user avatar
18 votes
3 answers
3k views

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 ...
Wandering Logic's user avatar
3 votes
1 answer
79 views

Which process states exist a multi-processor machine?

In a single-processor architecture, A process might be New, Ready, Running, Blocked and Terminated. Are there any additional states in a multi-processor architecture?
Adam Matan's user avatar
0 votes
1 answer
530 views

Does a multi cpu system not improve the first come first serve (fcfs) cpu scheduling algorithm?

I created a program that simulates the fcfs scheduling algorithm. First I implemented it for a single core, then modified it for four homogenoues cpus. I compared the results with several datasets, ...
Deniz Cetinalp's user avatar
4 votes
1 answer
5k views

How does the OS know the physical address of a process' first memory page?

If I have a program, its instructions are stored on the hard drive. When I double-click the executable the pages of memory for this process must get loaded in to RAM. However, for the pages to get ...
user3811839's user avatar
2 votes
0 answers
45 views

How can I talk about priority inversion if it's impossible to specify priority?

In the paper: Leslie Lamport: What It Means for a Concurrent Program to Satisfy a Specification: Why No One Has Specified Priority; ACM Symp Principles of Programming Languages, (POPL-12):78-83, ...
Wandering Logic's user avatar
1 vote
1 answer
387 views

How to build/recognise a deadlock-free order of resources

I have been faced with a problem where three concurrent processes X, Y ,Z execute three different code segments that access and update certain shared variables. Before entering the respective code ...
khk's user avatar
  • 111
0 votes
3 answers
15k views

Exponential averaging for SJF CPU scheduling

Calculate the exponential averaging with $T_1 = 10$, $\alpha=0.5$ and the algorithm is SJF with previous runs as $8,7,4,16$. 9 8 7.5 None I am getting 4. None as the answer. But ...
Utkal Sinha's user avatar
1 vote
1 answer
6k views

What happens when time slices are too short or too long?

What bad things can occur when the lengths of the time slices in a multitasking system are too small? What can happen when they are too big? How should the length of the time slice be chosen?
user3053142's user avatar
1 vote
1 answer
474 views

processes response time confusion

An OS contains 10 identical processes that were initiated at the same time.Each process contains 15 identical requests. Each request consume 20 msec of CPU time.A request is followed by an I/O ...
user1745866's user avatar
3 votes
1 answer
734 views

A variant of job assignment (scheduling) problem with variable time span

The problem is a scheduling problem with n jobs and k machines. Each job i can be started at any time, but its duration is not exactly known except a time span interval. For example, a job may take ...
Mohsen's user avatar
  • 31
0 votes
2 answers
5k views

Disk scheduling and process scheduling

Whats the diffrence between Disk scheduling and process scheduling? I mean i know the roles of disks and processes, but it seems to me they both have the same aim. to reduce monopolies, they even both ...
joker's user avatar
  • 3
7 votes
4 answers
27k views

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 ...
jsj's user avatar
  • 670
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 ...
jsj's user avatar
  • 670
8 votes
2 answers
5k views

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's user avatar
2 votes
1 answer
534 views

Process state in multi threaded process

What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)
Ram's user avatar
  • 21
4 votes
2 answers
3k views

Scheduling algorithms and quantum time

I would like to know what impacts does a scheduling algorithm, let's say Round Robin or FIFO, have on an Operating System. I understand that a scheduling algorithm has the processes run in burst then ...
MNM's user avatar
  • 141
7 votes
1 answer
2k views

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 ...
Ankit's user avatar
  • 1,337
9 votes
4 answers
15k views

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 ...
Ockham's user avatar
  • 263
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?
Sheldon's user avatar
  • 803
6 votes
2 answers
10k views

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 ...
Sheldon's user avatar
  • 803
9 votes
2 answers
2k views

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 ...
Gilles 'SO- stop being evil''s user avatar