是否有一个低级prepend操作的文件系统? [英] Is there a file system with a low level prepend operation?

查看:113
本文介绍了是否有一个低级prepend操作的文件系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

问题出现了,因为我的一个同事正在处理他生成的一个大的(几千兆字节)数据记录,他意识到他没有把文件头写到日志文件中。即使他只需要在文件的前面添加一百个字节,我们也不会在没有进入块/扇区文件分配表级别的东西的情况下看到任何方法。



是否有任何历史或技术原因,prepend操作不存在,或者会比类似的append操作更昂贵?

解决方案

我只知道一篇描述如下的研究论文:抽象是

lockquote


rel =nofollow>支持条带化并行文件系统中的插入和删除 >并行计算机处理速度的显着提高将许多计算机绑定的作业转变为IO绑定作业。已经提出并行文件系统来更好地将IO吞吐量与处理能力相匹配。许多并行文件系统在多个磁盘上分割文件;每个磁盘都有自己的控制器。一个条纹文件可以附加(或预先)并保持其结构。但是,一个块不能被插入到文件的中间或从文件的中间被删除,因为这样做会破坏文件的常规条带结构。在本文中,我们提出了一个分布式文件结构,用于在传递多处理器的消息上维护索引条带化区域中的文件。这种方法允许高度并行的随机和顺序读取,并允许插入和删除文件中间。

你可以找到更多信息在纸上。

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?

解决方案

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.

这篇关于是否有一个低级prepend操作的文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆