1/21
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
How many threads does a traditional, heavyweight process have?
A single thread of control
Provide at least three benefits of multithreaded programming.
1. Responsiveness
2. Resource sharing
3. Economy
*4. Scalability
True or False? Concurrency is only possible with parallelism.
False, it is possible to have concurrency without parallelism.
True or False? Amdahl's Law addresses the disproportionate effect of
the serial portion of a program.
True
List at least three challenges when designing programming for multicore
systems.
1. Identifying tasks
2. Balance
3. Data splitting
*4. Data dependency
*5. Testing and debugging
What are the two general types of parallelism?
1. Data parallelism
2. Task parallelism
List the three common ways of mapping user threads to kernel threads.
1. Many-to-one
2. One-to-one
3. Many-to-many
True or False? Only Linux and Windows implement the one-to-one
model.
True
What are the two approaches for implementing a thread library?
1. Provide the library in the user space with no kernel support.
2. Implement a kernel-level library supported directly by the operating system.
What are the three main thread libraries in use?
1. POSIX Pthreads
2. Windows
3. Java
True or False? PThreads is typically only implemented on UNIX-like
systems.
True
True or False? PThreads is only a specification, not an implementation.
True
What is the PThread API for creating a thread?
pthread_create()
What is the Windows API for creating a thread?
CreateThread()
What Java method is used for allocating and initializing a new thread in
the JVM?
start()
Provide at least two techniques for supporting implicit threading
1. Thread Pools
2. OpenMP
3. Grand Central Dispatch(GDP)
True or False? Grand Central Dispatch only works for Apple's Mac OS X
and iOS operating systems.
True
True or False? The semantics of the fork() system call can vary on
multithreaded systems.
True
What are the two scenarios for canceling a target thread?
1. Asynchronous Cancellation (One thread immediately terminates the target thread)
2. Deferred cancellation (The target thread periodically checks whether it should terminate)
What is the PThreads API for thread cancellation?
pthread_cancel()
True or False? Windows threads provide both user and kernel stacks.
True
What term does Linux use to refer to a process or a thread?
task