Back to Raspberry Pi Os

How to implement an unlimited number of tasks

exercises/lesson04/4/avenito/README.md

latest535 B
Original Source

How to implement an unlimited number of tasks

To have an unlimited number of tasks we should have an unlimited amount of memory too, but the goal is to implement a way where we can run how many tasks how is possible.

A possible solution is to use a data structure called Threaded Binary Trees. Here a reference.

  1. Change the task structure in 'sched.h'. We have to change the 'INIT_TASK' too.
  2. Create an initial task
  3. Change the code in 'sched.c' to start by initial task