Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Hardcore Project for Internships
·
Module 3
Efficient I/O with Memory-Mapped Files
1
Memory-Mapped I/O for Large Datasets: Performance Advantages
Explain the performance benefits of memory-mapped I/O (`mmap`) over standard `read`/`write` calls for large datasets.
2
Creating and Resizing Files with `ftruncate`
Implement file creation and pre-allocation to a specific size using `ftruncate` and POSIX file descriptors.
3
Memory Mapping with `mmap`
Map a pre-allocated file into the process's virtual address space using `mmap` for direct memory access.
4
Efficient Vector Data Storage Design
Design a file layout for storing vector data and metadata contiguously for efficient access.
5
Writing Vector Data to Memory-Mapped Regions
Implement functions to write vector data directly into the memory-mapped region.
6
Synchronizing In-Memory Changes with `msync`
Use `msync` to control the synchronization of in-memory changes to the underlying physical disk.
Previous module
High-Performance Vector Math with SIMD
Next module
Data Layout and Exact k-NN Search