USB mass storage device class

From Wikipedia, the free encyclopedia

The USB mass storage device class is a set of computing communications protocols defined by the USB Implementers Forum that run on the Universal Serial Bus. The standard provides an interface to a variety of storage devices.

A USB flash drive like this one, will typically implement the USB mass storage device class.
Enlarge
A USB flash drive like this one, will typically implement the USB mass storage device class.

Some of the devices which are connected to computers via this standard are:

Devices (such as digital audio players) which support this standard are referred to as MSC (Mass Storage Class). MSC is the official acronym, while UMS (USB Mass Storage) became very common instead. Not all digital audio players support this standard; some use MTP, or other proprietary protocols in lieu of this standard. (This information is not always revealed by the published device specifications.)

Contents

[edit] Operating system support

As of 2004, most current main-stream operating systems include support for USB mass storage devices, although support on older systems is available through patches.

Microsoft's Windows 95 OSR2.1 operating system featured very limited support for USB in general, and no generic USB mass storage driver was produced by Microsoft for even Windows 98. This meant that a device-specific driver was needed for each type of USB storage device the installation encountered. This situation was (almost) remedied with the later Windows Me and Windows 2000 products (where a specific driver was required only for very unusual mass storage devices) and only fully corrected in the later Windows XP and Windows Server 2003 systems.

There is no native (supplied by Microsoft) support for USB in Windows NT, MS-DOS or earlier versions of Windows, although some third-party solutions exist for each OS. A third party generic mass storage driver for Windows 98 is also now available.

Apple Computer's Mac OS supports USB mass storage by means of optional drivers from OS 8.5.1, and OS 9 and OS X support USB mass storage natively.

Support in the Linux kernel began in kernel version 2.4, although 2.2 has been back-patched to support it.

Solaris supports UMASS storage devices as well since the 2.8 release and up.

NetBSD supports UMASS storage devices as well since the 1.5 release and up.

Windows Mobile supports most mass storage devices formatted with FAT on devices with USB Host, although devices powered by it typically cannot provide enough power on their own to run hard drives.

The game consoles Xbox 360, PlayStation 3 and Wii support most mass storage devices.

[edit] File systems

A USB Card Reader like this one, will typically implement the USB mass storage device class.
Enlarge
A USB Card Reader like this one, will typically implement the USB mass storage device class.

The USB mass storage as such does not specify which file system shall be used on the device using it; instead, it mainly provides a way of reading out sectors as on any hard disk device. Operating systems are free to format this storage area with any file system they like.

Because of its ubiquity and relative simplicity, the most common file system on embedded devices such as USB flash drives, cameras, or digital audio players is Microsoft's FAT or FAT32 file system with (optional) support for long names. Large USB-based hard disks may come formatted with NTFS, which is much less supported outside Microsoft Windows, but a keydrive or any other device which is primarily intended for storage may be formatted using for example HFS Plus on an Apple Macintosh, or Ext2 under Linux, or Unix File System under Solaris Operating Environment.

On cameras and similar gadgets which need to access the file system on their own, FAT is typically preferred by the device manufacturers. Altering the file system in this case is generally a bad idea: the device will probably stop working.

Note that disk file systems were not devised with flash memory in mind. Flash-specific concerns like limited number of writes per cell can be affected by a write-heavy file system, causing flash memory manufacturers to reserve about 5 percent of each medium's capacity for wear leveling. On the other hand, disk concepts such as fragmentation or contiguity are not problems in flash because they impose no appreciable I/O delays, but they may lead to reduced performance in file systems that use extents.

[edit] Complications of the mass-storage device class

The mass storage interface is an attractive option for many devices, such as cameras and media players, which are nonetheless capable of more functionality than being simple data repositories. By presenting themselves as simple datastores, these devices can leverage the high degree of support for the USB mass-storage device class in current operating systems' USB driver stacks and allow easy read and write access to their internal memories. The downside of doing so is that it prevents the device from easily presenting its actual functional behavior across the USB interface too. For example, the makers of a digital still camera would also like it to implement the USB still-image device class, allowing it to be controlled by image capture software.

Some USB digital cameras feature a switch allowing them to appear either as a mass-storage device or as a still-picture device (PictBridge or PTP), but they cannot be both at the same time. It is likely that as development of USB controller chips advances, this constraint will cease to be an issue; for example, a camera could appear as a USB hub with both a mass-storage device and a still-picture device connected to it.

[edit] See also

  • TrueCrypt
  • USB PTP alternative transfer mode for digital cameras

[edit] External links

In other languages