James Madison University - Department of Computer Science



MS-DOS/PC-DOS

CS550: Operating Systems

Fall 2003

Temitope Akanni

TABLE OF CONTENTS

|INTRODUCTION/ HISTORY |………………………………………….3 |

|DOS ENVIRONMENT |………………………………………….4 |

|PROCESSOR INSTRUCTION REGISTERS |………………………………………….5 |

|A. REAL AND VIRTUAL MEMORY |………………………………………….5 |

|B. REAL AND PROTECTED MODES |………………………………………….6 |

|PROCESSOR STATES |………………………………………….6 |

|MEMORY MANAGEMENT |………………………………………….6 |

|DISK ORGANIZATION |………………………………………….8 |

|FILE MANAGEMENT |………………………………………….8 |

|SCHEDULING |………………………………………….9 |

|CONCLUSION |………………………………………….10 |

|APPENDIX A: BIBLIOGRAPHY |………………………………………….11 |

INTRODUCTION/ HISTORY

Written by Bill Gates and Paul Allen, released in 1981 in corporation with IBM, the Disk Operating System (DOS) provided users a gateway through which they could interact with their computers. Since DOS 1.0 there have been several releases each fixing bugs introduced by previous version and providing greater accessibility and controls through commands. IBM approached Microsoft in late 1980, to design an operating system to be used in IBM’s PC computer. After some consideration Microsoft was able to convinced IBM to consider a 16-bit computer, which was at that time made by Gary Kildall of Digital Research.

Control Program/Microcomputer (CP/M) was a program developed to run an 8” floppy disk for an 8-bit processor. Many of the characteristics of the CP/M were taken from DEC PDP-10 VMS operating system. Gordon Eubanks created a BASIC interpreter for the system. By 1978, CP/M had grown into an operating system running many of the application developed during that time including Microsoft’s BASIC and FORTRAN and Ashton Tate’s dBase. By the mid 1980s Intel had developed a system board that managed 16-bits of data rather than the 8-bit found in Apple, called 8086. Tim Patterson, a system’s board maker wanted to take advantage of the processor but no software had been written for it, he decided to write his own. QDOS (Quick and Dirty Operating System) was the name given to the OS that he wrote. It was later changed to 86-DOS and then to DOS. Many of the features found in CP/M such as the file management techniques were retained in the 86-DOS. Kildall added a File Allocation Table (FAT) a device found in Altair BASIC.

On August 12, 1981, IBM introduced a version of DOS called PC-DOS 1.0 to the world with 86-DOS as its operating system. The OS provided support for BASIC, FORTRAN, Pascal, COBOL, and the 8086 Assembly language. Included in DOS 1.0 was a word processing software called EasyWriter, “a mainframe text game adapted for smaller computers” (Somerson, 5) Adventure and Dos’s version of VisiCalc, a useful and powerful written program found in the second generation Apple II computers for doing financial analysis and planning. (Somerson, 4) VisiCalc did not do as well as in DOS as it did in the Apple II computer. Subsequent versions of DOS followed. The following table contains the dates of releases of DOS.

|Date |Version Release |

|August 12, 1981 |DOS 1.0 IBM’s release used 86-DOS |

| |Internal structured constrained by CP/M (Control Program for Microcomputers) |

|May 1982 |DOS 1.1 |

| |IBM’s release of DOS to handled new double-sided drives |

|August 1982 |DOS 1.25 |

| |Microsoft’s generic version of DOS 1.1 |

|March 1983 |DOS 2.0 for IBM’s PC-XT |

| |Support 10MB hard drives, 3-internal expansion slots, hierarchical tree structure found in UNIX |

|March 1984 |DOS 2.1 IBM’s release |

| |Handled hardware errors called PCjr |

|1984 |DOS 2.11 Microsoft’s release |

| |Added international time, date, currency, and keyboard support. |

|1984 |DOS 3.0 for IBM’s 16-bit PC-AT system |

| |Support 1.2MB diskettes and hard drives over 10MB. Designed by Microsoft to support IBM network |

| |hardware |

|November 1984 |DOS 3.1 |

| |Provided better aliasing – made DOS treat directories as drives. Handled IBM’s network hardware |

| |problems from 3.0 |

|January 1986 |DOS 3.2 |

| |Introduced and provided support of 3-1/2 floppies and 720K disk |

|April 1987 |DOS 3.3 |

| |FDISK can be used to create 32MB or smaller logical drives from extended partitions |

|1987 |DOS 3.30 Compaq’s release |

| |Support 1.44MB diskettes and multiple 32MB disk partitions |

|November 1987 |DOS 3.31 Compaq’s release |

| |Support drives greater than 32MB |

|July 1988 |DOS 4.0 IBM’s release |

| |Added a DOS Shell interface and support for disk partitions greater than 32MB. Provided support for |

| |mouse and graphical interfaces. |

|November 1988 |DOS 4.01 |

| |Fixed bugs introduced in 4.0 |

|June 1991 |MS-DOS 5.0 Microsoft’s release |

| |Allowed DOS to reside in area above 640K high-memory. Provided support for loading device drivers and |

| |TSR programs. Provided an improved DOS Shell |

|March 1993 |MS-DOS 6.0 |

| |Introduced DoubleSpace disk compression |

|November 1993 |MS-DOS 6.2 |

| |Said to be a “Step Up” from 6.0 |

|February 1994 |MS-DOS 6.21 |

| |Removed double spaced disk compression under court order |

|June 1994 |MS-DOS 6.22 |

| |Introduced “DriveSpace” disk compression |

|April 1995 |DOS 7.0 IBM’s release |

|August 1995 |DOS 7.0 Microsoft’s release |

Table 1: List of stable versions of DOS and release dates

DOS ENVIRONMENT

DOS was designed to work on Intel based computers starting with the Intel 8086 processor and was compatible with Kildall’s CP/M. DOS also support Intel 82486, 80386, 80286, and 8088. It can be run on real time systems that do not require a fast response time (). DOS was very successful as an operating system; building the foundation for other OSs by IBM and Microsoft, who by the late 1980’s wanted to faze DOS out in order to incorporate their new OS into mainstream America and other parts of the world. Characteristics of DOS that were accomplished well by the designers include an easy way to access files, the addressing size of the file allocation table have been increase such as to allow greater drive capacity, and its did not become incomprehensibly too large. DOS was a great commercial success with millions of copies licensed and sold in the U.S. as well as abroad. Version 3.0 was only able to handle well documented networks and those they did not violate protocols by manipulating hardware directly (Somerson, 13); version 2.0 produced an error during in the graphical user interface mode that decreased the speed of the computer drastically. Some users whom have not upgraded their DOS systems are still limited by the 32MB hard drive limitation.

|DOS Advantages |

|Text based DOS programs are fast and efficient |

|DOS based programs can be run on compatible IBM PCs, Windows 95/98/ME/XP |

|DOS takes up to less than 4MB of memory |

|DOS is very reliable |

Table 2: Listing of DOS advantages

PROCESSOR INSTRUCTION REGISTERS

Earlier versions of DOS promoted real and unreal modes of operation. DOS 5.0 contained real and protected modes of operations. Older versions of DOS allowed the user to subdivide a large hard disk into logical drives of size no greater than 32Mb.

DOS 4.0 allowed the user to have more than 32MB hard disk and increased the 640Kb RAM limit. Version 4.0 enhanced disk management by enabling the user to treat any size disk as a single drive. Earlier versions of DOS ignored random access memory (RAM) reference above the 640K high-memory; with Version 4.0 other applications can be installed on high-memory granted they must support LIM (Lotus/Intel/Microsoft) Expanded Memory Specification. (Somerson, 23) IBM Version 4.0 of DOS the device driver, XMA2EMS.SYS, was made to only work with IBM EMS memory, but Microsoft’s HIMEM.SYS works on its own and IBM system. Each new version of DOS since 1.0 has installed itself above the 640K high-memory area. DOS 5.0 supports disk partitions up to 2GB. DOS 5.0 introduced users the various levels of memory management including real memory, virtual memory, and tow modes of operations: real mode and protected mode.

A. REAL AND VIRTUAL MEMORY

Earlier versions of DOS promoted real and unreal modes of operation. DOS 5.0 contained real and protected modes of operations. Real memory is the area of “memory that lies within the 1MB addressing limit of 8088 (IBM PC & XT) and 8086 (PS/2 models 25 and 30) microprocessors.” (Somerson, 33) Memory is accessed by using the segment:offset addressing, segment gives the paragraph’s address (16 bytes of memory boundary) and offset tells the number of bytes above the address. Real memory is termed because the values of segment:offset give the actual physical/logical memory location

Virtual memory refers to the data that resides on a large storage medium; the data is accessed by mapping it into real memory.

B. REAL AND PROTECTED MODES

When data access occurs in the 1MB real memory area, the system is said to be operating in real mode; IBM’s 8088 and 8086 can only operate in real mode. Protected mode, used in the 80286 microprocessor and subsequent OS was used to allow access of memory area beyond the 1MB real memory limit. The segment:offset was replaced with the selector:offset scheme. The Selector “points to a 64-bit segment descriptor stored in a separate local and global descriptor table, (Somerson, 34), the segment descriptor contains the starting address of the segment, and the offset gave the number of bytes above the segment. The protected mode ensured that memory allocated to a program is not overwritten by another.

PROCESSOR STATES

Because of its single-tasking nature, DOS is not burden with dealing with neither deadlock nor does it have to prevent, avoid, or detect deadlocks. DOS can be considered as a preemptive single tasking operating system. The process that currently has the CPU completes itself before another can be given CPU time. Based on this information the following diagram was made. A newly created process can without running or waiting for an I/O event to occur be terminated. A process can move from the running state to waiting for user input through the keyboard. A running process can be prematurely terminated and a waiting process can also be terminated.

[pic]

Figure 1: DOS process states

MEMORY MANAGEMENT

Figure 2 diagrams the memory organization of the hard disk in DOS.

[pic]

Figure 2: Memory management in DOS (Frick, 1997))

• Conventional Memory: User Memory from 0– 640Kb

• Expanded Memory: below 1024Kb of memory

• Extended Memory: 1024Kb or 1MB and above

• High Memory Area (HMA): The first 64Kb block of memory in EMA

• Upper Memory (UMA): Memory located between 640K and 1024K

[pic]

Figure 3: MS-DOS execution. a) At system startup. b) Running a program (Silberschatz, etc; 68)

DOS was created to only run one program at a time, the current executing process is given CPU time and no new processes can be created until the first is terminated.

“It loads the program into memory, writing over most of itself to give the program as much memory as possible,” (Figure 3b). It then sets the instruction pointer to the first instruction of the program. The program then runs and either an error causes a trap, or the program executes a system call to terminate. In either case, the error code is saved in the system memory for later use. Following this action, the small portion of the command interpreter that was not overwritten resumes execution. Its first task is to reload the rest of the command interpreter from disk. Once this task is accomplished, the command interpreter makes the previous error code available to the user or to the next program.” (Silberschatz, 68)

DOS programs were not written to take up a substantial amount of RAM but if they were larger than RAM, the program was logically subdivided into smaller pieces called overlays. The overlay approach emphasized programs that were modular in form, whereby one method invokes another. Overlay’s work as thus: “A main part runs all the time. Overlay instructions cause the O/S to replace part of a program with another. The permanently running part calls procedures in the overlays, which return back to it after completion.” (Newmarch, 1995).

DISK ORGANIZATION

Early IBM PCs could only hold about 64K size of files but the space was insufficient to users that needed to store larger files. IBM’s XT first hard disk could hold 10MB and the first hard disk for the AT could hold 20MB. DOS “does not store data in continuous uninterrupted blocks of” (Somerson, 79) memory locations; it divides the data into clusters, which are made up of small sectors of 512 bytes each. Early floppy disks could only hold 160K and 180K of memory on a single disk side. DOS was given a 16-bit address, which meant that the largest addressable unit available was for 64K worth of data. This posed a problem because the maximum size that DOS would recognize on a hard disk is 32MB. Solutions to the 32MB addressing included FDISK which came with DOS 3.3 and allowed the user to subdivide drives greater than 32MB into logical partitions of 32MB. Compaq’s release of DOS, 3.31, extended the number of addressable units in the FAT file to 32-bits thus allowing about .5G or RAM in a partition. Since then IBM has enhanced DOS to allow users to create partitions greater than 32MB.

When data is stored, DOS divides the data into portions and searches for space on the disk to hold the data.

“DOS relies on a chart called the File Allocation Table (FAT) to remember which clusters on the disk are temporarily unused, and to keep track of where all the scattered chunks of your files are located.” (Somerson, 79)

FILE MANAGEMENT

Early versions of DOS had a flat file structure in which there were no directories rather there were partitions with no file management techniques implemented. Later versions implemented a version of the hierarchical or tree structure found in UNIX and UNIX like operating system. Files were treated in byte sizes and an index method was used for storing them. Table 2 displays an example of the indexing file system found in DOS. File A starts in block 6 and uses blocks 8, 4, and 2, an entry the file allocation table shows that each block entry points to the next block of data. The first two blocks of the FAT file contains the size of the disk being used.

[pic]

Figure 4: Recreated from Tanenbaum page 259

Each disk on the system contains its own file allocation table, the method that was used for floppy disk drive with 320K size using a 1K block of size” (Tanenbaum, 259).

“The root directory is at a fixed location on the disk, and is contiguous of fixed size. The root directory is at a fixed location on the disk, and is contiguous of fixed size. (This is why you cannot have an unlimited number of files in the root directory in MSDOS.) Entries in this for the start of each file in the root directory point to the FAT (File Allocation Table) which is the index table for the rest of the disk.” (Newmarch, 1995)

SCHEDULING

DOS is a single-threaded, single-task operating system. Only one process is allowed access to the processor at a time eventhough more than one process can be in memory at any given time. DOS is not a true multi-tasking environment, DOS 2.0 and subsequent DOS versions allowed the user to send a print job to the printer without waiting for the I/O operation to release its resources to the CPU. If a user wanted a multitasking computer, they would have to switch to OS/2.

One interesting aspect of DOS is that it allows the user to specify more than one environment within the command interpreter. Changes made to the descendant’s environment are not reflected in the ancestor. The user merely exits the current environment once they have completed working in the new environment. In essence if the user chooses to allow someone else to use their computer they simply call the command interpreter to open another environment with the specified amount of space.

CONCLUSION

IBM and Microsoft will continue to support DOS as long the 70 million copies sold in the late 1980’s are still in use. With the DOS command prompt in every OS developed by Microsoft, it is unlikely that it will fade into the distant memory for some years to come if at all. PC DOS 2000, the IBM year 2000 compliant OS provides support for hard disks up to 7.8GB. IBM has not yet decided whether or not they will be releasing another version of DOS to the general public, they are conducting market research to determine their next move. ()

DOS allows the user to issue commands to the command interpreter to execute programs written in Java, C/C++, ADA, FORTRAN, etc. The learning curve for DOS is very minimal compared to other operating systems like UNIX. DOS is compatible and able to run on Intel x86 processors. There are still people in the world that are fond of the uncomplicated interface, the simplicity, and elegance of DOS.

APPENDIX A: BIBLIOGRAPHY

Erdelsky, Philip J. (1993). “A Description of the DOS File System.” URL: < >

Frick, David R. (1997). “MS-DOS Memory Basics.” URL: .

(2000). “PC DOS – PC DOS 2000 Frequently Asked Questions.” URL >.

Newmarch, Jan (1995). “Operating Systems.” URL

Silberschatz, Abraham, Galvin, Peter B., Gagne, Greg (2003). Operating System Concepts. New York, NY: John Wiley & Sons, Inc. ISBN 0-471-25060-0.

Somerson, Paul (1991). DOS Power Tools. New York, NY: Bantam Books. ISBN: 0-553-35464-7.

Tanenbaum, Andrew S. (1987). Operating Systems Design and Implementation Englewood Cliffs, NJ: Prentice-Hall. ISBN 0-13-637406-9.

Weopedia (2003). “DOS.” URL: .

White, Stephen (2002). “A Brief History of Computing- Operating Systems.” URL:

Williams, David (1991). “Programmer’s Technical Reference for MSDOS and IBM PC.” URL: < >.

Wolverton, Van (2002). Running MS-DOS 20th Anniversary Edition. Washington, D.C: Microsoft Press. ISBN: 0-7356-1812-7.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download