Master Computers and Technology with Fun Quizzes & Brain Teasers!
Assembly instructions (following the standard x86-64 calling conventions):f:cmpq $-12, %rsijne .L2movq %rsi, %raxmovq %rdi, %rsimovq %rax, %rdicall fret.L2:addq $1, %rdimovq %rsi, %raximulq %rdi, %raxretCorresponding C code skeleton:long f(long x, long y) {if (y == )return f(, );return ;}Suppose f is called with 4 in %rdi and -12 in %rsi. Give the values of the following registers just before the original call to f returns.Again, it is recommended that you trace the register values through each instruction execution.Assembly instructions (following the standard x86-64 calling conventions):f:cmpq $-12, %rsijne .L2movq %rsi, %raxmovq %rdi, %rsimovq %rax, %rdicall fret.L2:addq $1, %rdimovq %rsi, %raximulq %rdi, %raxretCorresponding C code skeleton:long f(long x, long y) {if (y == )return f(, );return ;}Suppose f is called with 4 in %rdi and -12 in %rsi. Give the values of the following registers just before the original call to f returns.Again, it is recommended that you trace the register values through each instruction execution.Question 2%rsiQuestion 3%rax
five batch jobs. a through e, arrive at a computer center at almost the same time. they have estimated running times of 10, 6, 8, 2, and 4 minutes. their (externally determined) priorities are 3, 5, 4, 2, and 1, respectively, with 5 being the highest priority. for each scheduling algorithm, determine the mean process turnaround time. ignore process switching overhead. (a) round robin. (b) priority scheduling. (c) first-come, first-served (run in order 10, 6, 8, 2, 4). (d) shortest job first. for (a), assume that the system is multi-programmed and that each job gets its fair share of the cpu. for (b) through (d), assume that only one job at a time runs until it finishes. all jobs are completely cpu bound.