PROCESSES AND THREADS

Sleep and Wakeup
2994 views
Sleep and Wakeup

Both Peterson's solution and the solutions using TSL or XCHG are correct, but both have the fault of requiring busy waiting. Basically, what these solutions do is this: when a process wants to enter its critical region, it checks to see if the entry is allowed. If it is not, the process just

Semaphores
4560 views
Semaphores

This was the position in 1965, when E. W. Dijkstra (1965) suggested using an integer variable to count the number of wakeups saved for future use. In his suggestion, a new variable type, which he called a semaphore, was introduced. A semaphore could have the value 0,

Mutexes
1967 views
Mutexes

When the semaphore's ability to count is not required, a simplified version of the semaphore, called a mutex, is often used. Mutexes are good only for managing mutual exclusion to some shared resource or piece of code. They are easy and efficient to implement, which makes

Monitors
2171 views
Monitors

With semaphores and mutexes interprocess communication looks easy, right? Forget it. Look closely at the order of the downs before inserting or removing items from the buffer in Semaphores Figigure 1. Assume that the two downs in the producer's code were reversed in

Message Passing
1811 views
Message Passing

That something else is message passing. This method of interprocess communication uses two primitives, send and receive, which, like semaphores and unlike monitors, are system calls rather than language constructs. As such, they can easily be put into library procedures,

Barriers
1173 views
Barriers

Our last synchronization system is planned for groups of processes rather than two-process producer-consumer type situations. Some applications are divided into phases and have the rule that no process may proceed into the next phase until all processes are ready to

SCHEDULING
1810 views
SCHEDULING

When a computer is multiprogrammed, it often has multiple processes or threads competing for the CPU simultaneously. This situation happens whenever two or more of them are in the ready state at the same time. If only one CPU is available, a choice has to be made which

When to Schedule
1296 views
When to Schedule

A major issue related to scheduling is when to make scheduling decisions. It turns out that there are a variety of situations in which scheduling is required. First, when a new process is created, a decision needs to be made whether to run the parent process or the child

Scheduling Algorithm Goals
2076 views
Scheduling Algorithm Goals

To design a scheduling algorithm, it is essential to have some idea of what a good algorithm should do. Some goals depend on the environment (batch, interactive, or real time), but there are also some that are suitable in all cases. Some goals are listed in Figure

Scheduling in Batch Systems
2202 views
Scheduling in Batch Systems

It is now time to turn from general scheduling issues to specific scheduling algorithms. In this section we will study algorithms used in batch systems. In the following ones we will study interactive and real-time systems. It is worth pointing out that some algorithms are used in both

Page 3 of 4 Previous 1 2 3 4 Next