Chinaunix首页 | 论坛 | 博客
  • 博客访问: 826202
  • 博文数量: 116
  • 博客积分: 1472
  • 博客等级: 上尉
  • 技术积分: 1725
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-06 11:45
文章分类

全部博文(116)

文章存档

2015年(1)

2014年(42)

2013年(5)

2012年(19)

2011年(49)

我的朋友

分类: 嵌入式

2014-02-06 10:47:17

 

----------------

One downside of ramfs is you can keep writing data into it until you fill up all memory, and the VM can't free it because the VM thinks that files should get written to backing store (rather than swap space), but ramfs hasn't got any backing store. Because of this, only root (or a trusted user) should be allowed write access to a ramfs mount.

ramfs的一个不足之处是:如果不断地向ramfs写入数据,将会耗尽所有的内存,并且VM不能释放它。

由于VM(Vitual Memory)认为文件应该被写回后备存储器,而不是交换空间(swap space),另一方面ramfs并不能获得任何的后备存储,所以VM不能释放ramfs分配的内存。从而,只有root用户(or trusted user)才能进行ramfs写操作。


A ramfs derivative called tmpfs was created to add size limits, and the ability to write the data to swap space. Normal users can be allowed write access to tmpfs mounts.
tmpfs是ramfs的衍生物,用来限制缓存大小、具备向swap空间写入数据的能力。允许普通用户对挂载在tmpfs上的文件系统执行写操作。

tmpfs是用来保存VM所有文件的文件系统。tmpfs中缓存的内容全部是临时的。一旦卸载,所有的内容都会遗失。它把所有的缓存置于内核,它的规模随着文件的规模同步变化。但是它规模有大小限制,可以修改。它可以把当前不再需要的页写入到swap空间。
See Documentation/filesystems/tmpfs.txt for more information.




重要认识:


  1. tmpfs是ramfs的特例,是大小不可改变的ramfs.
阅读(824) | 评论(0) | 转发(0) |
0

上一篇:ramfs and ramdisk比较

下一篇:Rootfs

给主人留下些什么吧!~~