Thats a huge question, and I feel like I addressed many parts of it at least at a high level in my first reply. Some of your questions relate to basic RTOS concepts so are probably best answered by reading RTOS documentation.
If you had more specific questions to ask then I can try to answer those, but otherwise this would need a “wall of text” response to cover all topics raised.