Sunday, February 26, 2017

Multithreading

          In the last blog, we have discuss Multitasking.In this blog, we will discuss Multithreading in Operating System. It is not easy for some people to differentiate between Multi-threading, Multi-tasking and Multi-programming, but these are completely different ideas.

What is a thread?


Single and Multi Thread Process

     A thread is a basic unit of CPU utilization. Threads share a CPU in the same way as process do. All threads of a processes also share the same set of Operating System resources. All threads of a process inherit parent's address space and security parameters. Each thread of a process has its own program counter, its own register states, and its own stack. Thread is referred as mini-process or lightweight process

Multi-threading:


Multithreading

    Multithreading is the ability of an operating system process to manage its use by more than one user at a time and to even manage multiple requests by the same user without having to have multiple copies of the programming running in the computer. Each user request for a program or system service and here a user can also be another program, is kept track of as a thread with a separate identity. As programs work on behalf of the initial request for that thread and are interrupted by other requests, the status of work on behalf of that thread is kept track of until the work is completed.


No comments:

Post a Comment