Parallel Computing Week 2

0.0(0)
studied byStudied by 7 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

flashcard set

Earn XP

Description and Tags

Elliott pleasssee be nice to me

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Can Risks be stopped?

Risks cannot be stopped, but they can be mitigated

2
New cards

Fill in the blank: Each process controls its own ___

Each process controls its own address space

3
New cards

Threading involves individual threads with shared BLANK and BLANK ?

Threads contain shared RAM and Resources Sharing

4
New cards

Resource sharing between processes requires BLANK ?

Inter Process Communication (IPC.)

5
New cards

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?

6
New cards

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

7
New cards

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.

8
New cards

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

9
New cards

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.

10
New cards

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

11
New cards

Define concurrency?

Concurrency is the process of braking a program into many smaller parts, that can be run independently of each other

12
New cards

True or False, concurrency == parallelism

False. Concurrency is the sequential execution of threads

13
New cards

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

14
New cards

Parallel is defined as?

More than 1 process or thread running simultaneously

15
New cards

parallel requires the right BLANK for implementation

parallel requires the right hardware for implementation

16
New cards

if cores are being used, and one is needed, the OS BLANK threads for processes

the OS context switches threads for processes

17
New cards

Concurrency is BLANK with tasks, and Parallel is BLANK tasks

Concurrency is dealing with tasks, and Parallel is doing tasks

18
New cards

True or False, Everything can be parallelised.

False, keyboards and mice are good examples

19
New cards

BLANK is often the target of parallel computing?

Data and related calculations/analyses are often the target of parallel computing

20
New cards

Matrix multiplication is a good example of which taxonomic class (in parallel computing)?

Single Instruction Multiple Data

21
New cards

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

22
New cards

True or False, detaching a thread kills it?

False, think of this as “dead to the process, but not dead literally)

23
New cards

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

24
New cards

What command—for threads—will cause the main thread to continually check if the subthread is completed?

“.join()”

25
New cards

Every new process/function auto assigns what (in terms of parallel)

every new process auto assigns one thread

26
New cards

A main thread spawns children threads, that share BLANK

They share processor/process memory space

27
New cards

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

28
New cards

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

29
New cards

What are the 2 ways a Thread might stop running?

The thread is finished, or the parent is finished

30
New cards

True or False: A previously joined or detached thread is still joinable?

False. The thread remains unjoinable indefinitely

31
New cards

In parallel computing, you cannot control BLANK, but you can control BLANK

You cannot control execution, but you can control synchronization

32
New cards

Threads are given a pointer to the address of BLANK?

They are given a pointer to the address of a process