返回卡包市场

215-thinking-concurrently-elements-of-computational-thinking

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 9内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (9 张)

#1
正面 (问题)

Thinking concurrently

背面 (解答)

• spotting dependency patterns and related parts of problems where concurrent processing can be applied/process at same time • tasks are broken down into sub tasks -situation where you want carrying out more than one task at a given time

#2
正面 (问题)

concurrent processing pros

背面 (解答)

• possibly find solution faster, less time waiting as other tasks can be completed while perhaps waiting for user input • increase program throughput (processing in a given time) • availability of services e.g shouldnt have long running tasks delaying short ones • reactive programming, controllability

#3
正面 (问题)

concurrent processing cons

背面 (解答)

• memory intensive, threads expensive • if designed poorly can actually run slower than sequential counterparts even with multiple CPU cores -More difficult to debug and program • deadlock tasks indefinitely wait for each other: can occur more easily with many concurrent occurring at once • overhead switching and coordinating threads/communication between concurrent tasks • not all tasks are suited • longer to complete if large number of tasks involved concurrently and difficult to track to ensure consistent state of a program not corrupted

#4
正面 (问题)

parallel vs concurrent processing

背面 (解答)

concurrent single processor is switching between separate tasks so that all tasks appear to be being processed at the same time.

#5
正面 (问题)

concurrency

背面 (解答)

• can support two or more tasks in progress at same time, not necessarily simultaneously but creates the illusion when they’re being executed sequentially • several running processes given processor time slice. • carrying out more than one task at a given time

#6
正面 (问题)

single threaded vs multi threaded

背面 (解答)

Threads allow the processor to perform multiple tasks at the same time making the tasks faster. And also making the computer capable of multitasking. Due to threads only you are able to browse the web as well as listen to music simultaneously. threads handle a specific task/ a thread opened to handle all the tasks of a specific application single: linear execution flow, instructions one after the other, in a predetermined sequential path, executing functions in order and branching when necessary multi: can have multiple threads of execution running concurrently, each thread has a separate flow and execution, multiple parts of the program can execute simultaneously

#7
正面 (问题)

Reactive programming

背面 (解答)

User should be able to interact with applications while other tasks are running in the background. all OSes are built like this to support concurrency

#8
正面 (问题)

Parallelism vs concurrency

背面 (解答)

concurrent is support actions in progress at the same time. dealing with lots of things at once. -parallel is actions executing. simultaneously. doing lots of things at once.

#9
正面 (问题)

controllability

背面 (解答)

task that might require certain preconditions to proceed could be suspended and then wait until those preconditions are met before resuming execution transparently