June 2013 Archive


Implementation of Processes
1589 views
Implementation of Processes

To implement the process model, the operating system maintains a table (an array of structures), called the process table, with one entry per process. (Some authors call these entries process control blocks.) This entry includes important information about the process state,

Modeling Multiprogramming
2771 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,

THREADS
2070 views
THREADS

In usual operating systems, each process has an address space and a single thread of control. In reality, that is almost the definition of a process. However, there are often situations in which it is desirable to have multiple threads of control in the same address space running in

The Classical Thread Model
4029 views
The Classical Thread Model

Now that we have seen why threads might be helpful and how they can be used, let us examine the idea a bit more closely. The process model is based on two independent ideas: resource grouping and execution. Often it is beneficial to separate them; this is where threads

POSIX Threads
1595 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
1643 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
1394 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
2598 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
1301 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
1118 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

Page 1 of 2 Previous 1 2 Next