The invention discloses a first-in first-out
semaphore scheduling method based on a
POSIX interface, and the method comprises the steps: modifying a
POSIX interface of a
user space and a cortex synchronization mechanism of a kernel space, increasing the support for an FIFO strategy, defining a
semaphore strategy type identifier, and modifying a
correlation function to support the setting of a scheduling strategy when
semaphore is created. And modifying the
system call to process the FIFO policy semaphore; and unifying the priority of each semaphore application thread, inserting the threads into a waiting
queue according to an application sequence, and awakening the thread which firstly enters the
queue when the semaphore is available. According to the method, the performance and the
resource utilization rate of multi-thread
concurrency control in the embedded real-time
operating system are improved, meanwhile, the problems of
deadlock, hunger and the like are avoided, and the reliability and the user experience of the
system are improved.