2.1.5 Thinking Concurrently
暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。
卡片预览 (6 张)
dealing What is meant by thinking concurrently?
• Skill which involves working out which parts of a program can be developed to take place or be processed at the same time • An application is making progress on more than one task at the same time
slice What is concurrent processing?
• When each task is given a slice of processor time to make it look like the tasks are being completed simultaneously when in reality they are executed sequentially • A system is said to be concurrent if it can support two or more actions in progress at the same time
smaller What is parallelism?
Application splits the tasks into smaller subtasks which can be processed in parallel
multiple What is parallel processing?
When multiple processors are used to complete more than one task simultaneously
RANT What are the advantages of concurrent processing?
• Reactive programming: User can interact with the application while other tasks are running in the background • Availability of services: A long running task won’t delay a short running one • Number of tasks completed in a given time is increased • Time wasted by the processor waiting for a user interaction or another process is reduced
TLR What are the disadvantages of concurrent processing?
• Takes longer to process if there’s a large number of users or tasks involved as tasks cannot be completed at once • Liveness: Tasks can suspend and wait on eachother indefinitely, causing a deadlock • Resource consumption: Threads can consume resources in terms of scheduling, context-switching and synchronisation