what kind of OS is present inside 'mbed'?
From the release note for version 5.1.0:


  mbed OS now incorporates an RTOS.
  
  The RTOS core is based on the widely used open-source CMSIS-RTOS RTX,
  providing an established kernel that can support threads and other
  RTOS services on very tiny devices. The RTOS primitives are always
  available, so that drivers and applications can rely on features such
  as threads, semaphores and mutexes. The RTOS is initialised ahead of
  entering the main() thread, enabling components to rely on RTOS
  facilities even if the core application is single threaded.
  
  The implementation is based on CMSIS-RTOS RTX 4.79.0, and we will be
  tracking and contributing to the development of CMSIS-RTOS releases,
  allowing us to pick up support for new versions and architectural
  features such as TrustZone for Cortex-M.
  
  The MINAR eventing-only scheduler is not included in this release. An
  alpha version of a more flexible event scheduler library is available,
  supporting the same design patterns within RTOS threads and
  components. This library will be merged and managed as part of the
  core OS codebase once it reaches release maturity.