是否存在具有低级前置操作的文件系统?

发布于 2024-11-29 14:23:48 字数 225 浏览 0 评论 0原文

在最低级别,大多数操作系统文件操作包括打开、关闭、读取、写入、删除以及查找和追加操作,但没有前置操作。

出现这个问题是因为我的一位同事正在处理他生成的大型(数千兆字节)数据日志,他意识到他没有将文件头写入日志文件。尽管他只需要在文件的前面添加一百个字节,但我们看不到任何方法可以在不进入块/扇区文件分配表级别的情况下做到这一点。

是否存在任何历史或技术原因导致前置操作不存在,或者比类似的附加操作更昂贵?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

向日葵 2024-12-06 14:23:48

我只知道一篇研究论文描述了这样的事情:“支持条带并行文件系统中的插入和删除”(1992 年)。
摘要是

并行计算机处理速率的显着提高正在将许多计算密集型作业转变为 IO 密集型作业。并行文件系统被提出来更好地匹配 IO 吞吐量和处理能力。许多并行文件系统将文件跨多个磁盘进行条带化;每个磁盘都有自己的控制器。条带文件可以附加(或前置)并维持其结构。但是,无法在文件中间插入或删除块,因为这样做会破坏文件的常规条带结构。在本文中,我们提出了一种分布式文件结构,该结构在消息传递多处理器上维护索引条带范围内的文件。这种方法允许高度并行的随机和顺序读取,还允许在文件中间插入和删除。

您可以在论文中找到更多信息。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文