Q: 1 The number threads in thread pool depends on
No. of processes
No. of threads
No. of processes and threads communicate each other
No. of the exited threads
[ Option B ]
A thread pool is a collection of pre-created threads used to execute tasks efficiently. The size of the thread pool depends on the number of threads allocated for execution, which is usually decided based on system requirements like CPU cores and workload.
Q: 2 In a multithreaded process, which of the following is not shared among threads?
Registers
Data
Code
Files
[ Option A ]
In a Multithreaded Process, multiple threads run within the same process and share certain resources to efficiently perform tasks concurrently. Threads belonging to the same process share the code section, data section, and files.
However, each thread requires its own Registers and Stack to keep track of its current state, local variables, and execution context.
Q: 3 Consider the following statements:
A: Multithreaded applications are characterized by having a small number of highly threaded processes.
B: Multiprocess applications are characterized by the presence of many single-threaded processes.
Which of the following is true about the above statements?
Only A is correct.
Only B is correct.
Neither A nor B is correct.
Both A and B are correct.
[ Option D ]
Multithreading refers to a programming model where multiple threads run within the same process, sharing the same memory space but executing different tasks concurrently.
Multiprocessing, on the other hand, uses multiple processes, each with its own separate memory and resources.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.