Radio, what are tasks queues and semaphores. In this video, we will learn the following tasks, queues. centerfolds are toast in a nuclear reactor. A benefit of using free arctos is that it allows the software application to be written as a set of independent tasks, with each task having its own priority level. Other than the concept of tasks in free Otto's. There are many other Otto's concepts that are really useful for efficient and reliable uses of resources.
Now, let's look at the concept of queue and center for in free arctos. a queue is the type of data buffer that follows the FIFA rule. That is the first in first out queue can either hold the data or pointer to the data in free arctos. The data items are directly copied to the queue. Each data item is a Fixed Size, the size of the data item and the maximum number of data items are fixed when a queue is created. queues are generally used for communication between tasks.
It's known as inter task communication in free arctos that many instances in a real world application different tasks in an Otto's need to share hardware resources, such as communication interfaces, which can only be used by one task at a time. Here is when semaphores become useful. Consider a situation where two people have to share a bike. At one time, only one person can use the bike, the one who has the bike key will get the chance to use it. And when this person gives the key to the second person, then only the second person can use the bike. semaphores is just like this key and the back is the shared resource.
When Number a task wants access to the shared resource, it must acquire the semaphore First, the task should release the semaphore after it is done with a shared resource. Till this time all other tasks, even if it is a high priority task have to wait if they need access to the shared resource as the Center for is not available. If you want to learn more about center flows and queues, you can check out the link in the resources. Let me explain with an example. Just imagine that you are designing a control system for a nuclear reactor. The main functions of the control system will be as follows.
It should monitor the core temperature regularly. If the temperature is high, control rods should be lowered into the core and coolant circulation must be increased. If the temperature is low, control rods must move back up allowing for further fishin If radioactive leaks are detected or a sudden spike in temperature happens and emergency signals should be issued to implement this hypothetical control system with free arctos. We will need all the three free arctos features we discussed earlier tasks, queues and semaphores. At first different tasks are created and each is assigned with an appropriate priority level. It is classified into three different colors as shown here based on their priority levels.
The highest priority is given to alarm task, which starts when a radioactive leak or sudden spike in the temperature of the coal is detected. The medium priority is given to tasks that detect the temperature and any leaks using an array of sensor modules. low priority is assigned to all these tasks. It's mainly assigned to tasks that communicate with authority Through the console, queues are implemented between the tasks that want to communicate with each other. For example, a message queue must be implemented between the pump control, the coolant flow regulation, and the detect temperature task to synchronize all these processes and maintain the cold temperature at the optimum level. Also, centavos are used to control the console that displays messages to the operator when the operator interacts with the console semaphores are used to allocate shared hardware resources to inputs given by the user.
Thus arctos is necessary for time critical applications like nuclear reactors, space shuttles, pacemakers, etc. Summary In this video we have covered the following topics, tasks, queues, several false positives in a nuclear reactor. In the next video, we will implement basic tasks and semaphores with examples