Multithreading Models — Concept Check
Questions on Multithreading Models. The three multithreading models — Many-to-One, One-to-One, and Many-to-Many — define how user-level threads map to kernel threads, determining parallelism capability and scheduling flexibility.
Questions in this quiz
7 questions on Multithreading Models — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer is running a Java application with thousands of threads on a Linux system. The application is consuming a lot of memory and the system is slowing down. Which threading model is likely causing this issue?
- AOne-to-One model due to thread blocking
- BMany-to-Many model due to excessive context switching
- CMany-to-One model due to lack of parallelism
- DOne-to-One model due to high memory usage per thread
2.A developer notices that their Go application scales well with increasing threads. Which threading model is likely being used?
- AOne-to-One model for true parallelism
- BOne-to-One model for better control
- CMany-to-Many model for efficient resource utilization
- DMany-to-One model for simplicity
3.A Java application using standard threads is running on a multi-core processor. How does the threading model affect its execution?
- AThreads are executed sequentially due to kernel limitations
- BThreads share cores, preventing any parallel execution
- CEach thread runs on a separate core, allowing true parallelism
- DAll threads run on a single core, limiting performance
4.A developer assumes that using Many-to-One threading model will improve performance due to reduced context switching. What is a potential flaw in this assumption?
- AComplexity in managing multiple kernel threads
- BNo parallelism as all user threads map to a single kernel thread
- CHigh memory usage due to multiple kernel threads
- DIncreased latency due to kernel-level scheduling
5.Which of the following is true about the Many-to-Many threading model in Java 21?
- AIt uses a single kernel thread for all virtual threads
- BIt blocks kernel threads when virtual threads perform I/O operations
- CEach virtual thread is directly mapped to a kernel thread
- DIt allows millions of virtual threads to be multiplexed onto fewer kernel threads
6.A developer is using the Many-to-One model and notices that their application is not utilizing multiple CPU cores. Why is this happening?
- AThe system does not support multi-core processing
- BUser threads are blocking each other
- CKernel threads are not being scheduled properly
- DAll user threads are mapped to a single kernel thread, preventing parallelism
7.Which threading model is used by Linux pthreads and allows true parallelism?
- AMany-to-Many model
- BSingle-threaded model
- COne-to-One model
- DMany-to-One model