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
Write a note on semaphores A semaphore is a tool meant for synchronizing multiple processes trying to access a shared variable. That is a semaphore is used to deal with the cri

What are Tree-structured directories We can generalize the directory structure to a tree of arbitrary height. This permits the user to create their own sub directories and to c

What are the objectives and functions of operating system? Functions of operating systems 1.      It allocates the resources and acts as a supervisor. 2.      It hides th

What are the different file operations? Create : - Space for the file in the file system update directory table. Write : - file name and data to be written is

why we say OS is a resource allocator and control program

Example 1.  The diagram illustrating the data structures of in-memory VFS objects and on-disk objects and their relationships on slide 24 of the lecture notes OSD.4. This diagram i

How File record length should be chosen File record length should be selected to match the data characteristics

Performance of demand paging Demand paging can have an important effect on the performance of a computer system. As long as there are no page faults, the effective access time

Can you give me assistance on my operating system assignment?

How can an index file be used to speed up the access in direct-access files? Have an index in memory; the index gives the key and the disk location of its corresponding record.