20. Suppose we run program P in a computer system using the Linux operating syst
ID: 3789050 • Letter: 2
Question
20. Suppose we run program P in a computer system using the Linux operating system. We use the Linux time command
to collect some time measurements while P is running. The output from time is,
real. 53m27 .589s
user 24m41 .850s
system 1m3 .337s
a. What was the execution time of P?
b. What was the user CPU time of P?
c. What was the system CPU time of P?
d. How much time during the execution of P did the system spend not executing the instructions of P nor OS in-
structions on behalf of P?
e. List and describe one factor or component of the time from exercise d, i.e., name one thing the system might have
been doing during this time period
Explanation / Answer
a. The execution time of P is user + system = 24m41 .850s + 1m3 .337s = 25m45 .187s
b. The user CPU time of P was 24m41 .850s
c. The system CPU time of P was 1m3 .337s
d. The time during the execution of P that the system spend not executing the instructions of P nor OS is
= real- (user + system)
= 53m27 .589s - (24m41 .850s + 1m3 .337s)
= 53m27 .589s - 25m45 .187s
= 27m42 .399s
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.