Table of Contents


qt_pread - read input


#include <qthread/qt_syscalls.h>

qt_pread (int filedes, void *buf, size_t nbyte, off_t offset);

qt_read (int filedes, void *buf, size_t nbyte);


These are wrappers around the standard pread() and read() system call functions. Instead of executing these blocking system calls directly, the operations are enqueued in the internal system call queue to be handled.

The system call queue provides a way to perform blocking system calls without impeding parallel computation. Operations are enqueued in an internal queue which is serviced by a dynamic number of dedicated system call threads. This set of threads is capped at a user-configurable limit, specified with the QT_MAX_IO_WORKERS environment variable at initialization time. When there are no more operations in the system call queue, these workers are persistent for a configurable amount of time, specified with the QT_IO_TIMEOUT environment variable at initialization time, before they exit. This is to reduce the overhead involved in scaling up the number of worker threads to respond to newly enqueued system calls.

See Also

pread(2) , read(2) , qt_accept(3) , qt_connect(3) , qt_poll(3) , qt_pwrite(3) , qt_select(3) , qt_system(3) , qt_wait4(3) , qt_write(3)

Table of Contents