The SESAM/SQL database system executes as a nonprivileged program in BS2000. As with any other user task, the SESAM/SQL DBH is interrupted when certain events occur - for example, when a time slice ends, or during I/O operations with WAIT.
Asynchronous I/O
Database processing is generally highly I/O-intensive. In order to prevent the DBH's work from being interrupted too frequently, SESAM/SQL splits up all I/O operations in such a way that the DBH can perform other tasks while it is waiting.
Asynchronous I/O, in other words the splitting up of I/O operations, is especially useful for multi-thread operation: in multi-thread operation, the DBH can process different requests concurrently so that one request can make use of the time in which another request is waiting for the completion of an I/O operation.
Information on the current progress of a request is stored in special save areas, the thread areas. This information allows the DBH to continue processing a request that has been interrupted and is waiting once the relevant I/O operation has completed.
Handling queues
If a request is interrupted because an I/O operation has been triggered, the associated data is generally logically and physically inconsistent. By applying suitable locks, the DBH prevents concurrent requests from accessing this data.
Processing of a request is interrupted if a conflict arises in such a lock or in a transaction lock.
Processing a request is also interrupted in DBH if a service task is currently working for the request.
Interruption of a request in DBH means that the relevant thread waits until the system resources it requires are available.
Controlling multi-thread operation
Using the DBH option THREADS, system administrators can activate multi-thread operation when starting the independent DBH.
The independent DBH can administer up to 1024 threads. It uses the threads on a loadoriented basis, i.e., not all threads are permanently in use, and this helps to limit the administrative overhead.
Only a single thread is generated in the linked-in DBH.
The DBH option THREADS allows system administrators to specify the maximum number of concurrent active threads.
The value of the DBH option THREADS is compared internally with the value of the DBH-TASKS option. With independent DBH, the value must be larger than or equal 2 times the number of tasks.
With linked-in DBH, the DBH option THREADS is set to 1.