Background documentationThreads Locate this document in the navigation structure

 

A process consists of one or more threads in which the application is executed. The database generates threads for those tasks that the system is to execute in parallel. A thread is the unit to which the operating system assigns processor time.

Note that on Linux systems without NPTL (Native Posix Thread Library), each thread is simulated by a clone process.

This graphic is explained in the accompanying text.

Threads of a Database

The database system differentiates between two types of threads:

  • User Kernel Threads (UKT)

    UKTs process client requests. They are the threads that use the most processor time. A database generally has several UKTs.

    In general, several tasks share a UKT. The database system controls the sequence in which the tasks run in a UKT, and can therefore avoid conflicts in accessing resources.

    More information: Task Switching

    To distribute tasks optimally to the UKTs, the database system performs internal load balancing between the user kernel threads.

    More information: Load Balancing Between User Kernel Threads

  • Special Threads

    Special threads provide services for the user kernel threads. In special threads, the database system executes tasks whose duration cannot be predicted, such as operating system calls for reading and writing to volumes and connection requests from clients. The database system processes special threads asynchronously to the user kernel threads.

    Special Threads

    Name

    Description

    Coordinator

    The Coordinator thread monitors all threads in the database. It is the first thread that the database system creates when the database is started. It coordinates the start processes of the other threads. If an error occurs, the Coordinator thread can stop other threads.

    Requester

    The Requester thread accepts user logons to the database and assigns them to a user task within a user kernel thread.

    Console

    The Console thread processes the requests of the XCONS database tool (database console).

    Clock

    Only on Microsoft Windows

    The Clock thread sets a global time variable with which internal time measurements are aligned.

    dev<n>

    Dev Threads are responsible for carrying out write and read requests of the tasks in the volumes.

    The Dev threads are numbered sequentially (dev<n>). The Dev thread dev0 plays a special role here. It coordinates and monitors the other Dev threads.

    The number of Dev threads is primarily dependent on the number of volumes in the database. The database system activates two Dev threads for each data volume and each log volume. If the database trace is on, the database system activates a Dev thread for it as well.

    asdev<i>

    To perform data backups, the database system activates temporary Dev threads asdev<i> for reading and writing the data.

    Timer

    Timer threads are responsible for monitoring the time for time-outs, for internal load balancing and for other time-dependent internal controls.

    Worker

    The Worker thread is responsible for reporting completed asynchronous I/O operations.

To display information about threads, use Database Studio, Database Manager CLI or CCMS (in SAP systems only). More information:

More Information

Tasks