Question: (P4)Please select all the correct answers concerning C code/ Linux environment Question 1 Which of the following are true about threads, and the synchronisation of
(P4)Please select all the correct answers concerning C code/ Linux environment


Question 1 Which of the following are true about threads, and the synchronisation of threads? For all the options below, assume the use of the Linux pthread library. Not yet answered Marked out of 1.00 Select one or more: P Flag question a. To create a joinable thread, the pthread_join() function can be used. b. When the currently executing thread of a multi-threaded process becomes blocked, another ready thread belonging to the same process can be scheduled for execution. C. When a thread X calls pthread_join() on another thread Y, thread X cannot continue with its execution until thread Y has terminated. d. A detached thread can be made joinable again. e. To make a joinable thread become detached, the pthread_detach() function can be used. When the currently executing thread of a multi-threaded process becomes blocked, the entire process itself becomes blocked and all of its other threads cannot be scheduled for execution. Question 2 Which of the following are true about threads, and the creation of threads? Not yet answered Marked out of 1.00 Select one or more: a. If a thread of a particular process is in the middle of execution when the process terminates, that thread may continue executing to completion. Flag question b. fork() can be used to create a new thread within an existing process. C. pthread_create() is used to create a new thread within a process. Od. When creating threads in a process, each newly created thread will have its own independent copy of all of the variables of that process. a e. A process that has just been newly created will not have any threads of execution by default. f. A process may have one or more threads
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
