Thread Models Term Paper

Total Length: 1103 words ( 4 double-spaced pages)

Total Sources: 1+

Page 1 of 4

Mx1, 1x1 and MxN, each having its own advantages and disadvantages. Although Mx1 is commonly acknowledge as an inferior model, there's plenty of debate about the merits of 1x1 versus MxN. Lately, the trend has been for several operating systems such as Solaris and Linux to move from a MxN model to the 1x1 model. This paper compares the pros and cons of each thread model and explores reasons behind the transition from the more scalable MxN to the simpler 1x1 model.

A thread is an independent flow of control within a process, composed of a context (a register set and a program counter) and a sequence of instructions that can execute independently of other sequences of instructions (Threads and the Java virtual machine). At application startup, all data is initialized. Each thread can access this global data and all user code as well as its own private storage, attributes and stack. Sequences that are independent of each other can be completed simultaneously as opposed to waiting for each sequence of the process to complete. Reducing the wait cycles for independent steps to complete in parallel maximizes the throughput of the application.

There are three types of thread models (Thread models). One model is called user threads or many to one (Mx1) threads. In this model, all program threads share the same process thread. The thread application programming interfaces enforce the scheduling policy and decide when a new thread runs. The scheduling policy allows only one thread to be actively running in the process at a time. And, the operating system kernel is only aware of a single thread of control (task) in the process.


A second thread model is called kernel threads or one to one (1x1) threads (Thread models). These threads are separate tasks associated with a The kernel thread model uses a pre-emptive scheduling policy in which the operating system decides which thread is eligible to share the processor. In an 1x1 thread model, there is a one-to-one mapping between program threads and process threads.

Some platforms support a combination of the Mx1 and 1x1 thread models (Thread models). This model is called a many to many (MxN) thread model and is a more complex implementation of kernel threads than the 1x1 model. Each process that has M. user threads shares N. kernel threads. The user threads are scheduled on top of the kernel threads. The system allocates resources only to the more "expensive" kernel threads.

Disadvantages of the Mx1 model far outweigh its benefits (Threads and the Java virtual machine). With Mx1 there is some concurrency because if one thread becomes blocked another thread will be scheduled to run. This thread model is lightweight because the kernel does not need to manage the required resources when creating, terminating and scheduling threads. However Mx1 has a critical limitation of not being able to take advantage of multiple CPU systems because a user thread is bound to the As a result, the kernel views the application as single threaded. And, because user threads aren't visible to the kernel, it is impossible to get detailed thread specific diagnostic information such as per thread CPU utilization.

In the 1x1 model, processes are containers for threads, which are the only scheduled entities (Threads and the Java virtual machine).….....

Show More ⇣


     Open the full completed essay and source list


OR

     Order a one-of-a-kind custom essay on this topic


sample essay writing service

Cite This Resource:

Latest APA Format (6th edition)

Copy Reference
"Thread Models" (2004, March 21) Retrieved May 22, 2025, from
https://www.aceyourpaper.com/essays/thread-models-166021

Latest MLA Format (8th edition)

Copy Reference
"Thread Models" 21 March 2004. Web.22 May. 2025. <
https://www.aceyourpaper.com/essays/thread-models-166021>

Latest Chicago Format (16th edition)

Copy Reference
"Thread Models", 21 March 2004, Accessed.22 May. 2025,
https://www.aceyourpaper.com/essays/thread-models-166021