Department of CSE/GSIT
Pohang University of Science and Technology, Kyungbuk
Republic of Korea
Real-time tasks are supported in Linux by separating the real-time task priorities from non real-time task priorities. However, this separation of priority ranges may no longer be effective when real-time tasks make the system calls for important system service like the I/O and the kernel threads that take care of these system calls. In that sense, Linux is known for supporting soft real-time requirements. The kernel threads in Linux systems are important as basic execution units providing kernel services for non real-time tasks as well as real-time tasks. In current Linux implementation, kernel threads are configured to have static priorities for better throughputs. However, the static assignment of priorities to kernel threads may cause trouble for real-time tasks when real-time tasks require kernel threads to be invoked for the kernel service via system calls. This is due to the fact that kernel threads do not discriminate real-time tasks from non real-time tasks.
For example, the kernel thread called pdflush writes back to disks dirty memory pages. If real-time tasks have made several number of I/O requests of memory page updates and pdflush isn’t scheduled sufficiently, then the responsiveness of real-time tasks may be prolonged significantly due to the shortage of memory cache.
In this paper, we present a dynamic kernel thread scheduling mechanism with Weighted Average PIP, a variation of the Priority Inheritance Protocol (PIP). The scheduling algorithms assign proper priorities to kernel threads at runtime by monitoring the activities of user-level real-time tasks. Through experiments, we have shown that the algorithms can greatly improve the unexpected execution latency of real-time tasks.
This paper was originally presented at the Eighth Real-Time Linux Workshop held at the at the School for Information Science and Engineering, Lanzhou University, in Lanzhou, China.