Task scheduling is one of the key problems in distributed real-time systems. The task scheduling in real-time systems is introduced in this paper. Having taken some practical circumstances in DRT-UNIX system into account, an algorithm of task scheduling is proposed and the merits of the algorithm are analysed.