PLB_OSIDLETIME Keyword
PLBWIN Only
PLB_OSIDLETIME={value}
As a general rule, the PLBWIN runtime executes as efficiently as possible when performing any file IO operations. The runtime is always attempting to interface with the Windows OS. This interaction with the Windows OS insures that a program is responsive while PLB program operations are executed.
In some cases, this general implementation can cause a situation where one PLBWIN process may seem to get more OS time to execute than a second PLBWIN process that is executing on the same system.
The keyword 'PLB_OSIDLETIME={ms}' keyword causes the runtime to return unused execution time to the Windows OS for a period of (0 to 10)ms after any file IO lock fails. For any non-zero value, any locking loops in the runtime are slowed down and this prevents the task manager CPU usage value from going to a high percentage during heavy file IO locking operations.
When this keyword is set to zero, then all of the locking loops retain any idle time while waiting for a lock. When a value of zero is used, then the runtime CPU usage can show to have a higher percentage while waiting on a FILEPI or record locks. If the PLB_OSIDLETIME keyword is not used, then the default value is zero.
Setting this keyword to a non-zero value causes any locking loops to release any idle time back to the OS by the {ms} value specified for the PLB_OSIDLETIME keyword. The runtime CPU usage percentage in this case is lower while waiting on a FILEPI or record lock.
No matter what, the operation impact of using the PLB_OSIDLETIME depends on the PLB application IO and locking operations that are programmed. This keyword gives options for controlling the OS idle times to achieve a desired behavior for PLBWIN process interactions with other processes while doing heavy file IO operations that involve heavy locking operations.
A general expectation for the PLB_OSIDLETIME setting values is defined as follows:
|
{ms} |
Windows OS Idle Time Affect |
|
0 |
The Windows OS Idle time is minimized. The PLBWIN runtime DOES NOT waste any time while looping to wait on a file lock. This is the default value for the PLBWIN runtime. |
|
1 |
The PLBWIN runtime wastes 1ms time while looping to wait on a file lock. |
|
10 |
The Windows OS Idle time is maximized. The PLBWIN runtime wastes 10ms time while looping to wait on a file lock. |
Example:
See Also: PLBWIN Keywords, Compiler and Runtime Options
![]() |