Processes and threads, Operating System

Assignment Help:

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.


Related Discussions:- Processes and threads

Explain the sleep (ms) function, Explain the Sleep (ms) Function  This ...

Explain the Sleep (ms) Function  This call places the current thread in a suspended state for the number of milliseconds passed as the parameter (ms). After that Windows NT wil

Role of discovery and prototype, Discuss the role of discovery and developm...

Discuss the role of discovery and developmental prototypes in defining requirements for this project.Are throwaway prototypes appropriate, or should the project team quickly gather

Dynamically loadable kernel modules, Q. Dynamically loadable kernel module...

Q. Dynamically loadable kernel modules give elasticity when drivers are added to a system however do they have disadvantages too? Under what situations would a kernel be compiled

Homework, Write an application that does the following:(1) fill an array wi...

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

Explain swapping technique used in pre-3bsd unix systems?, What are the dis...

What are the disadvantages of swapping technique used in pre-3BSD UNIX systems? If there is excessively much memory contention, processes are swapped out until sufficient

Unix , A friend has promised to log in at a particular time. However, he ne...

A friend has promised to log in at a particular time. However, he needs to be contacted as soon as he logs in. The shell script checks after every minute whether he has logged in o

What happens when you high-level format a floppy disk, Question: a. The...

Question: a. The following questions refer to a generic Windows file system: i) Describe what happens when you high-level format a floppy disk? ii) What is the maximum size

What are the various disk-scheduling algorithms, What are the various disk-...

What are the various disk-scheduling algorithms? The several disk-scheduling algorithms are a. First Come First Served Scheduling b. Shortest Seek Time First Scheduling

Define the windowsnt, Define the WindowsNT WindowsNT provides a two-lev...

Define the WindowsNT WindowsNT provides a two-level approach to resource management: process and thread. The process is the uppermost level and contains most of the application

Define action that implementing meaning of instruction, Determine how Actio...

Determine how Action implementing instruction’s meaning are a actually carried out   Action implementing meaning of instruction are a actually carried out Instruction executio

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd