


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















Introduction to process ‘blocking’ and the Linux kernel’s support for ‘sleeping’ and ‘waking’
do { status = inb( 0x64 ); } while ( ( status & READY ) == 0 );
Those tasks that are ready-to-run comprise a sub-list of all the tasks, and they are arranged on a queue known as the ‘run-queue’ Those tasks that are blocked while awaiting a specific event to occur are put on alternative sub-lists, called ‘wait queues’, associated with the particular event(s) that will allow a blocked task to be unblocked
module’s functions (i.e., a ‘global’ object)
wait_queue_head_t wq; init_waitqueue_head( &wq );
DA TA
HEAD
TAIL
DA TA
DA TA
D A T A
DA TA
FIFO rules: The next data to be added goes in at the current ‘tail’ position, and the next data to be removed comes from the ‘head’ position The ringbuffer is ‘empty’ when ‘head’ equals ‘tail’, and it is ‘full’ if ‘tail’ + 1 equals ‘head’ (modulo RINGSIZE)