Drive letter assignment

Drive letter assignment

Drive letter assignment is the process of assigning alphabetical identifiers to physical or logical disk drives or partitions (drive volumes) in the root filesystem namespace; this usage is now mostly found in Microsoft operating systems. Unlike the concept of UNIX mount points, where volumes are named and located arbitrarily in a single hierarchical namespace, drive letter assignment allows multiple highest-level namespaces. Drive letter assignment is thus a process of using letters to name the roots of the "forest" representing the file system; each volume holds an independent "tree" (or, for non-hierarchical file systems, an independent list of files).

Contents

Origin

The concept of drive letters, as used today, presumably owes its origins to IBM's VM family of operating systems, dating back to CP/CMS in 1967 (and its research predecessor CP-40), by way of CP/M. The concept evolved through several steps:

  • CP/CMS used drive letters to identify minidisks attached to a user session.[1] A full file reference (pathname in today's parlance) consisted of a filename, a filetype, and a disk letter called a filemode (e.g. A or B). Minidisks could correspond to physical disk drives, but more typically referred to logical drives, which were mapped automatically onto shared devices by the operating system as sets of virtual cylinders of fixed-size blocks.
  • CP/CMS inspired numerous other operating systems, including the CP/M microcomputer operating system, which used a drive letter to specify a physical storage device. Early versions of CP/M (and other microcomputer operating systems) implemented a "flat" file system on each disk drive, where a complete file reference consisted of a drive letter, a colon, a filename (up to eight characters) and a filetype (three characters); for instance A:README.TXT. (This was the era of 8-inch floppy disks, where such small namespaces did not impose practical constraints.) This usage was influenced by the device prefixes used in Digital Equipment Corporation's TOPS-10 operating system.[2]
  • The drive letter syntax chosen for CP/M was inherited by Microsoft for its operating system MS-DOS and later, OS/2 and the Microsoft Windows family. Originally, drive letters always represented physical volumes, but support for logical volumes eventually appeared.

Note that the important capability of hierarchical directories within each drive letter was initially absent from these systems. This was a major feature of UNIX and other similar operating systems, where hard disk drives held thousands (rather than tens or hundreds) of files. Increasing microcomputer storage capacities led to their introduction, eventually followed by long filenames. In file systems lacking such naming mechanisms, drive letter assignment proved a useful, simple organizing principle.

Operating systems that use drive letter assignment

Order of assignment

Except for CP/M and early versions of MS-DOS, each of these operating systems assigns drive letters according to the following algorithm:

  1. Assign the drive letter A: to the first floppy disk drive (drive 0), and B: to the second floppy disk drive (drive 1).
  2. Assign a drive letter, beginning with C: to the first active primary partition recognized upon the first physical hard disk.
  3. Assign subsequent drive letters to the first primary partition upon each successive physical hard disk drive.
  4. Assign subsequent drive letters to every recognized logical partition, beginning with the first hard drive and proceeding through successive physical hard disk drives.
  5. Assign subsequent drive letters to any RAM Disk.
  6. Assign subsequent drive letters to any additional floppy or optical disc drives.

MS-DOS versions 3 and earlier assign letters to all of the floppy drives before considering hard drives, so a system with four floppy drives would call the first hard drive E:.

Some versions of DOS don't assign the drive letter, beginning with C:, to the first active primary partition recognized upon the first physical hard disk, but on the first primary partition recognized of the first hard disk, even if it is not set active.

Some late versions of the DR-DOS IBMBIO.COM provide a pre-boot config structure, holding bit flags to select (beside others) between various drive letter assignment strategies. These strategies can be pre-selected by a user or OEM or be changed by a boot loader on the fly when launching DR-DOS.

The drive letter order can depend on whether a given disk is managed by a boot-time driver or by a dynamically loaded driver. For example, if the second or third hard disk is of SCSI type and on MS-DOS requires drivers loaded through the CONFIG.SYS file (e.g. the controller card does not offer on-board BIOS or using this BIOS is not practical), then the first SCSI primary partition will appear after all the IDE partitions on MS-DOS. Therefore MS-DOS and, for example, OS/2 could have different drive letters, as OS/2 loads the SCSI driver earlier. A solution was not to use primary partitions on such hard disks.

In Windows NT, Windows 2000, Windows XP and OS/2, the operating system uses the aforementioned algorithm to automatically assign letters to floppy disk drives, optical disc drives, the boot disk, and other recognized volumes that are not otherwise created by an administrator within the operating system. Volumes that are created within the operating system are manually specified, and some of the automatic drive letters can be changed. Unrecognized volumes are not assigned letters, and are usually left untouched by the operating system.

A common problem that occurs with the drive letter assignment is that the letter assigned to a network drive can interfere with the letter of a local volume (like a newly installed CD/DVD drive or a USB stick). For example, if the last local drive is drive D: and we have assigned to a network drive as E:, then when we connect a USB mass storage device it will also be assigned drive E: causing loss of connectivity with either the network share or the USB device. Users with administrative privileges can assign drive letters manually to overcome this problem[6].

Another condition that can cause problems on Windows XP is when there are network drives defined but in an error condition (as they would be on a laptop operating outside the network). Even when the unconnected network drive is not the next available drive letter, Windows XP may be unable to map a drive and this error may also prevent the mounting of the USB device.[citation needed]

Common assignments

Applying the scheme discussed above on a fairly modern Windows based system typically results in the following drive letter assignments:

  • A: — Floppy disk drives, 3.5" or 5.25", and possibly other types of disk drives, if present.
  • B: — Reserved for a second floppy drive, if present.
  • C: — First hard disk partition.
  • D: to Z: — Other disk partitions get labeled here. The letter D: or E: are often assigned to CD-ROM, DVD drives but not always. In fact, Windows assigns the next free drive letter to the next drive it encounters while enumerating the disk drives on the system during installation. Drives can be partitioned, thereby creating more drive letters. This applies to MS-DOS, as well as all Windows operating systems. Windows offers other ways to change the drive letters, either through the Disk Manager (Windows NT, 2000, XP and later) or through the Device Manager found in the Control Panel. MS-DOS typically uses parameters on the line loading device drivers inside the CONFIG.SYS file.
  • F: — First network drive if using Novell NetWare.
  • L: - Dynamically assigned "load drive" under Concurrent DOS, Multiuser DOS, System Manager and REAL/32.[7][8]
  • M: - Drive letter for optionally "memory drive" MDISK under Concurrent DOS.[7]
  • N:, O:, P: - Assignable "floating drives" under CP/M-86 4.x, Personal CP/M-86 2.x, DOS Plus 1.2-2.1 (via BDOS call 0Fh), a concept later extended to any unused drive letters under Concurrent DOS, Multiuser DOS, System Manager, REAL/32 and DR DOS up to 6.0.[7][8]
  • Q: - Microsoft Office Click-to-Run virtualization.
  • Z: — First network drive if using Banyan VINES, and the initial drive letter assignment for the virtual disk network in the DOSBox x86 emulator.

The C: drive usually contains all of the Windows operating system files required for operation of the computer. On many modern personal computers, only one hard drive with one partition is present, so it is designated C:. On such a computer, all of a user's personal files are often stored in directories on this drive as well. These drives can, however, be different.

When there is no second physical floppy drive, the B: can be used as a "virtual" floppy drive mapped onto the physical A: drive, whereby the user would be prompted to switch floppies every time a read or write was required to whichever was the least recently used of A: or B:. This allows for much of the functionality of two floppy drives on a computer that has only one.

Network drives are often assigned letters towards the end of the alphabet. This is often done to differentiate them from local drives: by using letters towards the end, it reduces the risk of an assignment conflict. This is especially true when the assignment is done automatically across a network (usually by a logon script).

In most DOS systems it is not possible to have more than 26 mounted drives. The PalmDOS PCMCIA driver stack supports drive letters 0:, 1:, 2:, ... to address PCMCIA drive slots. Some Novell network drivers for DOS support up to 32 drive letters under compatible DOS versions. In addition to this, Novell DOS 7, OpenDOS 7.01 and DR-DOS 7.02 genuinely support a CONFIG.SYS LASTDRIVE=32 directive in order to allocate up to 32 drive letters, named A:-Z:, [:, \:, ]:, ^:, _: and `:. (DR-DOS 7.02-7.07 also supports HILASTDRIVE= and LASTDRIVEHIGH= directives in order to relocate drive structures into upper memory.) Some DOS application programs don't expect drive letters beyond Z: and won't work with them, therefore it is recommended to use them for special purposes or search drives. JP Software's 4DOS command line processor supports drive letters beyond Z: in general, but since some of the letters clash with syntactical extensions of this command line processor, they need to be escaped in order to use them as drive letters. Windows 9x (MS-DOS 7.0/MS-DOS 7.1) added support for LASTDRIVE=32 and LASTDRIVEHIGH=32 as well. If access to more filesystems than Z: is required under Windows NT, Volume Mount Points must be used.[9] However, it is possible to mount non-letter drives, such as 1:, 2:, or !: using the command line subst utility in Windows XP or Vista (i.e. "subst 1: c:\temp"), but this is not officially supported and may break programs that assume that all drive letters are A-Z.

ASSIGN, JOIN and SUBST in DOS and Windows

Drive letters are not the only way of accessing different volumes. DOS offers a JOIN command that allows access to an assigned volume through an arbitrary directory, similar to the Unix mount command. It also offers a SUBST command which allows the assignment of a drive letter to a directory. One or both of these commands were removed in later systems like OS/2 or Windows NT, but starting with Windows 2000 both are again supported: the SUBST command exists as before, while JOIN's functionality is subsumed in linkd (part of the Windows Resource Kit). In Windows Vista, the new command mklink can be used for this purpose. Also Windows 2000 and later support mount points, accessible from the Control Panel.

Many operating systems originating from Digital Research provide means to implicitly assign substitute drives, called floating drives in DRI terminology, by using the CD/CHDIR command in the following syntax:

CD N:=C:\SUBDIR

DOS Plus supports this for drive letters N:, O:, and P:. This feature is also present in Concurrent DOS, Multiuser DOS, System Manager 7, and REAL/32, however, these systems extend the concept to all unused drive letters from A: to Z:, except for the reserved drive letter L:.[8] DR DOS 3.31 - 6.0 (up to initial 1991 release only) also supports this including drive letter L:. This feature is not available under DR DOS 6.0 (1992 upgrade), PalmDOS 1, Novell DOS 7, OpenDOS 7.01, DR-DOS 7.02 and higher. Floating drives are implemented in the BDOS kernel, not in the command line shell, thus they can be used and assigned also from within applications when they use the "change directory" system call. However, most DOS applications are not aware of this extension and will consequently discard such directory paths as invalid. JP Software's command line interpreter 4DOS supports floating drives on operating systems also supporting it.

In a similar feature, Concurrent DOS, Multiuser DOS, System Manager and REAL/32 will dynamically assign a drive letter L: to the load path of a loaded application, thereby allowing applications to refer to files residing in their load directory under a standardized drive letter instead of under an absolute path.[8] This load drive feature makes it easier to move software installations on and across disks without having to adapt paths to overlays, configuration files or user data stored in the load directory or subsequent directories. (For similar reasons, the appendage to the environment block associated with loaded applications under DOS 3.0 (and higher) contains a reference to the load path of the executable as well, however, this consumes more resident memory, and to take advantage of it, support for it must be coded into the executable, whereas DRI's solution works with any kind of applications.)

See also

References

  1. ^ DuCharme, Bob (2001). "VM/CMS". The Operating System Handbook, or, Fake Your Way Through Minis and Mainframes. http://www.snee.com/bob/opsys/part5vmcms.pdf. 
  2. ^ Johnson, Herbert (2009-01-04). "CP/M and Digital Research Inc. (DRI) History". www.retrotechnology.com. http://www.retrotechnology.com/dri/d_dri_history.html. Retrieved 2009-01-28. 
  3. ^ http://osnews.com/story/15223/GEOS_The_Graphical_Environment_Operating_System/page7/
  4. ^ http://www.dex4u.com/dosbox.htm
  5. ^ http://miraculix.ru/screens/
  6. ^ Change, add, or remove a drive letter: [1]. Retrieved on May 25th 2011
  7. ^ a b c Digital Research. Concurrent DOS 386 - Multiuser/Multitasking Operating System - User Guide ([2]).
  8. ^ a b c d Digital Research. Concurrent DOS 386 - Multiuser/Multitasking Operating System - Reference Manual. 1987 ([3]).
  9. ^ Microsoft TechNet Retrieved on 1 December 2006

External links


Wikimedia Foundation. 2010.

Нужна курсовая?

Look at other dictionaries:

  • DOS — This article is about the family of operating systems for IBM PC compatible computers. For other uses, see DOS (disambiguation). FreeDOS screenshot showing the command line interface, directory structure and version information. DOS, short for… …   Wikipedia

  • Subst — is a command on the DOS operating system used for substituting paths on physical and logical drives as virtual drives. In the past it has been used for revealing hidden drives on security tense PCs. The command subst is also available in post… …   Wikipedia

  • Disk partitioning — GParted is a popular utility used for disk partitioning Disk partitioning is the act of dividing a hard disk drive into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks.… …   Wikipedia

  • Logical Disk Manager — The Logical Disk Manager (diskmgmt.msc) is an implementation of a logical volume manager for Microsoft Windows NT, developed by Microsoft and Veritas Software. It was introduced with the Windows 2000 operating system, and is supported in Windows… …   Wikipedia

  • COMMAND.COM — Developer(s) Seattle Computer Products, Microsoft Corporation, IBM, Novell and several others. Operating system DR DOS, FreeDOS, MS DOS, Novell DOS, OpenDOS, PC DOS, PTS DOS, ROM DOS, 86 DOS, Microsoft Windows (Windows 95 Wi …   Wikipedia

  • File Allocation Table — For other uses, see Fat (disambiguation). FAT Developer Microsoft Full Name File Allocation Table FAT12 (12‑bit version) FAT16/FAT16B (16‑bit versions) FAT32 (32‑bit version with 28 bits used) Introduced …   Wikipedia

  • DLA — Entities and organizations Douala International Airport, IATA airport code The United States Defense Logistics Agency DLA Piper, an international law firm Democratic Left Alliance, a Polish political party Dental Laboratories Association The… …   Wikipedia

  • DLA — Defense Logistics Agency (Governmental » US Government) Defense Logistics Agency (Governmental » Military) ** Disability Living Allowance (Governmental » US Government) * Drive Letter Access (Computing » Software) * Disabled Living Allowance… …   Abbreviations dictionary

  • Media Transfer Protocol — The Media Transfer Protocol is a devised set of custom extensions to the Picture Transfer Protocol (PTP).[1] Whereas PTP was designed for downloading photographs from digital cameras, Media Transfer Protocol supports the transfer of music files… …   Wikipedia

  • Root directory — For other uses, see Root (disambiguation). In computer file systems, the root directory is the first or top most directory in a hierarchy. It can be likened to the root of a tree  the starting point where all branches originate. Contents 1… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”