1/31
Elliott pleasssee be nice to me
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Can Risks be stopped?
Risks cannot be stopped, but they can be mitigated
Fill in the blank: Each process controls its own ___
Each process controls its own address space
Threading involves individual threads with shared BLANK and BLANK ?
Threads contain shared RAM and Resources Sharing
Resource sharing between processes requires BLANK ?
Inter Process Communication (IPC.)
What are some questions you can ask when determining if you should use threading or processors for completing a task?
Is this a single process, that should use multiple threads?
Should I utilize multiple processors with inter processor communication?
What might you expect to see in a resource monitor (across CPUs), when implementing parallel processing in a correct way?
the utilization of many CPU cores, as opposed to the maxing out of a single CPU core’s capabilities/resources
List some advantages of Threading (4)
Threads are lightweight
Threads bear less overhead to create
Threads bear less overhead to terminate
The Operating System can switch between threads faster than it can with processors.
If a thread is “hogging” resources, what will the Operating system do?
The OS will force the thread to “sleep” by putting it to the top of the stack, temporarily freeing up resources for other instructions needing the core/processor that the thread is utilizing
True or False, multiple threads within the same process will share a process ID?
True, this can be thought of as one process, many sub processes.
True or False, the thread will always to run to completion, even if the process it is under is “dead”
False. If the process is dead, so too, will the thread die
Define concurrency?
Concurrency is the process of braking a program into many smaller parts, that can be run independently of each other
True or False, concurrency == parallelism
False. Concurrency is the sequential execution of threads
Frequent swapping of processes (especially in modern computers), gives the impression of a BLANK implementation?
Frequent swapping of processes gives the impression of a parallel implementation
Parallel is defined as?
More than 1 process or thread running simultaneously
parallel requires the right BLANK for implementation
parallel requires the right hardware for implementation
if cores are being used, and one is needed, the OS BLANK threads for processes
the OS context switches threads for processes
Concurrency is BLANK with tasks, and Parallel is BLANK tasks
Concurrency is dealing with tasks, and Parallel is doing tasks
True or False, Everything can be parallelised.
False, keyboards and mice are good examples
BLANK is often the target of parallel computing?
Data and related calculations/analyses are often the target of parallel computing
Matrix multiplication is a good example of which taxonomic class (in parallel computing)?
Single Instruction Multiple Data
What does an OS typically use to assign resources and processes?
A Scheduling Algorithm is typically used by the OS to assign resources and processes
True or False, detaching a thread kills it?
False, think of this as “dead to the process, but not dead literally)
What is a Daemon Thread? Provide a real world example
A Daemon thread is a thread that is no longer being managed; An 18 year old being kicked out of the house on their birthday
What command—for threads—will cause the main thread to continually check if the subthread is completed?
“.join()”
Every new process/function auto assigns what (in terms of parallel)
every new process auto assigns one thread
A main thread spawns children threads, that share BLANK
They share processor/process memory space
Picture the thread life cycle pictograph, within the “New” parentheses, what 4 items are within (instructions for new thread)
Setup
Allocation of memory
ID assignment
Queue Placement/Placement Within the Queue
Describe the visual representation that depicts the Thread Life Cycle
New (thread creation) → Runnable (thread on processor) —(waiting)→ Blocked (put on queue/sleep) —(resume)→Runnable→Terminated or Continues to loop
What are the 2 ways a Thread might stop running?
The thread is finished, or the parent is finished
True or False: A previously joined or detached thread is still joinable?
False. The thread remains unjoinable indefinitely
In parallel computing, you cannot control BLANK, but you can control BLANK
You cannot control execution, but you can control synchronization
Threads are given a pointer to the address of BLANK?
They are given a pointer to the address of a process