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
Pure and impure interpreters      In a pure interpreter, the source program is maintained in the source form throughout its interpretation. This arrangement acquires substantia

How is a process chosen for being swapped either in or out? Swap out: a.         If the process is idle. b.         If process has been in main memory for a long time.

Q. Consider a distributed system with two sites A and B. Consider whether site A can distinguish among the following: a. B goes down. b. The link between A and B goes down.

We will brie?y introduce paging to ?nish off this lecture. When a process is loaded, not all of the pages are immediately loaded, since it's possible that they will not all be need

Question : The file system is the most visible aspect of an operating system. It provides the mechanism for on-line storage and access to both data and programs of the operatin

Explain the Request or Response interface The Request/Response interface is ideal for a message based client-server interaction. By modeling components to interact via a reque

What are the advantages of Indexed allocation? The benefits are a. No external-fragmentation problem b. Solves the size-declaration problems. c. Supports direct access

Explain the ExitThread Function used in the Windows NT ExitThread(ExitCode) The ExitThread( ) call is made to end the currently running thread. If the current thread is th


For the first assignment you are required to construct a logic circuit onto a copper clad circuit board (vero board). This construction will require the use of planning the positio