Python Concurrency and Parallelism
Python Concurrency and Parallelism - Important Points
11. | Which module is used to manage a pool of worker processes in Python? |
---|
A. threading
B. multiprocessing
C. concurrent.futures
D. asyncio
View Answer Discuss Work SpaceAnswer: option c
Explanation:
12. | Which method is used to submit a task to a process pool in Python? |
---|
A. submit()
B. start()
C. create()
D. initiate()
View Answer Discuss Work SpaceAnswer: option a
Explanation:
13. | Which method is used to retrieve the result of a submitted task in Python? |
---|
A. result()
B. get()
C. retrieve()
D. fetch()
View Answer Discuss Work SpaceAnswer: option b
Explanation:
14. | Which of the following is an advantage of using multiprocessing instead of threading in Python? |
---|
A. It allows for more efficient use of CPU resources.
B. It allows for better memory management.
C. It allows for easier synchronization between processes.
D. It allows for better handling of I/O bound tasks.
View Answer Discuss Work SpaceAnswer: option a
Explanation:
15. | Which module is used to create and manage asynchronous I/O in Python? |
---|
A. threading
B. multiprocessing
C. asyncio
D. concurrent.futures
View Answer Discuss Work SpaceAnswer: option c
Explanation: