2008-03-08

Why you should care about synchronous blocking I/O syscalls?

In previous post I noticed that open(2) and stat(2) aren't asynchronous. But why you should care?

Try to view a html file from CD using your favorite browser. I don't know how about you, but I switch to other browser tab while a site is loaded. But wait, when the drive starts to spin the CD the browser is blocked?

That's because the browser did an open(2) on a file from CD and system have to load metadata from it, which is done synchronously.

And your OS can't do it without blocking the whole browser...



No comments: