As of May 31, 2023, we have updated our Code of Conduct.
12 votes
Accepted

Does Deadlock imply Starvation

You should first state the deadlock freedom property and the starvation freedom property more precisely. I use the definition in the Book: The Art of Multiprocessor Programming; Section 2.2. Freedom ...
hengxin's user avatar
  • 9,431
9 votes
Accepted

The convoy effect in process scheduling

Convoy Effect is a result of using First-Come-First-Serve (FCFS) Scheduling algorithm. In this case the dispatcher (short term scheduling) feeds the processes present in ready state to the processor ...
Ugnes's user avatar
  • 311
7 votes
Accepted

Difficulty understanding pre-emptive vs non-preemptive CPU scheduling

In circumstances 1 and 4, the current process can't continue running. Therefore, there's no choice: the OS scheduler has to step in and select a different process. In circumstances 2 and 3, the OS ...
D.W.'s user avatar
  • 152k
6 votes
Accepted

User level threads are transparent to the kernel?

As, the linked answers and the explanations provided by your textbooks describe that, user level threads are transparent to the kernel, yes they are indeed. Kernel Level threads are not transparent ...
azam's user avatar
  • 429
6 votes

How does the OS determine the CPU burst time of a process?

Bursts values are needed for Shortest Job First (SJF) or Shortest Run Time First (SRTF) type scheduling. The burst is an estimate based on an initial starting default burst value and actual historical ...
Brian Hibbert's user avatar
6 votes
Accepted

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

If you are familiar with temporal logic, the difference is quite easy to demonstrate: Weak fairness is $FGp\to Fq$. That is, if $p$ holds from some point and on, then $q$ will hold eventually. ...
Shaull's user avatar
  • 16.7k
6 votes

Is there a generic word for "thread or process"?

A process is a context with one or more threads of execution (concurrent with other threads of execution, either in the same process, or perhaps in other processes), and with its own address space (...
Greg A. Woods's user avatar
5 votes
Accepted

Operating system processes

50% I/O wait time means that a process is not in execution(i.e. CPU is sitting idle) for 50% of the total time a process requires from CPU to complete itself(its execution). Thus CPU Utilization turns ...
Abhishek Kumar's user avatar
5 votes
Accepted

How exactly does a CPU do process scheduling?

The operating system arranges for periodic timer interrupts, which only it can handle, so it periodically regains control of the CPU without requiring the co-operating of any other process. Also, when ...
David Richerby's user avatar
5 votes
Accepted

Reason that integers are used for priorities instead of float

Historically, floating point has been slower than integer arithmetic, though this has not been the case for about 20 years on most non-embedded architectures. The more compelling reason is to optimise ...
Pseudonym's user avatar
  • 20.2k
5 votes
Accepted

Question about Context Switching

What I think is meant by "kernel registers" in this context is any values that are stored in registers within the kernel itself. Note: In what follows, I'm going to talk about what happens ...
Pseudonym's user avatar
  • 20.2k
4 votes

What guarantees do "soft" real-time operating systems actually provide

To define "soft real-time," it is easiest to compare it with "hard real-time." Speaking casually, most people implicitly have an informal mental model that considers information or an event as being "...
E. Douglas Jensen's user avatar
4 votes

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

The short answer is "it depends". If there is truly nothing to distinguish thread B from thread C, then the answer on most scheduler implementations will likely be either "could be B or C, and you ...
Pseudonym's user avatar
  • 20.2k
4 votes

Difficulty understanding pre-emptive vs non-preemptive CPU scheduling

yes, this is rather abstractly defined in your reference. for illustrative purpose lets take an example of what this means in practice. early mac programs say early 1990s and windows also were "non ...
vzn's user avatar
  • 11k
4 votes

Highest Response Ratio Next (Scheduling Algorithm)

It's a variation on Shortest Job Next (SJN) and is an attempt to avoid the starvation problems for estimated long running jobs on busy systems with many short running jobs. When a job has just hit ...
Brian Hibbert's user avatar
4 votes
Accepted

How can a spinlock progress when it's busy-waiting?

There might be other CPUs in the system, if one is busy waiting, another can be doing something. Furthermore, if the OS uses preemptive scheduling, the thread doing the busy wait might be preempted ...
Amaury Pouly's user avatar
  • 1,171
4 votes

What is the difference between a page and thread?

You're looking at very vague descriptions and asking "What's the difference between these things that haven't been described properly?" For a more detailed understanding, you should, well, look for ...
David Richerby's user avatar
4 votes

How does a dual core microprocessors run so many programs?

It's great that you're curious. A simplified explanation follows with a few links to delve into: All of the programs running in parallel is actually an illusion that is created by the OS. Even if we ...
ss09's user avatar
  • 96
3 votes
Accepted

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

When an I/O is started, it will typically have an I/O request structure associated with it that includes items like the process ID that the I/O belonged to. When the I/O completes the device driver ...
Brian Hibbert's user avatar
3 votes

Can you explain this exercise solution to me?

According to this article: F. J. Corbató, M. M. Daggett, R. C. Daley, An Experimental Time-Sharing System (IFIPS 1962), CTSS uses a "multi-level scheduling algorithm": The basis of the multi-level ...
hengxin's user avatar
  • 9,431
3 votes

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

A reasonable definition of bounded waiting is: After a process made a request to enter its critical section and before it is granted the permission to enter, there exists a bound on the number of ...
Wandering Logic's user avatar
3 votes
Accepted

A Dead-lock in an Operating System is

Your attempt "If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock." is ...
gnasher729's user avatar
  • 27.4k
3 votes
Accepted

Characterize an OS as multiprogrammed OS

Sorry That is not a complete answer but i hope it can help you . "One of the most important aspects of operating systems is the ability to multiprogram. A single program cannot, in general, keep ...
W.R.P.S's user avatar
  • 156
3 votes

Process Synchronization: Dekker's algorithm

When P1 runs again, it set its flag to True. Your scenario assumes P0 is executed continuously, while P1 never gets a chance to execute its code. This also happens in the simple case where there is ...
Ariel's user avatar
  • 13.3k
3 votes

OS: Why is it necessary to have hardware support for implementing Preemptive Scheduling Strategies?

A preemptive scheduler must stop a program that is looping and not calling any operating system function. The program is not triggering any fault as division by zero. We are assuming that the ...
Christian Gingras's user avatar
3 votes
Accepted

What happens if there is context switch while executing system call?

If the kernel decides to do a context switch, it's in response to some event which caused the processor to enter kernel mode. This can be either a system call or an interrupt (which can be a timer ...
Gilles 'SO- stop being evil''s user avatar
2 votes

Scheduling algorithms and quantum time

Round Robin is supposed to provide better response time to the OS. Every job has been given a fair share of the processing time (fixed quantum time). It avoids starvation. Since every job has a ...
JustinC's user avatar
  • 19
2 votes

What is the average turnaround time?

In textbooks, the solution given is 6+8+13+20+21= 68/5 = 13.6 This is because the textbooks (including Operating System Concepts 8e by Silberschatz,Gagne,Gelvin) define turnaround time as the time ...
orangemonkey's user avatar
2 votes

Can the processor just turn off the interrupt request line?

It depends on the processor arhitecture, but yes, most processors can turn off interrupts. Shutting them completely off is usually only done in special situations like booting or critical error ...
Brian Hibbert's user avatar
2 votes

Time quantum assignment to processes

It depends on what you are trying to achieve, but generally i/o intensive jobs should receive a higher priority, and a small time quantum. I assume you are asking about some variety of multilevel ...
Wandering Logic's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible