Sample project to demonstrate kernel space and user space

Hi,

I am using a nrf528409dk for my application development using nCS.
I have various features from which I need to understand how to add some high priority features into kernel space and some low priority features into user space.

Kindly share with me if any test or sample project demonstrating the above for me to work with.

Thanks,

Ubaid

Parents Reply
  • Ubaid_M said:
    1. What would be the ideal way to communicate between kernel threads and user threads..? Is it message queues..?

    Yes, that could work. See  RE: Recommended best practice for a multithreaded sensor for other ways of thread communication.

    Ubaid_M said:
    2. Does it make sense if I treat all peripheral (SPI, I2C, UART etc,.) handlers as individual kernel space threads and all application algorithms that consume the peripheral data as user space threads..?

    That could work. Here are some example use cases of Zephyr' user mode feature:

    • The kernel can protect against many unintentional programming errors which could otherwise silently or spectacularly corrupt the system.

    • The kernel can sandbox complex data parsers such as interpreters, network protocols, and filesystems such that malicious third-party code or data cannot compromise the kernel or other threads.

    • The kernel can support the notion of multiple logical “applications”, each with their own group of threads and private data structures, which are isolated from each other if one crashes or is otherwise compromised.

    Read more in https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/zephyr/kernel/usermode/overview.html#overview 

    Best regards,

    Simon

Children
Related