Deck 13: Parallel Programming
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/51
Play
Full screen (f)
Deck 13: Parallel Programming
1
Parallel programming is sometimes referred to as concurrent programming.
True
2
Threads can be an efficient mechanism for coarse-grained parallelism in the shared memory model.
False
3
A multiple-instruction,multiple-data system uses a single processor to precisely control the execution of multiple processors.
False
4
In Fortran95,the forall construct indicates parallel execution of each iteration of a loop.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
5
When processes are split,one process becomes the parent and the rest become the children.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
6
Another name for the bounded buffer problem is the producer-consumer problem.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
7
True parallelism is one method of solving the von Neumann bottleneck.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
8
Compiler options allow explicit indication of areas where parallelism is called for.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
9
When implementing the Runnable interface in Java,the entire program will not finish execution until all of its threads complete the execution of their run methods.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
10
A lightweight process shares its resources with the program it came from.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
11
The automatic assignment by language translators of processors to different parts of a program to achieve parallelism is likely to be suboptimal.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
12
It is not possible to have a system in which each processor has some private memory in addition to shared memory.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
13
In Ada,a process is referred to as a job.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
14
Distributed-memory systems can still be shared-memory systems.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
15
The idea of parallel processing has only been around since the 1980s.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
16
Program-level parallelism provides fine-grained control over processes.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
17
SPMD (single program multiple data)programming does not require process synchronization.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
18
Concurrent programming emphasizes the fact that parallel constructs express only the potential for parallelism.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
19
Many processes sharing a single processor is an example of true parallelism.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
20
In the early days of computing,jobs were executed in batch fashion.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
21
When multiple processes share a single processor,it is a form of ____.
A) parallelism
B) pseudoparallelism
C) multiprocessing
D) synchronized processing
A) parallelism
B) pseudoparallelism
C) multiprocessing
D) synchronized processing
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
22
Variable annotations are used to provide additional details about the data type of a variable.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
23
A ____ causes the process to relinquish the processor,or timeout.
A) hardware lock
B) hardware timer
C) hardware interrupt
D) system timer
A) hardware lock
B) hardware timer
C) hardware interrupt
D) system timer
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
24
A ____ system consists of stand-alone processors connected together by high-speed links.
A) multiprocessor
B) parallelized
C) distributed
D) synchronized
A) multiprocessor
B) parallelized
C) distributed
D) synchronized
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
25
The message passing mechanism is sometimes referred to as rendezvous.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
26
Distributed-memory systems suffer from ____ problems.
A) synchronization
B) communication
C) interrupt
D) locking
A) synchronization
B) communication
C) interrupt
D) locking
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
27
The standard way of multiplying two matrices,using a set of 3 nested for loops,will require ____ steps if performed sequentially.
A) N
B) N²
C) N³
D) log N
A) N
B) N²
C) N³
D) log N
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
28
Deadlocks occur when processes ____.
A) are waiting for each other to unblock
B) both write to the same memory location
C) are unable to respond to hardware interrupts
D) are unable to activate their locks
A) are waiting for each other to unblock
B) both write to the same memory location
C) are unable to respond to hardware interrupts
D) are unable to activate their locks
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
29
Semaphore signal and delay operations are identical to monitor continue and suspend.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
30
In a monitor condition queue,a call to continue will have no effect if the queue is empty.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
31
A ____ system is a single system incorporating several processors.
A) multiprocessor
B) distributed
C) parallelized
D) synchronized
A) multiprocessor
B) distributed
C) parallelized
D) synchronized
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
32
____ allows many processes to share a single processor,and appear to be executing simultaneously.
A) Parallel programming
B) Synchronized programming
C) Simultaneous programming
D) Multiprogramming
A) Parallel programming
B) Synchronized programming
C) Simultaneous programming
D) Multiprogramming
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
33
____ occur when two processes attempt to modify the same memory and end up interleaving their output in unpredictable manners.
A) Race conditions
B) Deadlocks
C) Competing writes
D) Mixed writes
A) Race conditions
B) Deadlocks
C) Competing writes
D) Mixed writes
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
34
Java threads exhibit fork-join parallelism.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
35
____ is the idea of executing many computations at the same time in parallel.
A) Synchronized processing
B) Parallel processing
C) Multiprocessing
D) Simultaneous processing
A) Synchronized processing
B) Parallel processing
C) Multiprocessing
D) Simultaneous processing
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
36
Java objects whose methods are synchronized are called synchronized objects.
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
37
Shared-memory systems suffer from ____ problems.
A) synchronization
B) communication
C) interrupt
D) locking
A) synchronization
B) communication
C) interrupt
D) locking
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
38
A process is ____ when it is in possession of the processor.
A) blocked
B) executing
C) waiting
D) locked
A) blocked
B) executing
C) waiting
D) locked
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
39
A ____ executes a particular sequence of instructions independently,while sharing all memory and other resources with its parent program.
A) thread
B) shared process
C) job
D) batch
A) thread
B) shared process
C) job
D) batch
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
40
A process is ____ when it is waiting for an activity to finish or an event to occur.
A) waiting
B) blocked
C) executing
D) queued
A) waiting
B) blocked
C) executing
D) queued
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
41
____ parallelism provides fine-grained control.
A) Program-level
B) Procedure-level
C) Function-level
D) Statement-level
A) Program-level
B) Procedure-level
C) Function-level
D) Statement-level
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
42
A ____ is an abstract data type mechanism with the property of mutual exclusion.
A) semaphore
B) mutex
C) monitor
D) thread
A) semaphore
B) mutex
C) monitor
D) thread
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
43
A ____ is a mechanism to provide mutual exclusion and synchronization in a shared-memory model.
A) lock
B) thread
C) semaphore
D) buffer
A) lock
B) thread
C) semaphore
D) buffer
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
44
An example of the ____ model is where a process creates several child processes,each with its own code,and then waits for the children to complete their execution.
A) fork-join
B) SIMD
C) MIMD
D) distributed memory
A) fork-join
B) SIMD
C) MIMD
D) distributed memory
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
45
In Java,the reserved word ____ is used to establish mutual exclusion for threads.
A) lock
B) unlock
C) synchronize
D) wait
A) lock
B) unlock
C) synchronize
D) wait
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
46
A semaphore's ____ operation tests the semaphore for a positive value,decrementing it if it is positive and suspends the calling process if it is zero or less.
A) Signal
B) InitSem
C) Delay
D) Acquire
A) Signal
B) InitSem
C) Delay
D) Acquire
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
47
____ are sections of code that can be executed by only one process at a time.
A) Critical regions
B) Exclusive zones
C) Locked sections
D) Synchronized sections
A) Critical regions
B) Exclusive zones
C) Locked sections
D) Synchronized sections
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
48
Semaphore operations must be executed ____.
A) synchronized
B) asynchronized
C) parallel
D) atomically
A) synchronized
B) asynchronized
C) parallel
D) atomically
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
49
In Java,every object has a single ____ that is available to threads.
A) lock
B) process
C) handle
D) buffer
A) lock
B) process
C) handle
D) buffer
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
50
When a process waiting at a semaphore is constantly pre-empted,____ occurs.
A) overrides
B) desynchronization
C) starvation
D) deadlock
A) overrides
B) desynchronization
C) starvation
D) deadlock
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck
51
A buffered message-parsing mechanism is known as a(n)____ mechanism.
A) extended
B) mailbox
C) queue
D) delivery
A) extended
B) mailbox
C) queue
D) delivery
Unlock Deck
Unlock for access to all 51 flashcards in this deck.
Unlock Deck
k this deck