Process scheduling latency under Windows is the biggest source of problems for C# soft real-time systems.
Although Windows XP is only "soft" on the realtime front, the multi-tasking or context switching can be significantly improved by the following setting in the registry.
On Windows XP systems, where there is client-server interprocess communication, adjust Win32PrioritySeparation to be Hex 28, which is Decimal 40.
Windows Registry Editor Version 5.00
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl)
"Win32PrioritySeparation"=dword:00000028
Brackets changed to parens for this editor.
This specifies the following scheduling characteristics:
1) short quanta in the scheduler
2) equal foreground and background priorities
3) fixed quanta (not variable)
This significantly improves interprocess context switching.
For example, I run a custom front-end socket client locally connecting to IB's TWS. I run the Java "server vm" for TWS and for my custom trading front-end code.
Adjusting Win32PrioritySeparation, as described above provides me with the fastest possible context switching between the two intercommunicating processes.
FS
