Processes and threads, Operating System

Processes and threads each have their place in multi-programming, generally to hide latency and to maximize CPU utilization. With the continuing spread of multi-core processors in personal computers, threads are becoming more and more important every day. There are now threads in almost every type of application, including client applications, not just server applications. Soon, there are likely to be multi-core processors even on cellphones, and there will be threaded applications on cellphones.

These multiple cores make it possible to run several different lines of processing at the same time, allowing the computer to runmuch faster than usual; because of this, however, programmersmust now explicitly make use of multi-threaded programming. Unfortunately, parallel programming is very confusing and error prone.

In general, parallel programming can be implemented either by using several concurrent pro- cesses, or by using threads. While processes have each their own address space (separate program counters, heaps, stacks, etc), threads share their address spaces; the programmer can use either of these to obtain concurrency. Besidesmaximizing CPU utilization, the use of parallel programming also helps to hide latency (e.g. waiting for the disk while using the CPU) and to handle multiple asynchronous events.

As a rough analogy, different processes are like different housing subdivisions: quite separate and protected from each other, and with communication possible but relatively dif?cult. In this analogy, different threads within the same process are like roommates:

communication and sharing is easy, but there's much less protection from each other's mistakes.

Posted Date: 3/12/2013 4:11:18 AM | Location : United States







Related Discussions:- Processes and threads, Assignment Help, Ask Question on Processes and threads, Get Answer, Expert's Help, Processes and threads Discussions

Write discussion on Processes and threads
Your posts are moderated
Related Questions
Explain the different sections of a process.     Entry section     Critical section     Exit section     Remainder section Consider a system inclusive of n processe

Scalability Scalability is the ability of the system to adapt to increased service load. A scalable system will respond more gracefully to increased load than a non scalable on

Hierarchical paging Single way is to use a two-level paging algorithm, in which the page table itself is also paged. A logical address is separated into a page number and a pag

why we say OS is a resource allocator and control program

Note that the parameter for scanf doesn't need the address operators & because name is an address. However the variable name has no defined space. This can cause problems within C

What is the essence of facility location in production operation management

Question 1 Explain single Partition Allocation and Multiple Partition Question 2 What is PCB? What useful information is available in PCB? Question 3 Explain Preemptive and No

Question 1 Brief the following distributed computing system model Question 2 Explain the components involved in implementation of RPC mechanism Question 3 What is

Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems? Symmetric multiprocessing t

Explain Wait for Graph a. Use a resource allocation graph to derive a wait-for graph.  b. Wait-for graph acquired by making an edge from p 1 to p 2 iff p 1 is waiting for