PROCESSES AND THREADS

POSIX Threads
1886 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
1881 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

Hybrid Implementations / Scheduler Activations
1650 views
Hybrid Implementations / Scheduler Activations

Different ways have been considered to try to unite the benefits of user-level threads with kernel-level threads. One way is use kernel-level threads and then multiplex user-level threads onto some or all of the kernel threads, as shown in the following figure. When this approach is

Pop-Up Threads
3253 views
Pop-Up Threads

Threads are often useful in distributed systems. An important example is how incoming messages, for instance requests for service, are managed. The usual approach is to have a process or thread that is blocked on a receive system call waiting for an incoming message.

Making Single-Threaded Code Multithreaded
1518 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
1334 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
2047 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
1995 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.

Mutual Exclusion with Busy Waiting
2819 views
Mutual Exclusion with Busy Waiting

In this section we will study various proposals for achieving mutual exclusion, so that while one process is busy updating shared memory in its critical region, no other process will go into its critical region and cause trouble.

Peterson's Solution
2903 views
Peterson's Solution

By combining the idea of taking turns with the idea of lock variables and warning variables, a Dutch mathematician, T. Dekker, was the first one to plan a software solution to the mutual exclusion problem that does not require strict alternation. For a discussion of Dekker's algorithm, see (Dijkstra,

Page 2 of 4 Previous 1 2 3 4 Next