I have been measuring the performance of Linux. I started testing Linux 2.4 on the at91rm9200, but have also achieved similar results running Linux 2.6 on a Pentium desktop machine.
I have written a task that sits in a 'while(1)' loop and reads the time each pass around the loop, and compares the time against the previous loop time, recording the maximum value. This process is given the highest priority Linux can assign. There is another process that sits in a 'while(1)' doing nothing more than chewing up cpu time. The priority of this task is normal. To keep OS busy, there are actually five copies of the second task running.
Every 30 seconds, or so, the timing task stores in a buffer the maximum value read. At the end of the experiment, the values are printed to the console.
I am seeing periods of 500 milliseconds where the timing task is 'idle'. That is, the effect of the other chewing tasks is to starve the timing task (running at the highest priority) from CPU time. There is no other system activity (no LAN, no disk activity, no GDI). The results are similar for both the 2.4 kernel, and the 2.6 kernel.
Does this surprise anyone. I know Linux is not supposed to be hard real time but I thought Linux 2.6 with its pre-emptive scheduler and other enhancements would be better than this. I was expecting times of the order of a few milliseconds.
Can anyone comment please?
This forum is for users of Microchip MPUs and who are interested in using Linux OS.
2 posts • Page 1 of 1
- Location: Portugal - Lisbon
Who is online
Users browsing this forum: No registered users and 1 guest