preadv · shipping · also preadv(), positional vectored read

preadv

preadv reads a seekable file at an explicit offset into multiple memory buffers without changing the open file description's current offset.

Related Observatory article: preadv on hesela.com

preadv combines an explicit starting file offset with readv's ordered memory buffers. It reads one sequential file range, not an independent file location for each buffer, and leaves the shared current offset unchanged. Linux preadv2 is a distinct extension: offset -1 selects and updates the current offset [1]. Python's os.preadv documentation also distinguishes the actual total byte count from buffer capacity and documents the operating system's SC_IOV_MAX buffer-count limit [3]. Offset selection does not itself establish a stable file version across later calls; positional I/O's documented concurrency benefit is independence from other threads' cursor changes [2].

Relations

related
readv, pread, Short read, File offset, Open file description, writev

Advantages

  • Combines explicit-position input with multiple caller-provided destination buffers.

Limitations

  • The file must support seeking, and a successful call may return fewer bytes than requested.
  • Explicit positioning is not a snapshot guarantee across a sequence of calls.

Citations

  1. Linux man-pages: readv(2), preadv/pwritev and preadv2/pwritev2 (accessed 2026-11-02)
  2. Linux man-pages: pread(2), DESCRIPTION and NOTES (accessed 2026-11-02)
  3. Python documentation: os.preadv (accessed 2026-11-02)
Sources & caveats
  • Primary API documentation reviewed 2026-11-02; no native measurement, throughput test or storage-failure estimate.
  • File-version stability across calls is an application-design limitation, not a measured concurrency outcome.

JSON: /data/terms/preadv.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. preadv. Hesela. 2026-11-02. https://hesela.dev/terms/preadv/