Do Free-RTOS and mbed OS poll for incoming data to be received (or use interrupts?)? If so, is there a risk that data to be received while the processor is handling another task (e.g. running a program) risks being missed?
Is received data then stored somewhere in memory, so it can be retrieved when a function such as receive(...) is called? I would imagine that receive(...) is simply returning data which the OS has placed in a particular memory location. Is this the case?