- (7 Pts) Suppose you have the new Zarnex VQ-80 computer which has a 64-bit architecture. Further, the boss has told you to “max out the memory,” which, on that machine, means you can install all the memory the architecture supports:
a. (3 pts) How many gigabytes is that?
b. (1 pts) At contemporary memory pricing of ≈ $8/ GB, how much will it cost to fill the machine?
c. (3 pts) Knowing what you know about virtual memory, how much will it cost to provide disk space only for paging – assume you need 2 × real memory size for paging space, as many systems recommend. Use a price of $35/TB for disk pricing.
- (14 pts) Which partitioning scheme (fixed, dynamic, relocatable dynamic, virtual paging with FIFO, virtual paging with LRU, or segmented) would you use in a modern computer and why (advantages compared with the other schemes)?
- (8 pts) From the abridged process list below, show the “trace of [process] ancestry” for the command “vi ../ log” (PID 6271) back to process 0:
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME
4 0 0 0 20 0 185720 3616 – Ss ? 0:31
1 0 2 0 20 0 0 0 – S ? 0:00
1 0 3 2 20 0 0 0 – S ? 0:24
1 0 5 2 0 -20 0 0 – S< ? 0:00
1 0 7 2 20 0 0 0 – S ? 29:18
1 0 8 2 20 0 0 0 – S ? 0:00
4 0 1127 1 20 0 276676 2756 – SLsl ? 0:02
4 0 1153 1127 20 0 586404 16608 – Rsl+ tty7 650:42
0 1000 1296 1682 20 0 142444 2128 pipe_w Sl ? 0:06
0 1000 1315 1296 20 0 683144 22639 poll_s Sl ? 63:45
4 109 1427 1 20 0 373988 3888 – Ssl ? 0:00
4 0 1449 1 20 0 15940 428 – Ss+ tty1 0:00
4 0 1453 1127 20 0 230304 5712 – Sl ? 0:00
5 0 1530 1 20 0 336712 1008 – Sl ? 0:00
4 118 1533 1 21 1 183544 1460 – SNsl ? 0:31
4 1000 1666 1 20 0 45384 2120 ep_pol Ss ? 0:00
5 1000 1673 1666 20 0 145728 152 – S ? 0:00
1 1000 1680 1 20 0 278948 3556 – Sl ? 0:00
4 1000 1682 1453 20 0 46456 2740 poll_s Ss ? 0:01
1 1000 2004 1682 9 -11 723448 11856 poll_s S<l ? 498:27
0 1000 2023 1682 20 0 178792 2728 poll_s Sl ? 0:01
0 1000 2053 1903 20 0 136920 74768 poll_s SLl ? 1:01
0 1000 2109 1903 20 0 579940 24748 poll_s Sl ? 0:46
0 1000 2507 1682 20 0 698044 34464 poll_s Sl ? 10:07
0 1000 2514 2507 20 0 21400 1936 wait Ss pts/2 0:03
1 1000 2730 1682 20 0 97216 888 poll_s Ssl ? 0:00
0 1000 2745 2507 20 0 21436 2260 wait_w Ss+ pts/21 0:28
0 1000 5487 13488 20 0 112591 54940 poll_s Sl pts/18 0:05
0 1000 6198 13488 20 0 32212 3620 poll_s S+ pts/18 0:00
0 1000 6243 2514 20 0 28912 1456 – R+ pts/2 0:00
0 1000 6271 13488 20 0 32152 1244 signal T pts/18 0:00
0 1000 9824 1682 20 0 290179 50604 poll_s Sl ? 582:53
0 1000 12261 1682 20 0 329751 72742 poll_s Sl ? 310:08
0 1000 13367 1682 20 0 362548 4004 poll_s Sl ? 0:45
0 1000 13488 2507 20 0 21312 2088 wait Ss pts/18 0:01
- (14 pts) Given the hit rates and access times,
a. (2 pt) What is the page fault rate?
b. (5 pts) What is the average page access time?
c. (5 pts) What is the average access time if the TLB hit rate it increased to 99%
d. (2 pts) How many hits per second are there in the TLB and Cache
e. - (4 pts) Given the code below, where are the highlighted variables stored?
int main (int argc, char* argv[]) {
char source[10];
strcpy (source, “0123456789”);
char *dest = (char *)malloc (strlen (source));
for (int i=1; i <= 11; i++) {
dest[i] = source[i];
}
dest[i] = ‘