Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. Consider the many-to-one model for mapping user-level threads to kernel-level threads. Suppose that a program creates nine user-level threads (To, T1, T2, T3, and
5. Consider the many-to-one model for mapping user-level threads to kernel-level threads. Suppose that a program creates nine user-level threads (To, T1, T2, T3, and Ta). These threads have dependencies shown by the graph below: T1, T2, and T3 depend on T, and T4 depends on T1, T2, and Tz. If a thread A is dependent on thread B, thread A must run after thread B and A and B cannot run concurrently. This is a transitive property: because T4 is dependent on T3 which is dependent on To, then T4, T3, and To are all dependent and none can run in parallel. Only if there is no dependency between two threads, can they run concurrently on different cores of a multicore processor. For example, T and T3 have no dependency relationship defined in the graph and so can run concurrently, but T, and T4 cannot run concurrently because T4 depends on T2 which depends on To. That is, To must run before T2 which must run before T5. Answer the questions below. Be sure to cite the references you use for this question. Ti To T2 TA T3 a. Identify the sets of threads which can run in parallel and can take advantage of a multicore processor. b. What is the smallest number of kernel-level threads to maximize parallelism and how do the user-level threads map to the kernel threads. Assume process P1 has threads T1 and T2 and P2 has threads T3 and T4. How do threads T1 and T2 communicate? How do threads T3 and T4 communicate? How could threads T1 and T3 communicate? Explain your answer. 6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started