# Tag Info

## Hot answers tagged process-scheduling

22

You've got it right, and Wikipedia is as informative as can be — soft real-time is not a formal characterization, it's a value judgement. Another way to say “soft real-time” is “I wish it was real-time”, or perhaps more accurately “it should be real-time but that's too hard”. If you really want to word in the form of a guarantee, it's a guarantee of best ...

11

They are more or less synonymous. Multiprogramming is more used when one CPU is involved, that is being switched from a process to the other, processes which are residing in memory simultaneously. Along came threads, and it wasn't switching between programs anymore... Processors, particularly the intel line, had the mechanisms for true multitasking (timer ...

10

The operating system performs a lot of work before executing the first instruction. The OS must set up at least two data structures, the page table and the region map. The region map is called different things in different operating systems. Inside the Linux kernel, for example, it is a linked list of memory-region objects and some kind of index (e.g. a ...

9

FCFS (First-Come, First-Served) scheduling can also cause blocking in a busy dynamic system in another way, known as the convoy effect. When one CPU intensive process blocks the CPU, a number of I/O intensive processes can get backed up behind it, leaving the I/O devices idle. When the CPU hog finally relinquishes the CPU, then the I/O processes pass ...

9

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 from Deadlock If some thread attempts to acquire the lock, then some thread (not necessarily the thread referred to in the if statement; emphasis added) will ...

8

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 in FIFO fashion. This is basically a simple implementation of Queue. Processes coming first gets to use the processor first. Since it implements the non-...

7

There are 3 common strategies to handle this: 1. Hypervisor traps system calls from guest: The hypervisor checks whether the privileged instruction(effectively system call) came from the guest OS itself, or from a user-space program within the guest OS. If it's the former case, then the hypervisor will actually forward the call to the hardware, although ...

7

Various peripherals are connected to the main processor. When an event happens in a peripheral, the peripheral sets an electric signal which causes the processor to take some action. The act of setting this signal is called an interrupt request (IRQ for short), and the aftermath of the interrupt request on the processor is called an interrupt. When a ...

7

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 scheduler has a choice: it can either allow the current process to continue running, or it could step in and put the current process to sleep and select a ...

6

My best guess: a student process is a process run by a student. All users have to log in. The OS may well know various types of users, and may be able to determine from some table that a given user is a student. This can be useful to lower their priority for computer time in a shared machine used mainly for research, or possibly do the opposite during exam ...

6

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 to the kernel, but user level threads are. Because you yourself said, that User Level Threads are managed by the User level library, and what happens is, the ...

6

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. Strong fairness is $GFp\to Fq$ (or sometimes $GFp\to GFq$). That is, if $p$ holds infinitely often, then eventually $q$ will hold (or $q$ will hold infinitely often, ...

6

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 (and usually other resources such as open file descriptors, IPC mechanisms, etc.). More subtle details and implications are described here So, if address space (...

5

The technique is called preemptive multi tasking. See for example this Wikipedia article. Basically the operating system runs every process for a short time, then suspends it and continues with the next process.

5

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 run values. A process is assigned a default estimated value for its first burst and after it has run the actual burst is known. The last estimated burst and ...

5

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 out to be //whereas 50% I/O time means it needs 50% of total execution time(10 minutes) to complete its I/O. 50%=50/100 = .5 thus the time needed to ...

4

In a multiprogramming system, if multiple processes are waiting for the CPU for execution in an F.C.F.S. system, and a slow processing process is utilizing the CPU then due to the convoy all fast processes waiting for CPU waits for unnecessarily long time. This is convoy effect.

4

For the Round-Robin Scheduler the quantum time is to ensure that each process has a share to the CPU and we don't have starvation problems. It's known for being fair, such that each process shares the CPU equality. Quantum time is it's the amount of time spent on each process in the CPU until we context switch to the next process in the ready queue. For ...

4

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 "real-time" • if, or to the extent that, it is manifest to them with a delay (latency) that can be related to its perceived currency • i.e., in a time ...

4

Linux with the -rt (real time) patchset provides a scheduler that provides an interesting guarantee that seems non-vacuous. (Although I'm not clear on how the guarantee can be put to real use.) The Linux-rt SCHED_FIFO scheduling policy works as follows: The user assigns a priority to every process. (The priority numbers for "real time" processes are 0-99, ...

4

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 preemptive". what this means is that every program that wants to run, if it is going to allow other programs to run, must call an OS "wait" subroutine in its ...

4

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 the scheduling queue it's wait time is zero and it's priority is 1. As the wait time increases it's priority is increased by a factor weighted by it's ...

4

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 can't predict which one in advance", or "the one which tried to acquire the mutex first" (i.e. first-come, first-served). However, there may be something which ...

4

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 and another thread will do something and release the lock for example. The signal might also come from an interrupt handler, for example if the thread is waiting ...

4

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 more detail, which is widely available. A page is a block of memory; a thread is a sequence of instructions to be executed.

4

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 a process tries to access the hardware, that is mediated by the operating system, which gives it another opportunity to decide which process to run next.

4

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 have a uniprocessor system, the OS can still achieve the same thing. For multiple programs running on the system, OS creates separate processes. Separate ...

3

Sounds like something's very wrong. My guess is that you are testing with a load that is too small. You should be able to increase the number of processes and at some point the 4-processor system should be able to handle about 4 times as many processes. Let's try a simple asymptotic analysis: Suppose we have $N$ processes each of which goes through the ...

3

More states aren't technically needed, depending on an operating system's implementation. A kernel can have a task scheduler running on each processor. This allows for the use of the same process states, since each scheduler is running independent of each other. The kernel can have "load balancing" between the processors so that not too many processes are ...

3

A context switch between two tasks takes a certain amount of time. Let's say that there are two runnable tasks on a particular system. Each context switch will take about the same time, say 0.1ms. If there is a context switch every 10ms, then each task is left to run for 9.9ms, then out of every 1ms period, 99% is spent running the tasks and 1% is spent in ...

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