Thinking Concurrently (OCR A-Level Computer Science): Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
Definition of concurrency
Definition of concurrency
The ability to execute multiple tasks/processes simultaneously or overlap their execution
Purpose of concurrency
Purpose of concurrency
Optimise resource usage & reduce total execution time
Thinking concurrently involves determining...
Thinking concurrently involves determining...
Which tasks are independent & which are dependent
Independent tasks in concurrency
Independent tasks in concurrency
Tasks that can run in parallel without affecting correctness
Dependent tasks in concurrency
Dependent tasks in concurrency
Tasks that must be completed before others can start
Benefit: Increased efficiency in concurrency
Benefit: Increased efficiency in concurrency
Tasks completed faster by using system resources effectively
Benefit: Improved resource utilisation
Benefit: Improved resource utilisation
Better use of multi-core processors & distributed systems
Benefit: Reduced latency in concurrency
Benefit: Reduced latency in concurrency
Users experience faster responses as tasks run simultaneously
Challenge: Data dependency issues in concurrency
Challenge: Data dependency issues in concurrency
Race conditions or inconsistent states when tasks share data
Challenge: Deadlocks in concurrency
Challenge: Deadlocks in concurrency
Tasks wait indefinitely for each other, causing standstill
Challenge: Increased complexity in concurrency
Challenge: Increased complexity in concurrency
Harder to design & debug due to synchronisation needs
Threading as a concurrency tool
Threading as a concurrency tool
Using multiple threads to execute tasks concurrently
Asynchronous programming as concurrency tool
Asynchronous programming as concurrency tool
Tasks initiated without waiting for completion
