Process

Modeling Multiprogramming
3265 views
Modeling Multiprogramming

When multiprogramming is used, the CPU utilization can be improved. Crudely put, if the average process computes only 20% of the time it is sitting in memory, with five processes in memory at once, the CPU should be busy all the time. This model is unrealistically hopeful,

POSIX Threads
1893 views
POSIX Threads

To make it possible to write portable threaded programs, IEEE has described a standard for threads in IEEE standard 1003.1c. The threads package it describes is called Pthreads. Most UNIX systems support it. The standard defines over 60 function calls, which is far too many to

Implementing Threads in the Kernel
1885 views
Implementing Threads in the Kernel

Now let us examine having the kernel know about and manage the threads. No run-time system is required in each, as shown in Fig. 1-(b) of previous article "Implementing Threads in User Space". Also, there is no thread table in each process. Instead, the kernel has a thread table

Making Single-Threaded Code Multithreaded
1523 views
Making Single-Threaded Code Multithreaded

Many current programs were written for single-threaded processes. Converting these to multithreading is much complicated than it may at first appear. Below we will study just a few of the drawbacks.

INTERPROCESS COMMUNICATION / Race Conditions
1337 views
INTERPROCESS COMMUNICATION / Race Conditions

Processes often need to communicate with other processes. For instance, in a shell pipeline, the output of the first process must be passed to the second process, and so on down the line. In this way, there is a need for communication between processes, preferably in a

INTERPROCESS COMMUNICATION / Race Conditions
2049 views
INTERPROCESS COMMUNICATION / Race Conditions

Processes often need to communicate with other processes. For instance, in a shell pipeline, the output of the first process must be passed to the second process, and so on down the line. In this way, there is a need for communication between processes, preferably in a

Critical Regions
2002 views
Critical Regions

How do we avoid race conditions? The key to preventing trouble here and in many other situations involving shared memory, shared files, and shared everything else is to find some way to forbid more than one process from reading and writing the shared data at the same time.

Sleep and Wakeup
2825 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

When to Schedule
1261 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

Shortest Process Next
1818 views
Shortest Process Next

Because shortest job first always creates the minimum average response time for batch systems, it would be nice if it could be used for interactive processes as well. To a certain extent, it can be. Interactive processes usually follow the pattern of wait for command, execute

Page 2 of 3 Previous 1 2 3 Next