Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 4 Alice implemented a program that reads, inverts, and writes back N very large matrices. In order to boost the program performance, Alice was
QUESTION 4 Alice implemented a program that reads, inverts, and writes back N very large matrices. In order to boost the program performance, Alice was advised by Chuck to start N threads, each of which inverts its own matrix (the data is still read and written using one master thread). Alice runs the program on a single-CPU, single-core computer. What is the expected effect of changing the number of threads from1 to N on the program execution time? The execution time will probably change, but we cannot predict, how The execution time will increase N-fold The execution time will decrease N-fold The execution time will not change and possibly even slightly increase QUESTION 5 The following pseudocode fragment adds an item to the tail of a doubly linked list that is shared among multiple processes. Which two statements is/are true about this fragment? (Check both.) /2/ item.pre tail; /*3tail.nextitem; /*4*/ tail = item; This pseudocode does not represent a critical section This pseudocode represents a critical section. Statements wait(S) and signal(S) should be added on the lines 1 and 5, respectively The pseudocode represents a critical section. Keyword monitor and an opening brace ""should be added on the line 1, and a closing brace "" should be added on the line 5 This pseudocode represents a critical section. An entry section should be added on the line 1 and an exit section shall be added on the line 5
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