Kylix 3 and BCB6 Real-Time Test Programs

1/2006

Borland once decided to support Linux with the Kylix C++ and Pascal compilers, but now all they support is Win32 and .NET. You can still download the Kylix 3 free compiler from Borland to build and run these test programs. Kylix 3 will only run on certain Linux distros so you will need to create a supported system for the compiler. Borland C++ Builder 6 will compile the equivalent Win32 versions using the same source and form files. The run-time files will run on almost any system.

win_linux_test_source.zip

Source and EXE for Win/Linux real-time test programs. Unzip into a directory preserving the stored paths and these can be used to compile both Win32 and Linux versions.

win_test_run_time.zip

Win EXE real-time test programs. The enclosed DLL file is needed if you don't have the Borland compiler installed on a system.

kylix_progs.tar.gz

Linux real-time applications with support libraries for almost any Linux. Extract in /root/kylix_progs/ directory and use run_XXXX shell files to run the programs. If the files are in /root/kylix_progs/ then the libraries and links should work correctly.

RTC_RealtimeApp.tar.gz

Linux real-time test program source and executable. Build with Borland CBuilderX or gcc. This console program runs on most Linux systems at root level and uses the RTC at 4096 interrupts per second to schedule a real-time context switch. Run other programs to see how well Linux operates under load.

Here are some screen shots showing some typical test results:

The Windows Realtime Test program uses high performance timers to check how often a real-time thread executes as scheduled by Win32. It can also send UDP packets to another computer to simulate some work on every run cycle. The results shown here are after heavy disk writing and reading on a Pentium 4 at 2.8 GHz with hyper-threading. Windows always seems to wait 1 more cycle (2 milliseconds) than specified in the Win32 call (1 millisecond).

The Windows Realtime Test was stressed with memory allocations and in this case it caused some "excessive" delays in program scheduling. This test was on a Pentium 4 at 2.4 GHz without hyper-threading.

The RTC_RealtimeApp console program provides a similar test on Linux systems while using an entirely different method for scheduling the program. The Real Time Clock (RTC) chip can generate interrupts at 4096 per second and the program thread can wait for these interrupts and check to see how many were missed in the event the CPU is busy with something else. By running the application at real-time priority, we can see how well the scheduler works. This test is not possible on Windows without special hardware and drivers. The KDE System Guard shows 250 timer interrupts/sec, 4096 RTC interrupts/sec and 9722 process context switches/sec. The Linux scheduler is working quite hard on this Suse 10.0 system running Linux 2.6 on a Pentium 4 at 2.4 GHz without hyper-threading.

Here are the results of this test run. The scheduler is seen to work very well under heavy memory use.

© James S. Gibbons 1987-2015