Question

In: Computer Science

What is the difference between a process and a thread? What prevents complete thread independence? Give...

  • What is the difference between a process and a thread?
  • What prevents complete thread independence? Give one specific example of a dependency.
  • What are the advantages/disadvantages of designing a concurrent program using threads versus events?

Solutions

Expert Solution

1. Difference between process and threads are listed below

Process Threads
Execution of a program Execution of a program driven by the environment of a process
isolated from other processes share memory and resources with eachother between threads
Needs more resources uses less resources
Less efficient comparatively in communication enhances efficiency in case of communication
Creation time is more creation time is less
Termination time is more

Less termination time

2. Threads are independent like process such that it has own program counter, register set , stack space and also the allocated time. But threads are not completely independent since it shares the code section, data section and is resources with other threads

3. The advantages are,

  • Enhanced performance by decreased development time.
  • Simplified and streamlined program coding.
  • Improvised GUI responsiveness.
  • Simultaneous and parallelized occurrence of tasks.
  • Better use of cache storage by utilization of resources.
  • Decreased cost of maintenance.
  • Better use of CPU resource.

The disadvantages are,

  • Complex debugging and testing processes
  • Overhead switching of context
  • Increased potential for deadlock occurrence
  • Increased difficulty level in writing a program
  • Produces unpredictable results

Related Solutions

What is the difference between a cost center and a profit center? Give a complete answer...
What is the difference between a cost center and a profit center? Give a complete answer that demonstrates what critical element distinguishes the profit center from the cost center.
1.What is the difference between process innovation and product innovation. What is innovating process' important? Give...
1.What is the difference between process innovation and product innovation. What is innovating process' important? Give and example of process innovation - try and find a company that has recently improved a process or procedure.
What is a program? What is a process? What is a thread?
What is a program? What is a process? What is a thread? Explain the differences/similarities in details between them.
1) Give 3 methods to determine machining time. 2) What is the difference between process optimisation...
1) Give 3 methods to determine machining time. 2) What is the difference between process optimisation and economic. 3) From your understanding, would the costing calculation make difference from one machining process to another.Why?
what is the difference between business process reengineering and business process management
what is the difference between business process reengineering and business process management
Write a complete answer for this, What is the difference between a group and a team?...
Write a complete answer for this, What is the difference between a group and a team? Which do you prefer? What organizations have been able to effectively manage groups and teams? Note / Type your answer, No hand writting
What is the difference between a conspiracy and collusion? Give examples.
What is the difference between a conspiracy and collusion? Give examples.
what is the difference between job costing and process costing?
what is the difference between job costing and process costing?
What is the difference between a zero-wait and a uis process?
What is the difference between a zero-wait and a uis process?
What is the difference between a reversible and irreversible process in chemistry?
What is the difference between a reversible and irreversible process in chemistry?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT