We are working on a system that will need some predictive emergency stop. As a possible solution the RTOS was mentioned. Not sure if RTOS is a way to go, might just be that we do not have full understanding of the flow of it.

So there is a process running on PC that does some calculations and it needs lets say X seconds to fully finish while the machine continues working. What we want is the data that needs to be analyzed sent to RTOS and run quick check if that is possible at all and if not to stop the machine. Also some check to see if the process is running on PC at all, otherwise stop the machine.

Does that make sense, should that use RTOS?

Idea is to add RTOS, so that is a fully parallel OS running on same machine and it can communicate with other OS, to receive data or listen to running process? Or does OS need to send stuff through API to RTOS?

FreeRTOS is something that has been checked and we would go for if that is the solution.

  • 2
    \$\begingroup\$ RTOS is an operating system on its own. Who is sending to who? maybe data sharing between threads? \$\endgroup\$
    – emre iris
    Apr 23, 2020 at 11:52
  • \$\begingroup\$ Yes, so RTOS is running on thread and it needs data from other thread, not sure how that works exactly. \$\endgroup\$
    – birinorama
    Apr 23, 2020 at 12:21
  • \$\begingroup\$ the proper way to transform data one thread to another is to use queues. Queue shall be used as a buffer while taking data. \$\endgroup\$
    – emre iris
    Apr 23, 2020 at 12:35
  • \$\begingroup\$ This link explains the details-> freertos.org/a00018.html \$\endgroup\$
    – emre iris
    Apr 23, 2020 at 12:37
  • 1
    \$\begingroup\$ I think you're confused about what an RTOS actually is. An RTOS is an operating system, like Linux or Windows that runs on the device. Threads don't use an RTOS, an RTOS uses threads. Typically you run an RTOS on embedded devices, not PC's, but it isn't unheard of to use on PC's in very specific circumstances. Parallel OS's is something that is really difficult to do, especially if one of those is Windows. \$\endgroup\$
    – Ron Beyer
    Apr 23, 2020 at 12:40

1 Answer 1


An RTOS is a kernel that does task management. Despite sharing the name OS, it is very far from OS like windows and Linux, despite what is said in the comments.

Comparing RTOS tasks to Threads is a long stretch.

One has to understand that an RTOS will switch between different tasks when asked to do so. That being said, if a task does not yield, the RTOS may very well be blocked.

There is not much sense in implementing an RTOS for emergency stop management. Because of the task-switching context, and the difficulty to predict the kernel timings and behavior, you much rather handle your emergency algorithm on a high priority interrupt generated by an input or a timer, coupled with a hardware watchdog.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.