Homework
•Write two procedures -- Put_Task() and Get_Task() -- in any language, e.g. C, and using Fetch&Add for synchronization as follows
•Define TD[1..n], the ToDo array; n=c*Processors for some c
•Define FF, for first free, pointing in TD to first free cell
•Define NA, for next available, pointing to next task in TD
•Put_Task(a) takes a task as input, and places it in TD; Get_Task() returns the next task from TD if there is one
•The management of TD is completely decentralized