Raw device - Wikipedia, the free encyclopedia

来源:百度文库 编辑:神马文学网 时间:2024/03/29 18:14:35

Raw device

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computing, specifically Unix-like operating systems, a raw device is a special kind of block devicefile that allows accessing a storage device such as a hard drivedirectly, bypassing the operating system's caches and buffers (althoughthe hardware caches might still be used). Applications like a Database management systemcan use raw devices directly, enabling them to manage how data iscached, rather than deferring this task to the operating system.

On FreeBSD, all block devices are in fact raw devices. Support fornon-raw devices was removed in FreeBSD 4.0 in order to simplify buffermanagement and increase scalability and performance.

On Linux raw devices are deprecated and scheduled for removal, because the O_DIRECT flag can be used instead.[1]Instead of accessing a special raw device file, the application simplycan (and should!) access a file with the O_DIRECT flag enabled, andcaching will be disabled. Since there is still a userbase for rawdevices and applications without support for O_DIRECT still exist, ithas been a controversial subject on the Linux kernel mailing list.[citation needed]

 This Linux-related article is a stub. You can help Wikipedia by expanding it. Retrieved from "http://en.wikipedia.org/wiki/Raw_device"Categories: Unix | Linux kernel features | Linux stubs