QuizzesThread Pools — Concept Check
intermediate
operating-systems

Thread Pools — Concept Check

Questions on Thread Pools. A thread pool maintains a set of pre-created worker threads that pick up tasks from a queue, avoiding the overhead of creating and destroying threads for every task.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Thread Pools — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A web server is experiencing high latency due to thread creation overhead. Which Executor would help reduce this latency?

    • ACachedThreadPool
    • BFixedThreadPool
    • CForkJoinPool
    • DSingleThreadExecutor
  2. 2.A service using a CachedThreadPool is running out of memory. What could be the cause?

    • ALong-lived tasks blocking the pool
    • BFixed number of threads causing a bottleneck
    • CToo many short-lived tasks creating excessive threads
    • DTasks being rejected due to full queue
  3. 3.In Java, which RejectedExecutionHandler is best for providing back-pressure when the queue is full?

    • ADiscardOldestPolicy
    • BDiscardPolicy
    • CCallerRunsPolicy
    • DAbortPolicy
  4. 4.A developer claims that a FixedThreadPool can handle any number of tasks without issues. What is the flaw in this statement?

    • AThe queue can fill up, leading to task rejection
    • BTasks are always executed immediately
    • CFixedThreadPool has a limited number of threads
    • DThreads are destroyed after each task
  5. 5.An application using ThreadPoolExecutor has a high number of idle threads. Which parameter should be adjusted?

    • AMaximumPoolSize
    • BCorePoolSize
    • CKeepAliveTime
    • DRejectedExecutionHandler
  6. 6.Which Executor is most suitable for tasks that need to run at regular intervals?

    • AFixedThreadPool
    • BSingleThreadExecutor
    • CCachedThreadPool
    • DScheduledThreadPool
  7. 7.A developer notices tasks being silently dropped in a ThreadPoolExecutor. Which RejectedExecutionHandler might be causing this?

    • ADiscardOldestPolicy
    • BDiscardPolicy
    • CAbortPolicy
    • DCallerRunsPolicy
  8. 8.What is the primary advantage of using a ForkJoinPool for parallel processing?

    • ASingle thread execution for simplicity
    • BWork-stealing for efficient task distribution
    • CFixed number of threads for predictability
    • DUnlimited queue size for handling many tasks