Essay: Working of Thread

Sample Essay

When the application is started it owns a single thread but it can create more threads, according to its requirement. “Each thread maintains exception handlers, a scheduling priority, and a set of structures that the system will use to save the thread context until it is scheduled” (Panchal 1).

(more…)

Essay: User-Level and Kernel-Level Threads

Sample Essay

Kernels supporting processes do not distinguish between a thread and its address space are sometimes referred to as heavyweight threads. The parallelism expressed using heavyweight threads is too inefficient because of two reasons. First is that the kernel treats a thread and its address space as a single entity, threads and address space are created, scheduled, and destroyed together. As a result, the creation and deletion of heavyweight threads are expensive. Second is the reallocation of a processor to a different address space (context switch) is expensive (Mukherjee 12).

(more…)

Essay: Forms of Threads

Sample Essay

Thread takes one of the two forms either single or multiple. Single threaded processes can perform one task at a time where as if a process has multiple threads of control then it can perform more than one task at a time Support for threads is provided either at user-level for user threads or at the kernel-level for the kernel threads. User threads are supported above the kernel and are managed without kernel support, where as kernel threads are supported and managed directly by the operating system.

(more…)

Essay: Function of Thread

Sample Essay

A multiprocessor computer “can simultaneously execute as many threads as there are processors on the computer”. The available processor time is divided by the operating system “among the processes or threads that need it”. The system works in the following way that it divides the processor time, among the threads, in slices. “The currently executing thread is suspended when its time slice elapses, allowing another thread to run”. The context of the thread which is suspended is saved. The context of the resume thread is restored in the queue. “The length of the time slice depends on the operating system and the processor”. This is actually the case on multiprocessor systems, where the executable threads are distributed among the available processors. “All management of threads is done through the System.Threading.Thread class, which represents a managed thread” (Panchal 1).

(more…)

Essay: Thread and Its Forms

Sample Essay

Disciplined concurrent programming can improve the structure and performance of computer programs on both uniprocessor and multiprocessor systems. As a result, support for threads, lightweight processes, has become a common element of new operating systems and programming languages. A thread is a sequential stream of instruction execution (Anderson1).    Thread is a basic unit of CPU utilization. It consists of a thread ID, a program counter, a register set, and a stack. Threads of the same process share its code section, data section and other operating system resources (Silberschatz 127).

(more…)