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
Question 1 Explain the following with respect to Resource Management in Distributed Systems- Task assignment Approach Load - Balancing Approach Load - Sharing Approach

WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE OPERATION OF OPERATING SYSTEM>?

Problem 1: (a) The grouping of organisational activities (usually into ‘departments' or larger ‘divisions') can be done in different ways. Outline 7 criteria which can be used

1. What must a kernel provide for an effective user-level thread implementation? 2. With respect to the quantum q in a scheduling algorithm, explain and discuss the impact of th

Question: A set of processes are in a deadlock state when every process in the set is waiting for an event that can be caused by only another process in the set. (a) There

Elimination of common sub expression during code optimization An optimizing transformation is a rule for rewriting a section of a program to enhance its execution efficiency wi

What is a reference string? An algorithm is evaluated by running it on a particular string of memory references and computing the number of page faults. The string of memory re

Multiprocessing - An Operating System proficient of utilizing and supporting more than one computer processor. Below are some instances of multiprocessing Operating Systems. Li

Determine a scheduling policy that is most suitable for a time-shared operating system   Round-Robin is a scheduling policy that is most suitable for a time-shared operating s

What is macro expansion