13. 14 pts) Consider a system that has two CPUs and each CPU has two threads (hyperthreading), Suppose six programs, PA,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

13. 14 pts) Consider a system that has two CPUs and each CPU has two threads (hyperthreading), Suppose six programs, PA,

Post by answerhappygod »

13 14 Pts Consider A System That Has Two Cpus And Each Cpu Has Two Threads Hyperthreading Suppose Six Programs Pa 1
13 14 Pts Consider A System That Has Two Cpus And Each Cpu Has Two Threads Hyperthreading Suppose Six Programs Pa 1 (30.24 KiB) Viewed 62 times
13. 14 pts) Consider a system that has two CPUs and each CPU has two threads (hyperthreading), Suppose six programs, PA, PB, PC, PD, PE, and PF, are started with run times of 5, 8, 2, 3. 15, and 20msec, respectively. How long will it take to complete the execution of all these programs? Assume that all six programs are 100% CPU bound, do not block during execution, and do not change CPU's once assigned 14. [4 pts) Suppose two threads execute the following code concurrently, accessing shared variables a, b, and e: Initialization Thread 1 Thread 2 int a 4; int b=0; int e=0; if (a <0) {c-b-a:) else {c=b+a:) b = 10; a = -3; What are two possible values for e after both threads complete? You can assume that reads and writes of the variables are atomic, and that the order of statements within each thread is preserved in the code generated by the compiler. Why is this happening and how could you fix it?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply