operating system os

OS Threads

« Previous Tutorial Next Tutorial »

Each process has an address space and a single thread of control in every traditional operating systems.

Sometime, there are some frequent situations where it is possible to have multiple threads of control in the same address space running in quasi-parallel, as though they were separate processes except for the shared address space.

The main usage of thread is that in several application, multiple activities or jobs are going on in the same time (at once). Some of the activities may block from time to time.

By decomposing such type of an application into multiple sequential threads that run in quasi-parallel, the programming model becomes easier.

We can add a new element only with threads, the ability for the parallel entities to share an address space and all of its data among themselves. This ability is essential for some applications, which is why having multiple processes will not work.

Threads don't have any resources that are attached to them.

Unlike processes, threads are easier to create and destroy.

Creating a thread goes approximately hundred times faster than creating process.

Threads yield no performance again whenever all of them are Central Processing Unit (CPU) bound, but when there is substantial computing and also substantial Input/Output, having threads allows these activities to overlap, therefore speeding up the application.

You will learn all about threads in detail divided into the following tutorials:

« Previous Tutorial Next Tutorial »


Quick Links
Signup - Login - Give Online Test