The timer task is responsible for timeouts. It is a task in the user kernel thread.
See also:
Concepts of the Database System, Overview of Tasks