Threads Flashcards
What is the flow of Multithreaded Server Architecture
CLIENT > requests to > SERVER > creates thread to service request >
SERVER > continues to listen for additional client requests
Four benefits of Threads
Resource sharing
Responsiveness
Scalability
Economy
A benefit of threading which may allow continued execution if part of the process is blocked ( which is important for UI)
Responsiveness
A benefit of threads wherein threads share resources of process
(Easier than shared memory or message passing)
Resource sharing
Benefit of threads since
thread creation is CHEAPER than process creation;
Thread switching has LOWER OVERHEAD than context switching
Economy
Beneift of thread wherein the process can take advantage of the multiprocessor architecture
Scalability
_______ systems putting pressure on the programmer
Multicore / multiprocessor
Challenges faced because of using multicore / multiprocessor systems
Dividing activities Balancing Dtaa dependency Data splitting Testing and debugging
____ implies that a system can perform more than one task SIMULTANEOUSLY
Parallelism
___ supports more than one task making progress
(Single processor only)
(Scheduler is responsible for this)
Concurrency
A type of parallelism wherein you distribute SUBSET of the SAME DATA and perform the SAME operation across multiple cores
Data parallelism
A type of parallelism wherein you distribute threads across cores and perform DIFFERENT OPERATIONS per thread
Task parallelism
An increase in the number of threads implies that ___
Architectural support for threading also grows
CPUs have cores and h____
Eg: oracle sparc t4
hardware threads
For every thread in a Mutithreaded processes, there is a unique ____
Stack
Registers
This identifies the PERFORMANCE GAINS from ADDING ADDITIONAL CORES to an applictaion which has serial and parallel components
Amdahl’s Law
The higher the serial portion of an application, the ___ the performance gained by adding additional cores
Lesser
Formula for amdahl’s law
Speed-up = 1 / s-((1-s) / no of cores )
As N reaches infinity, speedup approaches __
1/serial portion
A type of parallelism wherein you distribute SUBSET of the SAME DATA and perform the SAME operation across multiple cores
Data parallelism
A type of parallelism wherein you distribute threads across cores and perform DIFFERENT OPERATIONS per thread
Task parallelism
An increase in the number of threads implies that ___
Architectural support for threading also grows
CPUs have cores and h____
Eg: oracle sparc t4
hardware threads
For every thread in a Mutithreaded processes, there is a unique ____
Stack
Registers
This identifies the PERFORMANCE GAINS from ADDING ADDITIONAL CORES to an applictaion which has serial and parallel components
Amdahl’s Law
The higher the serial portion of an application, the ___ the performance gained by adding additional cores
Lesser
Formula for amdahl’s law
Speed-up = 1 / s-((1-s) / no of cores )
As N reaches infinity, speedup approaches __
1/serial portion
A type of parallelism wherein you distribute SUBSET of the SAME DATA and perform the SAME operation across multiple cores
Data parallelism
A type of parallelism wherein you distribute threads across cores and perform DIFFERENT OPERATIONS per thread
Task parallelism
An increase in the number of threads implies that ___
Architectural support for threading also grows
CPUs have cores and h____
Eg: oracle sparc t4
hardware threads
For every thread in a Mutithreaded processes, there is a unique ____
Stack
Registers
This identifies the PERFORMANCE GAINS from ADDING ADDITIONAL CORES to an applictaion which has serial and parallel components
Amdahl’s Law
The higher the serial portion of an application, the ___ the performance gained by adding additional cores
Lesser