2.1.5 Thinking Concurrently Flashcards
Thinking Concurrently
Thinking Concurrently : Trying to solve different parts of a problem at the same time.
Thinking Concurrently : Concurrent Processing
Concurrent Processing :
- Different instructions processed at the same time
- Each Process given a slice of CPU time
- One process can start before another one finishes (can pipeline)
Advantages :
- More efficient processor use - greater throughput as processor idle for less time so completion in less time.
- Long running tasks don’t delay short running tasks
- Tasks requiring preconditions can wait then resume execution
- User can interact with computer while other tasks running
- so user input doesn’t delay tasks and leave CPU Idle.
Disadvantages :
- Overhead in coordinating and switching between processes
- Not all tasks suited to being broken up and performed concurrently - some tasks dependent on other tasks.
- Program increases complexity - has to be designed to have multiple parts processed concurrently.