Coursera

[GPU programming] Python 3 Parallel Programming Quiz

star.candy 2022. 6. 22. 22:05
질문 1

T​he Python 3 threading and multiprocessing libraries implement the same programming interface?

True. 

Both the threading and multiprocessing implement the same functions, though the impact on the hardware is different.

 

질문 2

U​sing threading, programs can acheive the same capabilities as with multiprocessing, including networking or outside of program context?

False.

Both parts of the statement are incorrect. Threads are not processes and have different capabilities. Also threading library cannot remote invoke the same process on a different machine over a network.

질문 3

W​hich is not part of the asyncio syntax?

del.

Del is part of the Python 3 syntax but does not belong to the asyncio library.

질문 4

P​resuming that there is an async function called print_time, which of the following commands when used in the blank space in the statement below would be used to start and block for its completion:

_​__________________ print_time()

await.

await makes the calling thread wait for an async function to complete before proceeding.

질문 5

I​n the threading library, which single command executes one or more functions with arguments?

start_new_thread

T​he start_new_thread function takes the names of multiple functions and executes them asynchronously.