Parallel Computing
- 52Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
52 questions
- 1If one person completes a job in 10 days, 10 people working in parallel can complete it in_____day.
Hint
Divide the total work among 10 people, each doing one-tenth.
Answer
1
- 2In computer systems, parallelization improves application performance by dividing a large job among multiple_____that work at the same time.
Hint
These entities each perform a small portion of the larger job.
Answer
computing entities
- 3A GPU, or Graphics processing unit, can perform_____of tasks in parallel.
Hint
The content describes a very large number of simultaneous tasks.
Answer
thousands
- 4A parallelizable job is split into smaller tasks so that their results can be combined to complete the_____job more quickly.
Hint
The smaller tasks are portions of the original task.
Answer
larger
- 5In the example program, the add all function calculates the sum of the first_____positive integers.
Hint
The program repeatedly adds numbers from the beginning of the range to its upper limit.
Answer
10 million
- 6When a single-threaded process is scheduled on a system with four processors, it generally runs on_____processor at a time.
Hint
The process in the example has only one execution context.
Answer
one
- 7Dividing 10 million numbers evenly among four workers gives each worker_____numbers to process.
Hint
Split the total number of values into four equal portions.
Answer
2.5 million
- 8With four processors and four equal, parallel portions of the example job, the expected completion time is about_____times faster than sequential execution.
Hint
Each processor handles one of four equal parts.
Answer
four
- 9The operating system's_____selects a process and assigns it to a processor for execution.
Hint
This operating-system component chooses what runs on available processors.
Answer
scheduler
- 10In the four-process approach, each process sums a different_____of the number range.
Hint
Each process works on one of four equal parts.
Answer
quarter
- 11Creating four separate processes for the four portions requires four_____system calls.
Hint
This system call creates a process.
Answer
fork
- 12A process is an isolated execution entity with its own instructions, data, heap, and_____.
Hint
This memory segment stores function-call information and local variables.
Answer
stack
- 13Because separate processes are isolated, they need_____techniques to communicate with one another.
Hint
The term is often abbreviated IPC.
Answer
inter-process communication
- 14One IPC method uses operating-system-supported_____and receive system calls to pass messages between processes.
Hint
This call is paired with receive in message-passing IPC.
Answer
send
- 15Another IPC method creates a memory region that multiple processes can use, called_____memory.
Hint
The name describes memory made accessible to more than one process.
Answer
shared
- 16Process management operations such as creation, destruction, and file operations are performed through_____.
Hint
These requests transfer control to the operating system.
Answer
system calls
- 17When a process invokes a system call, a software_____triggers execution of the operating system.
Hint
This mechanism transfers control from the running program to the operating system.
Answer
trap
- 18After a software trap, the operating system determines which system call was requested and runs the corresponding system call_____.
Hint
This component carries out the requested operation.
Answer
handler
- 19Using multiple processes for similar tasks duplicates some instructions and_____across the processes.
Hint
The example notes that processes can access the same global information and arrays.
Answer
data
- 20In the example, each of the four processes independently computes the sum of_____numbers.
Hint
This is one quarter of the 10-million-number range.
Answer
2.5 million
- 21Compared with the threaded approach, the multiple-process approach involves more system calls and therefore greater_____.
Hint
These costs make an approach less efficient.
Answer
overheads
- 22Threading reduces parallelization overhead by using one process with multiple_____instead of multiple processes.
Hint
These are lightweight execution entities within a process.
Answer
threads
- 23A thread is an execution entity that is similar to a process but is considered an extremely lightweight_____.
Hint
The content compares threads directly with this type of execution entity.
Answer
process
- 24In the four-thread example, all threads execute within_____process.
Hint
The approach creates a single process and then adds multiple execution contexts inside it.
Answer
one
- 25Threads in the same process share its code, global data, heap, and open_____.
Hint
These are resources opened by the process and available to its threads.
Answer
files
- 26Unlike shared process segments, each thread has its own_____for local variables and function-call information.
Hint
This per-thread memory area supports that thread's function calls.
Answer
stack
- 27A thread's own stack helps distinguish its execution context from other threads in the same_____.
Hint
The threads share this entity's code and heap.
Answer
process
- 28Each thread's execution context includes register values such as the EIP and_____registers.
Hint
The content names this register alongside EIP.
Answer
ESP
- 29A thread can be scheduled on a processor different from the one running another thread, or multiple threads can share one processor at different_____.
Hint
The content contrasts simultaneous processor use with taking turns.
Answer
time instances
- 30During a context switch, a thread's register values help the system stop and later_____the thread.
Hint
The saved execution state allows work to continue later.
Answer
restart
- 31In the threaded example, each thread handles a different portion containing_____numbers.
Hint
Four equal portions divide the 10-million-number task.
Answer
2.5 million
- 32Creating 50,000 threads took 0.9 time units in the cited comparison, while creating 50,000 processes took_____time units on the same machine.
Hint
This is the larger of the two reported measurements.
Answer
8.1
- 33Because threads are lightweight, creating and managing them is generally more_____than creating and managing processes.
Hint
The comparison emphasizes lower cost and faster operations.
Answer
efficient
- 34Communication between threads in the same process can use shared global data or the shared_____.
Hint
This is another memory segment shared by the process's threads.
Answer
heap
- 35Unlike communication between isolated processes, communication through shared thread data can avoid many communication-related_____calls.
Hint
This word completes the name for operating-system service requests.
Answer
system
- 36Switching between threads generally requires saving less execution_____than switching between processes.
Hint
This includes state needed to resume execution.
Answer
context
- 37Switching between threads in the same process does not require changing the process's_____tables.
Hint
These tables map virtual memory for a process.
Answer
page
- 38Because thread switches keep the same page tables active, cached entries in the_____can remain valid.
Hint
This cache stores address-translation information.
Answer
TLB
- 39Process context switching can involve flushing the TLB and loading the new process's page tables, adding to the switching_____.
Hint
This is the extra cost associated with an operation.
Answer
overhead
- 40The pthread library function used to create a thread is called_____.
Hint
Its name combines the library prefix with the action of making a new thread.
Answer
pthread_create
- 41The pthread function used to exit a thread is_____.
Hint
Its name pairs the pthread prefix with the action of leaving execution.
Answer
pthread_exit
- 42The pthread function that lets one thread wait for another specific thread to finish is_____.
Hint
It is compared with the wait system call used with processes.
Answer
pthread_join
- 43In the example, the thread function receives a void pointer argument that identifies which portion of the work the thread should_____.
Hint
The argument helps determine which numbers belong to that thread.
Answer
process
- 44In the example, the four threads receive argument values 0, 1, 2, and_____.
Hint
The values are consecutive identifiers starting at zero.
Answer
3
- 45The example stores four partial sums in a global unsigned long array named_____.
Hint
Each thread writes its portion's result into an element of this array.
Answer
sum
- 46The partial sum for the first range, from 0 to 2.5 million, is stored in array element_____.
Hint
The first thread uses index zero for its result.
Answer
sum zero
- 47After all four threads finish, the program adds their partial results to compute the_____sum.
Hint
This is the combined result for the entire number range.
Answer
final
- 48To compile the example with the pthread library, the compiler command links the library using the option_____.
Hint
The option begins with a hyphen and the letter l.
Answer
-lpthread
- 49A process can continue running after one of its threads terminates, provided other threads remain_____.
Hint
The example describes nine remaining threads continuing after one of ten ends.
Answer
active
- 50If a process terminates, all threads belonging to that process also_____.
Hint
Threads depend on their process to exist and execute.
Answer
terminate
- 51The example's four thread results are combined only after the main thread's four join calls have_____.
Hint
The joins ensure every worker has finished before the results are used.
Answer
completed
- 52Besides pthreads, the content names the Windows threads library, Boost, and_____as other thread-library options.
Hint
This library name includes the operating system used by the example system.
Answer
Linux threads

Ask anything
We've read this whole study set, so questions about it get the best answers.