I have a task (producer) that writes incoming data to a static array that uses an associated bitmap of size N to track its open slots. An incoming piece of data consists of maximum of W words, so the size of the array is N x W. When the task receives the first word of a new piece of data, it sequentially scans the bitmap to find the next open slot, and updates the bitmap to mark the slot as taken. The task keeps track of the array position that it writes an incoming word to.
I have a second task that extracts data from the static array, a word at a time, and updates the bitmap accordingly (consumer).
I am trying to understand how I can use pipelining/data flow in this case. Please shed some light on this.