104k views
4 votes
Suppose a computer can execute 1 billion instructions/sec and that a system call takes 1000 instructions, including the trap and context switching. How many system calls can the computer execute per second and still have half the CPU capacity for running application code?

User ItsCosmo
by
4.3k points

1 Answer

5 votes

Answer:

System calls = 500000

Step-by-step explanation:

Instructions that a computer can execute = 1 billion instructions/sec

Instructions that a system call takes including the trap and context switching = 1000 instructions

When half of the CPU time is on application, n system calls can be executed in 1 second.

Therefore we'll get an equation as following.

1000 * n = 0.5 * 1000000000

n = 0.5 * 1000000000 / 1000

n = 500000

System calls = 500000

User Sergeyf
by
5.4k points