You are on page 1of 11

MS-DOS

 HISTORY OF MS-DOS:
MS-DOS (Microsoft Disk Operating System) is a single-user, single-tasking computer operating
system that uses a command line interface. In spite of its very small size and relative simplicity, it
is one of the most successful operating systems that has been developed to date.

When IBM launched its revolutionary personal computer, the IBM PC, in August 1981, it came
complete with a 16-bit operating system from Microsoft, MS-DOS 1.0. This was Microsoft's first
operating system, and it also became the first widely used operating system for the IBM PC and its
clones.

MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty Operating System),
which Microsoft bought from a Seattle company, appropriately named Seattle Computer Products,
in July 1981. QDOS had been developed as a clone of the CP/M eight-bit operating system in
order to provide compatibility with the popular business applications of the day such as WordStar
and dBase. CP/M (Control Program for Microcomputers) was written by Gary Kildall of Digital
Research several years earlier and had become the first operating system for microcomputers in
general use.

QDOS was written by Tim Paterson, a Seattle Computer Products employee, for the new Intel 16-
bit 8086 CPU (central processing unit), and the first version was shipped in August, 1980.
Although it was completed in a mere six weeks, QDOS was sufficiently different from CP/M to be
considered legal. Paterson was later hired by Microsoft.

Microsoft initially kept the IBM deal a secret from Seattle Computer Products. And in what was to
become another extremely fortuitous move, Bill Gates, the not uncontroversial co-founder of
Microsoft, persuaded IBM to let his company retain marketing rights for the operating system
separately from the IBM PC project. Microsoft renamed it PC-DOS (the IBM version) and MS-
DOS (the Microsoft version). The two versions were initially nearly identical, but they eventually
diverged.

The acronym DOS was not new even then. It had originally been used by IBM in the 1960s in the
name of an operating system (i.e., DOS/360) for its System/360 computer. At that time the use of
disks for storing the operating system and data was considered cutting edge technology.

Until its acquisition of QDOS, Microsoft had been mainly a vendor of computer programming
languages. Gates and co-founder Paul Allen had written Microsoft BASIC and were selling it on
disks and tape mostly to PC hobbyists.
MS-DOS soared in popularity with the surge in the PC market. Revenue from its sales fueled
Microsoft's phenomenal growth, and MS-DOS was the key to company's rapid emergence as the
dominant firm in the software industry. This product continued to be the largest single contributor
to Microsoft's income well after it had become more famous for Windows.

Subsequent versions of MS-DOS featured improved performance and additional functions, not a
few of which were copied from other operating systems. For example, version 1.25, released in
1982, added support for double-sided disks, thereby eliminating the need to manually turn the
disks over to access the reverse side.

Version 2.0, released the next year, added support for directories, for IBM's then huge 10MB hard
disk drive (HDD) and for 360KB, 5.25-inch floppy disks. This was followed by version 2.11 later
in the same year, which added support for foreign and extended characters.

Version 3.0, launched in 1984, added support for 1.2MB floppy disks and 32MB HDDs. This was
soon followed by version 3.1, which added support for networks.

Additions and improvements in subsequent versions included support for multiple HDD partitions,
for disk compression and for larger partitions as well as an improved disk-checking utility,
enhanced memory management, a disk defragmenter and an improved text editor.

The final major version was 7.0, which was released in 1995 as part of Microsoft Windows 95. It
featured close integration with that operating system, including support for long filenames and the
removal of numerous utilities, some of which were on the Windows 95 CDROM. It was revised in
1997 with version 7.1, which added support for the FAT32 filesystem on HDDs.

Although many of the features were copied from UNIX, MS-DOS was never able to come
anywhere close to UNIX in terms of performance or features. For example, MS-DOS never
became a serious multi-user or multitasking operating system (both of which were core features of
UNIX right from the start) in spite of attempts to retrofit these capabilities. Multitasking is the
ability for a computer to run two or more programs simultaneously.

The Rise of the GUI

The introduction of the Apple Macintosh in 1984 brought about a surge of interest in GUIs
(graphical user interfaces), and it soon became apparent that they would eventually replace
command line interfaces such as that used by MS-DOS. Although many MS-DOS application
programs created their own primitive GUIs, this approach required duplication of programming
effort, and the lack of a consistent GUI among programs made it more difficult for users to learn
new programs.

It took Microsoft years until it was able to offer a fairly high quality GUI of its own, with the
introduction of Windows 95 in 1995 (or arguably with Windows 3.0 in 1990). Microsoft had also
begun work on a joint project with IBM called OS/2, which was originally a protected-mode
version of MS-DOS with a GUI, but Microsoft soon abandoned the project in order to devote more
resources to the development of Windows NT, a completely new operating system that was
independent of MS-DOS.

Protected mode and real mode are the two modes of operation supported by the Intel x86
architecture. The former enables 32-bit memory addressing, thereby permitting use of the extended
memory that cannot be easily accessed from real mode. This makes it possible to assign separate
memory areas to the operating system kernel (i.e., the core of the operating system) and to each
process (i.e., program or task), thus resulting in much more stable multitasking than can be attained
with real mode.

Early versions of Microsoft Windows ran under MS-DOS, whereas later versions were launched
under MS-DOS but were then extended by going into protected mode. Windows NT and its
successors, Windows 2000 and XP, do not use MS-DOS; however, they contain an emulation layer
on which MS-DOS programs can be operated, mainly for backward compatibility with legacy (i.e.,
old) software.

DOS Commands

MS-DOS has a relatively small number of commands, and an even smaller number of commonly
used ones. Moreover, these commands are generally inflexible because, in contrast to Linux and
other Unix-like operating systems, they are designed to accommodate few options or arguments
(i.e., values that can be passed to the commands).

Some of the most common commands are as follows (corresponding commands on Unix-like
operating systems are shown in parenthesis):

CD - changes the current directory (cd)


COPY - copies a file (cp)
DEL - deletes a file (rm)
DIR - lists directory contents (ls)
EDIT - starts an editor to create or edit plain text files (vi, vim, ed, joe)
FORMAT - formats a disk to accept DOS files (mformat)
HELP - displays information about a command (man, info)
MKDIR - creates a new directory (mkdir)
RD - removes a directory (rmdir)
REN - renames a file (mv)
TYPE - displays contents of a file on the screen (more, cat)

Comparison between MS-DOS and Linux

MS-DOS and Linux have much in common, primarily because MS-DOS copied many ideas from
UNIX. However, there are some very fundamental differences, including:
(1) Linux is a full-fledged multiuser, multitasking operating system, whereas MS-DOS is a single-
user, single-tasking operating system.

(2) MS-DOS does not have built-in security concepts such as file-ownership and permissions,
which are fundamental to Linux.

(3) Linux has an inverted tree-like filesystem in which all directories and files branch from a single
directory, i.e., the root directory, and its subdirectories. MS-DOS can have multiple, independent
root directories, such as A:, C:, D:, etc.

(4) Linux uses forward slashes "/" to separate directories, whereas MS-DOS uses backslashes "\"
for the same purpose.

(5) Linux filenames can contain up to 255 characters. MS-DOS filenames are limited to an eight
characters plus a three-character extension and have restrictions on allowable characters. Also,
filenames are case-sensitive in Linux, whereas they are not in MS-DOS.

(6) Linux has a vastly richer command set than does MS-DOS, with a much greater number of
commands and individual commands having greater power, flexibility and ease of use. Commands
are case-sensitive in Linux, but they are not in MS-DOS.

(7) Although Linux and MS-DOS both have pipes and input/output redirection, the MS-DOS pipes
use a completely different -- and inferior -- implementation.

(8) MS-DOS is not sufficiently flexible and efficient to serve as a base for a high quality, general-
purpose GUI (and thus it had to be abandoned by Microsoft). In sharp contrast, Linux is an
excellent base for a GUI (and it is used as a base for the X Window System, which is extremely
configurable and whose already excellent performance continues to improve).

MS-DOS Clones and Emulators

The great success of MS-DOS led to the development of several similar operating systems,
including DR-DOS, FreeDOS, OpenDOS and PC-DOS. The most promising of these clones is
FreeDOS, which is claimed to be the only free operating system that is fully compatible with MS-
DOS.

Development of FreeDOS was begun in 1994 by Jim Hall, then a physics student at the University
of Wisconsin-River Falls. His motivation was Microsoft's announcement that it would stop
supporting MS-DOS because of its impending replacement by Windows 95.

Like MS-DOS, FreeDOS is lean and robust, and it can run on old hardware and in embedded
systems. A major improvement as compared with MS-DOS is the addition of options to the
commands. Moreover, FreeDOS is released under the GPL (although some software in the
distribution is covered by other licenses), thus making it ideal for bundling a version of DOS into
products without having to pay royalties.
Because Linux was originally developed on PCs and at a time when MS-DOS was the dominant
PC operating system, a variety of tools were developed to help developers and users bridge the gap
between the two operating systems. Among them is dosemu, a DOS emulator which is included
with Red Hat and other distributions and on which it is possible to run DOS programs. Emulators
are also available for running DOS on other Unix-like operating systems, even on non-x86
processors.

mtools is a collection of utilities that make it easy to access an MS-DOS floppy disk from Linux by
merely inserting it into the floppy disk drive and without having to use any mounting commands
(which can be tricky for inexperienced users). Included in mtools are more than 20 commands, all
of which are identical to their MS-DOS counterparts except that the letter m is added to the start of
each of their names and forward slashes are used instead of backslashes. For example, the MS-
DOS command type a:\file1.txt to display the contents of a file named file1.txt that is located
on a floppy disk would become mtype a:/file1.txt.

Outlook For the Future

Although it is widely believed that MS-DOS is an antiquated and useless operating system with
few features and capabilities, this is far from correct. In fact, although not generally publicized,
MS-DOS is still used today by numerous businesses and individuals around the world. A good
analogy is the ancient programming language COBOL (introduced in 1960!), which is still in
widespread use and, amazingly, accounts for roughly half of all the computer code still in
existence. Both MS-DOS and COBOL have survived for so long because they are robust,
relatively simple and continue to get the job done with a minimum of maintenance.

In many cases, it was not MS-DOS itself that was the limiting factor in system performance;
rather, it was the hardware, including small memories, slow CPUs and slow video cards. The
capabilities of MS-DOS have, in fact, continued to increase even after Microsoft Windows became
widespread. This is a result of continuing advances in the hardware and the introduction of new or
improved utilities and applications. DOS as a whole is also being strengthened by the
improvements that are being made to the MS-DOS clones, particularly FreeDOS.

DOS will be around for many years into the future not only because of the continued existence of
legacy applications but also because of the development of new applications. The main area of
growth will most likely be simple embedded applications, for which DOS is eminently well suited
because of its extremely small size, very reliable operation and zero cost (in the case of FreeDOS).

DOS is so tiny, in fact, that it can fit on a single floppy disk and still leave sufficient room on the
same disk for an embedded program and data files. Although there are many alternatives for
embedded systems, including embedded Linux and Microsoft Windows CE, DOS can be the best
choice if space is severely limited. Moreover, in contrast to FreeDOS, Windows CE has the
disadvantages of not being free and having various licensing issues with which to contend.
 DISK PARTITION:
Disk partitioning is the act or practice of dividing the storage space of a hard disk drive into
separate data areas known as partitions. A partition editor program can be used to create, delete
or modify these partitions. Once a disk is divided into several partitions, directories and files of
different categories may be stored in different partitions. More partitions provide more control,
but too many may become cumbersome. The way that space management, access permissions
and directory searching are implemented depends upon the type of file system installed on a
partition. Careful consideration of the size of the partition is necessary as the ability to change the
size depends on the file system installed on the partition.

 MULIPLE PARTITION:
Creating more than one partition has the following advantages:

 Separation of the operating system and program files, from user files. This allows image
backups (or clones) to be made of only the operating system and installed software.
 Having an area for operating system virtual memory swapping/paging.
 Keeping frequently used programs and data near each other.
 Having cache and log files separate from other files. These can change size dynamically
and rapidly, potentially making a file system full.
 Use of multi booting setups, which allow users to have more than one operating system on
a single computer. For example, one could install Linux, Mac OS X, Microsoft Windows
or others on different partitions of the same hard disk and have a choice of booting into any
operating system (supported by the hardware) at power-up.
 Protecting or isolating files, to make it easier to recover a corrupted file system or operating
system installation. If one partition is corrupted, none of the other file systems are affected,
and the drive's data may still be salvageable. Having a separate partition for read-only data
also reduces the chances of the file system on this partition becoming corrupted.
 Raising overall computer performance on systems where smaller file systems are more
efficient. For instance, large hard drives with only one NTFS file system typically have a
very large sequentially-accessed Master File Table (MFT) and it generally takes more time
to read this MFT than the smaller MFTs of smaller partitions.
 "Short Stroking", which aims to minimize performance-eating head repositioning delays by
reducing the number of tracks used per hard drive.[1] The basic idea is that you make one
partition approx. 20-25% of the total size of the drive. This partition is expected to: occupy
the outer tracks of the hard drive, and offer more than double the throughput — less than
half the access time. If you limit capacity with short stroking, the minimum throughput
stays much closer to the maximum.

For example a 1 TB disk might have an access time of 12 ms at 200 IOPS (at a limited queue
depth) with an average throughput of 100 MB/s. When it is partitioned to 100 GB (and the rest left
unallocated) you might end up with an access time of 6 ms at 300 IOPS (with a bigger queue
depth) with an average throughput of 200 MB/s..
 PC BIOS PARTITION:
 This section describes the master boot record (MBR) partitioning scheme, as used in MS-DOS,
Microsoft Windows and Linux on PC compatible computer systems; for examples of partitioning
schemes used in other operating systems, see GUID Partition Table, Slice (disk) or BSD disklabel.
 The total data storage space of a PC hard disk is divided into at most four, and at least one,
primary partitions. One of these can also be an extended partition. All these primary partitions are
described by 16-byte entries that constitute the Partition Table which is located in the master boot
record.
 The "type" of a partition is identified by a 1-byte code found in its partition table entry. Some of
these codes (such as 0x05 and 0x0F) may be used to indicate the presence of an extended partition, but
most are used by operating systems that examine partition tables to decide if a partition contains a file
system they can mount/access for reading or writing data.
 Once a specific partition's type has been identified, additional information about its purpose and
probable contents may be found (see: List of partition identifiers for PCs as one such resource). For
example, some type codes are used to hide a partition's contents from various operating systems.
However, if an OS or some partitioning tool has been programmed to also examine the boot sectors of
any partition, then its file system may no longer remain hidden. (Note: There are no officially assigned
partition types; thus, more than one kind of file system may lay claim to the same code value.)
Additionally, partition types and boot indicators can be easily modified using applications such as
MBRWizard if required.

Primary
 A primary partition contains one file system. In MS-DOS and earlier versions of Microsoft
Windows systems, the first partition (C:) must be a primary partition. Some operating systems are not
limited in this way; however, this can depend on other factors, such as a PC's BIOS (see Boot
sequence on standard PC for more information).
 The "partition type" code for a primary partition can either correspond to a file system contained
within (e.g. 0x07 means either an NTFS or an OS/2 HPFS file system) or indicate the partition has a
special use (e.g. code 0x82 usually indicates a Linux swap partition). The FAT16 and FAT32 file
systems have made use of quite a number of partition type codes over time due to the limits of various
DOS and Windows OS versions. Though a Linux operating system may recognize a number of
different file systems (ext2, ext3, reiserfs, etc.), they have all consistently used the same partition type
code: 0x83 (Linux native).

Extended
 An extended partition is a primary partition which contains secondary partition(s). A hard disk
may contain only one extended partition; which can then be sub-divided into logical drives, each of
which is (under DOS and Windows) assigned additional drive letters.
 For example, under either DOS or Windows, a hard disk with one primary partition and one
extended partition, the latter containing two logical drives, would typically be assigned the three drive
letters: C: for the primary partition, and D: and E: for the two logical drives.
 See extended boot record for information on the structure of an extended partition.
 PARTITIONING SCHEME:
 Windows, DOS, and OS/2
 With Microsoft Windows, DOS, and OS/2, the standard partitioning scheme is to create a single
active primary partition or drive. The designation for this drive is the C: drive, where the operating
system (OS), utilities, applications, user data, and page/swap file all reside. The single-partitioning
setup is standard for most consumer computers, and most consumers do not employ partitioning.[citation
needed]
(Though they may backup data on other disk drives and recordable media — solutions which, if
implemented diligently and with good organization, can mitigate most problems). On single disk
systems, experienced computer users typically prefer to create multiple partitions so that the
(typically) trouble-prone operating system can be separated from personal, original, or otherwise
valuable user files. User data is thus stored on other partitions (D:, E:, F:, etc.), in case an OS issue
prevents the OS from booting.
 Proponents of multiple partitions assert the benefits of keeping system files and data files separated
because, in a system crash on a single-partition computer, the primary concern (for users, consumers,
and technicians) is recovering original or irreplaceable user files. On multi-partition single-disk setup
where system and data are kept separate, OS crashes can be easily handled by the end user by simply
repairing or even reinstalling the OS. In serious cases where the OS/system partition is entirely
compromised, being able to erase the entire system partition, while retaining and not worrying about
valuable data on another drive, is extremely time-saving and makes OS issues nearly trivial. This
means in case of a system crash, virus infection, malware, spyware, program vs. system conflicts, lost
system files, or other serious problem can be easily corrected on the system disk, and the data drive(s)
can be tested later (after OS recovery) for infections.
 When used in conjunction with third-party partition management programs, the use of multiple
partitions allows computer users to quickly recover from viruses, rootkits, and trojan horses or an
otherwise damaged, corrupt or compromised operating system. Examples of partition management
programs are Acronis Disk Director and Norton Ghost. In some instances specialized recovery
programs are supplied with computers manufactured by most major manufacturers,
 Windows 2000, Windows XP, and Windows Vista include an inbuilt 'Disk Management' program
which allows for the creation, deletion and movement of partitions. Vista's Disk Manager is not
compatible with Windows 2000 or XP.

Unix, Linux and Mac OS X


 In Unix-based and Unix-like operating systems such as Linux and Mac OS X, it is possible to
create multiple partitions (also known in the Solaris operating system and the BSD based operating
systems as "slices") on a disk device. Each partition can be used for a file system or as a swap
partition.
 Multiple partitions allow directories such as /tmp, /usr, /var, or home directory space to be
allocated their own file system. Such a scheme has a number of potential advantages: if one file
system gets corrupted, the rest of the data (the other file systems) stay intact, minimizing data loss;
specific file systems can be mounted read-only, or with the execution of setuid files disabled (thus
enhancing security); performance may be enhanced due to less disk head travel. However, the
disadvantage of subdividing the drive into fixed-size partitions is that a file system in one partition
may become full, even though other file systems still have plenty of usable space.
 A good partitioning scheme requires the user to predict how much space each partition will need,
which may be a difficult task; especially for new users. Logical Volume Management, often used in
servers, increases flexibility by allowing data in volumes to expand into separate physical disks (which
can be added when needed); another option is to resize existing partitions when necessary.
 Typical Linux desktop systems often use only two partitions: a single "/" (root directory)
containing the entire filesystem plus a much smaller swap partition. By default, Mac OS X systems
use a single root directory containing the entire filesystem (including a swap file) as a point of
simplicity (but other setup options do exist).

Multi-boot and mixed-boot systems


 Main article: Multi-boot



 A GRUB startup menu showing Ubuntu Linux (with three different boot modes) and Windows
Vista options
 Multi-boot systems are computers where the user can boot into more than one distinct operating
system (OS). In such systems, the user is given a choice, at startup, of which OS they wish to use, as
only one can run at a time on a single-processor computer. (However, computers with virtual operating
systems installed or with multiple separated processors, may allow either running another OS within a
window, such as Linux on Windows, or switching between OSes.).
 Multi-boot systems are typically mixed-boot systems, with different OSes installed. A typical case
is a machine with Windows (XP, Vista, Windows 7) as the default OS and any Linux distribution as a
second OS. Another example is a multi-boot with Windows and Mac OS X—a configuration made
possible by Apple's switch to the x86 processor architecture, and by Apple's own multi-boot utility
(Boot Camp).
 Multi-boot systems generally have two fundamental issues which need to be understood and
handled before any installation. In short, the disk must be partitioned with consideration for the proper
installation and setup of each operating system, and the sharing of files across non-mutually intelligent
systems.
 The first issue can be complicated by several things, the major complications being the OS's ability
to recognize the partition order, and partition (and even file system) issues arising from an
incompatibility between partition setups. In general, machines with Windows installed should use
Windows-based partition tools and not Linux ones. (Linux tools work, but Windows can be picky
when dealing with a boot partition that was created under Linux or Mac).
 The second issue deals with the boot manager and its installation, and the required configurations
and settings a boot manager must have in order to boot each OS. Most Linux distributions provide a
simple to install boot manager such as GNU GRUB or LILO, but these usually require overwriting the
MBR as set up by Windows. Linux boot managers always recognize NTFS partitions and Windows
OSes, but Windows variants generally do not do a good job of recognizing either Linux or Mac, and
Windows notoriously does not give a choice to not overwrite the MBR with a Windows bootloader.
 END OF MS-DOS:
Today, MS-DOS is rarely used for desktop computing. Since the release of Windows 95, it was
integrated as a full product used for bootstrapping and troubleshooting, and no longer released as a
standalone product. It was still available, but became increasingly irrelevant as development shifted to
the Windows API.

Windows XP contains a copy of the core MS-DOS 8 files from Windows Millennium, accessible only
by formatting a floppy as an "MS-DOS startup disk". These core files are a stripped down bootstrap
only, which does not include CD-ROM support. With Windows Vista the files on the startup disk are
dated 18 April 2005 but are otherwise unchanged, including the string "MS-DOS Version 8 (C)
Copyright 1981-1999 Microsoft Corp" inside COMMAND.COM.

However the only versions of DOS currently recognized as stand-alone OSs, and supported as such by
the Microsoft Corporation are DOS 6.0 and 6.22, both of which remain available for download via
their MSDN, volume license, and OEM license partner websites, for customers with valid login
credentials.

Today, DOS is still used in embedded x86 systems due to its simple architecture, and minimal
memory and processor requirements. The command line interpreter of NT-based versions of
Windows, cmd.exe, maintains most of the same commands and some compatibility with DOS batch
files.

You might also like