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,551
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
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
  • 17.2k
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
  • 22.1k
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
  • 22.1k
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
  • 22.1k
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

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.4k
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,181
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

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

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
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

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
3 votes
Accepted

How does caching, paging, virtual memory, and OS all tie together for UNIX copy-on-write?

It seems like your understanding of the matter is pretty good. You are just missing one tiny trick: Make the pages read-only. When the OS forks the process, it maps ...
Jörg W Mittag'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

Operating System - CPU scheduling Decisions

When a process moves from running to ready, to waiting, or to finished, it just lost the use of the CPU, a CPU is free and the scheduler has to select a new process to run. When the scheduler selects ...
vonbrand's user avatar
  • 14k
2 votes

Operating System - CPU scheduling Decisions

The only way that a process can go from "ready" to "running" is if the scheduler just scheduled it. Running the scheduler as soon as the process started running would mean that you'd actually be ...
David Richerby's user avatar
2 votes

Question on Virtual memory and Physical memory

The page entry contains other things than the base of the physical page. Typically: a present or absent bit (to handle the case where the page is not present in the memory: is on disk or just does ...
AProgrammer's user avatar
  • 3,069
2 votes
Accepted

Peterson's vs. Bakery Algorithm

a) what are the advantages/disadvantages over each other? According to the lecture note: Sections 17.4.1 and 17.4.3, we can summarize as follows: The original Peterson’s Algorithm works with only 2 ...
hengxin's user avatar
  • 9,551
2 votes
Accepted

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

Your idea of interrupts is correct, but not how it works. The scheduler program will not raise an interrupt. Let's take the round robin algorithm you have mentioned. A process is going to run for a ...
kauray's user avatar
  • 519
2 votes

I/O bound processes over CPU bound processes

Take a sheet of paper. Assume you have one process that uses an I/O device for 5ms, then the CPU for 5ms, and so on, a total of one million times (5000 seconds I/O, 5000 seconds CPU). Assume another ...
gnasher729's user avatar

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