Search⌘ K

Exercise

Explore methods to measure system call and context switch costs in operating systems. Understand timer precision, implement repeated system calls, and use IPC mechanisms like pipes or sockets. Learn to bind processes to CPUs for accurate context switch timing, gaining practical skills to evaluate OS performance.

We'll cover the following...

Measurement exercises are small exercises where you write code to run on a real machine, in order to measure some aspect of OS or hardware performance. The idea behind such exercises is to give you a little bit of hands-on experience with a real operating system.

In this exercise, you’ll measure the costs of a system call and context switch.

Measuring the cost of a system call is relatively easy. For example, you could repeatedly call a simple system call (e.g., performing a 0-byte read), and time how long it takes; dividing the time by the number of ...