On a certain computer we estimate that, regardless of the OS it runs, thread scheduling costs about 50 s, a null procedure call 1 s, a context switch to the kernel 20 s and a domain transition 40 s. For each of Mach and SPIN, estimate the cost to a client of calling a dynamically loaded null procedure.

What will be an ideal response?


Mach, by default, runs dynamically loaded code in a separate address space. So invoking the code involves control transfer to a thread in a separate address space. This involves four (context switch + domain transitions) to and from the kernel as well as two schedulings (client to server thread and server thread to client thread) -- in addition to the null procedure itself.
Estimated cost: 4(20 + 40) + 2*50 + 1 = 341 s

In SPIN, the call involve two (context switch + domain transitions) and no thread scheduling.
Estimated cost: 2(20 + 40) + 1 = 121 s.

Computer Science & Information Technology

You might also like to view...

In the following code, what is the output for list1?

``` public class Test { public static void main(String[] args) { int[] list1 = {1, 2, 3}; int[] list2 = {1, 2, 3}; list2 = list1; list1[0] = 0; list1[1] = 1; list2[2] = 2; for (int i = 0; i < list1.length; i++) System.out.print(list1[i] + " "); } } ``` a. 1 2 3 b. 1 1 1 c. 0 1 2 d. 0 1 3

Computer Science & Information Technology

The ________ displays in the lower right corner of a selected range, which enables you to analyze your data by using Excel tools such as charts, color-coding, and formulas

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following commands are used to configure IS-IS?

a. clns routing b. ip router isis c. ip isis d. net

Computer Science & Information Technology

Which hardware component is most suspect if a user can barely make out words on a laptop screen (even though the brightness control is at full brightness)?

A) Power supply B) Motherboard C) AC adapter D) Backlight

Computer Science & Information Technology