CSC 139: Project 3 Quiz Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/11

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing the Parallel Sort with Dynamic Work Queue assignment.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

Chunking Strategy

In Project 3, Dividing the input file into chunks (64 KB or smaller) aligned with record boundaries to balance memory usage and parallelism.

2
New cards

pthreads

In Project 3, we used these to create worker threads dynamically based on available CPU cores.

3
New cards

Merge Sort

A stable sorting algorithm used by each thread to sort its assigned chunk, preserving the relative order of equal keys.

4
New cards

pthread_cond_signal

In Project 3, this was used to wake up one of the threads waiting for work after a new chunk is added to the work queue.

5
New cards

pthread_cond_broadcast

In Project 3, this was called to wake up all threads waiting on the condition variable when all chunks have been enqueued.

6
New cards

Spurious Wakeups

A phenomenon in multithreading where a thread wakes up without an explicit signal. This can lead to unnecessary resource consumption and requires checking conditions after waking.

7
New cards

Synchronization Mechanisms

Mutexes and condition variables that ensure correctness without introducing deadlocks or busy-waiting.

8
New cards

Dynamic Work Queue

An efficient method for distributing chunks among threads, ensuring efficient utilization of CPU cores.

9
New cards

pthread_mutex_t

In Project 3, this acts as a lock, allowing only one thread at a time to access a shared resource, preventing race conditions and ensuring data integrity in multithreaded applications. This is crucial for synchronizing threads.

10
New cards

pthread_cond_t

In Project 3 , this was a condition variable used in multithreading to block a thread until a particular condition is met, facilitating synchronization between threads.

11
New cards

Enqueue Operation

In Project 3, this involved adding a new chunk of work to the shared queue. This operation typically requires synchronization mechanisms such as mutexes to ensure that multiple threads can safely add work without causing race conditions.

12
New cards

Dequeue Operation

In Project 3, this involved retrieving a chunk of work from the shared queue by a worker thread. It uses mutexes and condition variables, to ensure that only one thread retrieves a chunk at a time and that threads block when the queue is empty.