Xv6 is a pretty good material for OS learners, but one thing I am concerned is that how I benchmark xv6 after I developed or changed it. For example, xv6 has really simple scheduling algorithm that we easily understand, so that it may be a good idea to develop scheduling algorithm to improve xv6 performance. However, one problem I met was how should I benchmark it? Therefore, I have modified 'hackbench.c', one of the simple benchmarking program, and now it can run on xv6. So, if you need to benchmark your implementations like me, you can download and measure your system on xv6.
Hackbench.c synchronizes sender and receiver processes by using 'sys/poll.h', but of cource xv6 does not have such a file, so we must implement synchronizing mechanism. One idea to do that, which comes from h.mitake, is to synchronize those processes by using 'pipe'. Specifically, first, receiver processes tries to read the pipes to senders and then it will be blocked. Then, sender processes close the pipes. As a result, receiver processes would start to run, and hackbench program will correctly benchmark performance.