Is there a file system with a low level prepend operation?
Asked Answered
A

1

3

At the lowest levels most OS file operations include open, close, read, write, delete and seek and append operation, yet there is no prepend operation.

The question came up because a colleague of mine was working with a large (multi-gigabyte) data log he had generated and he realized he had not written the a file header to the log file. Even though he only needed to add a hundred bytes to the front of the file, we couldn't see any way to do that without getting into the block / sector file allocation table level stuff.

Is there any history or technical reason that a prepend operation does not exist, or would be more expensive then the similar append operation?

Amalgamation answered 16/8, 2011 at 15:35 Comment(2)
Hilbert described a file system like this.Myrtie
See similar question here: #4574104Hilar
F
0

I am only aware of a single research paper describing something like this: "Supporting Insertions and Deletions in Striped Parallel Filesystems" from 1992. The abstract is

The dramatic improvements in the processing rates of parallel computers are turning many compute-bound jobs into IO-bound jobs. Parallel file systems have been proposed to better match IO throughput to processing power. Many parallel file systems stripe files across numerous disks; each disk has its own controller. A striped file can be appended (or prepended) to and maintain its structure. However, a block can't be inserted into or deleted from the middle of the file, since doing so would destroy the regular striping structure of the file. In this paper, we present a distributed file structure that maintains files in indexed striped extents on a message passing multiprocessor. This approach allows highly parallel random and sequential reads, and also allows insertion and deletion into the middle of the file.

You can find more information in the paper.

Finer answered 16/8, 2011 at 18:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.