This chapter explains how to exchange data between two activities that run in parallel, or to synchronize their executions.
A reader has identified this chapter as an undeveloped draft or outline. You can help todevelop the work, or you can ask for assistance in theproject room. |
Interrupts and ISRs (interrupt service routines) are the lowest level of asynchronous activity.All higher levels are built on this foundation.In some cases, the RTOS will handle all the low-level details for you.
We discuss interrupt and ISRs in more detail in other chapters --
A reader has identified this chapter as an undeveloped draft or outline. You can help todevelop the work, or you can ask for assistance in theproject room. |
Exchanging data between two threads sharing memory ...
medium level
A reader has identified this chapter as an undeveloped draft or outline. You can help todevelop the work, or you can ask for assistance in theproject room. |
high level (= Interprocess Communication via asynchronous message passing between processes in separate protected memory areas).
A reader has identified this chapter as an undeveloped draft or outline. You can help todevelop the work, or you can ask for assistance in theproject room. |
RPC (remote procedure calls) ...
When implementing the software code in a robot, there can be problems with synchronous threads. This section gives some bad programming examples in multithreaded systems. It is illustrated in C-code. They are concerned because it is a first step to understand problems which occur do to concurrent engineering on a higher level.
If the first thread decrements the counter and is then preempted, the second thread also decrements the counter and evaluates it afterwards. Both threads can't continue since the counter is at -1 now.There is a deadlock situation in the executed program.
This problem can also arise at a higher level of abstraction. The deadlock situation in petri nets will be described in the following section.