How Long Does a System Call Take?

I’m learning about CPU virtualization and the Limited Direct Execution model. As part of that, I got some homework1 to measure how long a system call takes. The book suggests: 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 iterations gives you an estimate of the cost of a system call. ...

September 20, 2025 · 2 min

File Descriptors and stdout redirection

I took a few computer science electives during my Mechatronics Engineering major, but unfortunately I didn’t attend operating system lectures, although I had all the pre-requisites. I’ve decided to study the subject and I’ve found a free book which is quite good. On Chapter 5 about the Process API, there are details about how the Unix Process API works, detailing some system calls. I’ve found the trick for file redirection particularly interesting: ...

September 17, 2025 · 2 min