摘要 |
A real-time OS simulator simulates dispatch processing and interrupt handling of a real-time OS on a general-purpose multi-thread OS. Threads 21 to 23 corresponding to tasks, threads 31 to 33 that generate an interrupt, and a thread 11 for controlling concurrent thread running on the multi-thread OS. Each of the threads 21 to 23, selects, when calling a system function, any thread to run next, instructs the thread 11 to start processing, and then suspends itself. After the running thread is suspended, the instructed thread 11 resumes the selected thread. Any one of the threads 31 to 33 that called an interrupt handling function 13 suspends the running thread, calls an interrupt handler, and then selects any thread to run next for resuming. In addition to the threads 21 to 23, an exception handling thread may be assigned for each task.
|