Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

One might argue that in general processes are more ?exible than threads. For one thing, they can live in two different machines, and communicate via sockets; they are easy to spawn remotely (e.g. ssh foo.cs.umass.edu "ls -l"); etc. However, using processes requires explicit com- munication and risks hackery. Threads also have their own problems: because they communicate through shared memory, they must run on the same machine and they require thread-safe code.

So even though threads are faster, they are much harder to program. In a sense, we can say that processes are far more robust than threads, since they are completely isolated from other another. Threads, on the other hand, are not that safe, since whenever one thread crashes the whole process terminates.

When comparing processes and threads, we can also analyze the cost of context switches. When- ever we need to switch between two processes, we must invalidate the TLB cache (the so-called TLB shootdown; see Section 6.2.3). Because warming up the TLB takes time, context switches for processes are slower.

On the other hand, when we switch between two threads, it is not necessary to invalidate the TLB, because all threads share the same address space, and thus have the same contents in the cache. In other words, on many operating systems, the cost of switching between threads is much smaller than the cost of switching between processes. Most large-scale systems use a mixture of processes and threads:

threads within a process on one server, communicating via a network socket to similar processes on other servers.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9527882

Have any Question?


Related Questions in Computer Engineering

What is the difference between dekkers algorithm and igloo

What is the difference between Dekkers Algorithm and Igloo approach? Please provide examples that can explain this.

Question you must use the following outline for your paper

Question: You MUST use the following outline for your paper. All direct and indirect quotes should be properly cited using APA formatting. All sections should be labeled. This week's paper is a final draft. All spelling, ...

Question what are the risks of transmitting data over an

Question : What are the risks of transmitting data over an unsecured Wi-Fi network? What steps are necessary to secure Wi-Fi Protected Access Network? Distinguish between client/server and file server architecture. Is te ...

Determine the critical values for a left-tailed test of a

Determine the critical? value(s) for a? left-tailed test of a population mean at the alpha α=0.01 level of significance based on a sample size of n=15.

Write a program in java to satisfy the following create a

Write a program in Java to satisfy the following : Create a class to store information on Network infrastructure assets. Network Infrastructure Asset may include PCs, Monitors, Switches, Routers, Cables, Access Points et ...

Decision support systems dss what sorts of dss tools do you

Decision support systems (DSS). What sorts of DSS tools do you use at your work - e.g., what-if analysis, sensitivity analysis, scenario analysis, goal-seeking analysis, optimization analysis, etc.? Even if you don't use ...

Please discuss the design principles that guide the authors

Please discuss the design principles that guide the authors of instruction sets in making the right balance. Provide examples of application of each of the three design principles while designing instruction sets.

Can someone please wirte a complete algorith in c language

Can someone please wirte a complete algorith in c language that works without any errors on Visual Studio 2015 Given a list of integers, write a C function, similar to the partition process in QuickSort, that will rearra ...

According to the same national collegiate athletic

According to the same National Collegiate Athletic Association data, the means and standard deviations of eligibility and retention rates (based on a 1,000-point scale) for the 2013-2014 academic year are presented, alon ...

Take a tour of your building on campus or at work what is

Take a tour of your building on campus or at work. What is secured at night when workers are absent? Record the location and type of physical access control devices. How do these access controls change at night when work ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As