Given a prefetch call, the library first assigns the current prefetch call ID to this call. Second, it increments the current prefetch call ID. Third, it inserts an entry into the prefetch queue after calculating its target logical block ID. Finally, it updates the current offset of the accessed file in the file table. When the prefetch queue becomes full, the library makes a system call that we added to copy the prefetch queue entries into the kernel.
When an application makes a create_prefetch_thread() call, the library forks off a new thread as the prefetch thread, and informs the kernel about the process ID of both the computation and the prefetch thread using an added system call. This helps the kernel to identify the process ID of the prefetch thread given a computation thread, and vice versa. In addition, the prefetch library registers the file pointers of all prefetchable files with the kernel through another added system call, so that the kernel can take appropriate action regarding prefetching for those file pointers.