Skip to main content

Multi threading operating system

 


Multi threading 

operating system

·         Multi threading is a technique in which a process, executing an application is divided into threads that can run concurrently

·         A thread is a dispatch able unit of work. It includes  a processor context and its own data area for sack .

·         A thread execute sequentially and is interruptible so that the processor can turn to another thread.

·         Thus, a thread represents a light weight process and is the smallest unit of CPU utilization it is like a mini process.

·         A process, on other hand is a collection of one or more threads and associated system resources

·         A thread is not a process by itself. Cannot run on its own. It always run within a process.

·         Thus, a multithreaded process may have multiple execution flows, different once belonging to difficult threads.

 

Multi Threading Operating 

System

A thread is not a process by itself .it cannot run on its own. It always run within a process

 



 

The various States exhibited by windows thread are:

1.       Ready. A ready thread may be scheduling for execution. The kernel dispatcher keeps track of all ready threads and schedules them in priority order.

2.       Standby. A thread that has been selected to run next on a particular processor is said to be in standby state. The thread waits in this state until the processor is made available.

3.       Running the thread that is currently CPU is in running state.it keeps the processor until it is preempted by a higher priority thread or it gets blocked or its time slice expires.

4.       Waiting. A thread enters waiting state when:

(a)    It is blocked on event .

(b)   It voluntarily waits for synchronization purpose.

(c)    An environment subsystem directs the thread to suspend itself.

When waiting condition is satisfied, the thread moves back to ready state if all the resource are available.

5.       Transition. A thread enters this state after waiting if it is ready to run but resources are not available.

6.       Terminated. A thread can be terminated by itself, by another thread or when its parent process terminates.

Comments

Popular posts from this blog

Monolithic Architecture

  Monolithic Architecture Monolith means composed all in one piece. The  Monolithic  application describes a single-tiered  software  application in which different components combined into a single program from a single platform. Components can be: Authorization — responsible for authorizing a user Presentation — responsible for handling HTTP requests and responding with either HTML or JSON/XML (for web services APIs). Business logic — the application’s business logic. Database layer — data access objects responsible for accessing the database. Application integration — integration with other services (e.g. via messaging or REST API). Or integration with any other Data sources. Notification module — responsible for sending email notifications whenever needed. Example for Monolithic Approach Consider an example of Ecommerce application, that authorizes customer, takes an order, check products inventory, authorize payment and ships ordered products. This applicat...

Service provided By An Operating System.

  List of five service provided by an operating system. Explain how  each provides convenience to users?     The main purpose of operating system is to provide environment for the execution of programs. Thus an operating system provides certain services to program and the users of those programs. However , different operating system can provide different set of service. Some of the basis services provided by operating system are: 1.         Program execution ·          Operating system provides a convenient environment where users can run their programs ·          The operating system performs memory allocation to programs, load them into appropriate location so that they can execute. The users need not to worry about all these tasks.   2.         I/O Operation ·        ...

Message Delivery Protocol

  Message Delivery Protocol ·          A protocol is a set of rules and conventions shared by communicating entities . ·          Message passing can be blocking or non blocking . ·          In blocking protocol , a sender process is blocked till the message selivered to the . in this case , sender process has guarantee that the message sent by it ie delivered before it continues its execution . A blocking protocol normally includes: 1.        Blocking send : the sender process is blocked until the message is received by the receiving process or by the mailbox. 2.        Blocking receive : the receiver nlocks until a message is available thus when both sender as well as receiver is blocked ,it is known as rebdevezevous . this combination allows for tight sysnchronization between process. ·...

Thread

Thread What is Thread? A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history. A thread shares with its peer threads few information like code segment, data segment and open files. When one thread alters a code segment memory item, all other threads see that. A thread is also called a  lightweight process . Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process. Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation ...

Easytolearn E-book 2

                                                                                                                                                                          Description:here we give you pdf. about classification of operating system in which  we provide all information of classification in detail.