7

Click here to load reader

MS-DOS From Scratch

Embed Size (px)

Citation preview

Page 1: MS-DOS From Scratch

MS-DOS

Company / developer Microsoft Corporation

Programmed in Assembly language[1]

OS family DOS

Working state Discontinued/Historic

Source model Closed source

Initial release 1981

Discontinued 8.0 / September 14, 2000; 12 years ago

Available language(s) Multilanguage

Available programming

languages(s)

Assembly Language, C, Pascal, QBasic, Batch,

etc.

Supported platforms x86

Kernel type Monolithic kernel

Default user interface Command-line interface, Text user interface

License Proprietary

Page 2: MS-DOS From Scratch

INTRODUCTION

MS-DOS ( /ˌɛmɛsˈdɒs/ EM-es-DOSS; short for Microsoft Disk Operating

System) is an operating system for x86-based personal computers. It was the most

commonly used member of the DOS family of operating systems, and was the

main operating system for IBM PC compatible personal computers during the

1980s to the mid 1990s, until it was gradually superseded by operating systems

offering a graphical user interface (GUI), in particular by various generations of

the Microsoft Windows operating system.

MS-DOS grew from a 1981 request by IBM for an operating system for its IBM

PC range of personal computers. Microsoft quickly bought the rights to QDOS

(Quick and Dirty Operating System), also known as 86-DOS,[2]

from Seattle

Computer Products, and began work on modifying it to meet IBM's specification.

The first edition, MS-DOS 1.0, was launched in 1982.[3]

The version shipped with

IBM's PCs was called PC DOS. Although MS-DOS and PC DOS were initially

developed in parallel by Microsoft and IBM, the two products eventually went

their separate ways.

During its life, several competing products were released for the x86 platform,[4]

and MS-DOS itself would go through eight versions, until development ceased in

2000. Ultimately it was the key product in Microsoft's growth from a programming

languages company to a diverse software development firm, providing the

company with essential revenue and marketing resources. It was also the

underlying basic operating system on which early versions of Windows ran as a

GUI.

Page 3: MS-DOS From Scratch

DIFFERENT VERSIONS

The following versions of MS-DOS were released to the public:[6][7]

MS-DOS 1.x

o Version 1.12 (OEM) - Compaq release of PC DOS 1.10

o Version 1.19 (OEM)[8]

- Zenith OEM

o Version 1.25 (OEM) - Microsoft repackaging of PC DOS 1.10

MS-DOS 2.x - Support for 10 MB hard disk drives and tree-structure filing

system

o Version 2.0 (OEM)

o Version 2.1 (OEM)

o Version 2.11 (OEM)

MS-DOS 3.x

o Version 3.0 (OEM) - Support for FAT16

o Version 3.1 (OEM) - Support for Microsoft Networks

o Version 3.2 (OEM)

o Version 3.21 (OEM)

o Version 3.25 (OEM)

o Version 3.3 (OEM)

o Version 3.3a (OEM)

o Version 3.31 (OEM) - Compaq MS-DOS 3.31 supports FAT16B and

larger drives.

MS-DOS 4.x - includes a graphical/mouse interface.

o Version 4.00 (OEM)

o Version 4.01 (OEM) - IBM patched Version 4.00 before Microsoft

released it. First version to introduce volume serial number when

formatting hard disks and floppy disks (Disk duplication also).[9]

o Version 4.01a (OEM)

Page 4: MS-DOS From Scratch

MS-DOS 5.x

o Version 5.0 (Retail) - includes a full-screen editor. A number of bugs

required reissue.

o Version 5.0a (Retail) - With this release, IBM and Microsoft versions

diverge.

o Version 5.0.500 (WinNT) - All Windows NT 32-bit versions ship

with files from DOS 5.0

MS-DOS 6.x

o Version 6.0 (Retail) - Online help through QBASIC. Disk

compression and antivirus included.

o Version 6.1 (none) - IBM and Microsoft alternate DOS 6 versions.

IBM released 6.3 also.

o Version 6.2 (Retail) - Scandisk as replacement for CHKDSK. Fix

serious bugs in DBLSPACE.

o Version 6.21 (Retail) - Stacker-infringing DBLSPACE removed.

o Version 6.22 (Retail) - New DRVSPACE compression.

MS-DOS 7.x

o Version 7.0 (Win95, 95A) - Support for VFAT long file names. New

editor. JO.SYS is an alternative filename of the IO.SYS kernel file

and used as such for "special purposes". JO.SYS allows booting from

CD-ROM to hard disk.

o Version 7.1 (Win95B - Win98SE) - Support for FAT32 file system.

Last general purpose DOS to load Windows.

MS-DOS 8.0

o Version 8.0 (WinME) - Integrated drivers for faster Windows loading.

Four different kernels (IO.SYS) observed.

o Version 8.0 (WinXP) - DOS boot disks created by XP and later

contain files from WinME. The internal command prompt still reports

version 5.0

Page 5: MS-DOS From Scratch

DOS Memory Management

Relatively simple job because it’s managing single job for single user. Uses a first-

fit memory allocation scheme since it is most efficient strategy in a single-user

environment.

DOS Main Memory Allocation

• First versions had simple contiguous memory allocation scheme that gave all

of the available memory to resident application program.

– Applications couldn’t dynamically allocate memory blocks.

– MS-DOS Version 2.0 supported dynamic allocation, modification, &

release of main memory blocks by applications.

• Amount of memory each application owns depends on type of file from

which program is loaded & size of TPA.

– Programs.COM -- given all of TPA, whether or not they need it.

– Programs.EXE -- given amount of memory they need.

Memory Block Allocation

• Allocates memory by using first-fit algorithm & linked list of memory blocks.

• With Version 3.3, MS-DOS started using best-fit or last-fit strategy.

• Size of a block can vary from 16 bytes (paragraph) to maximum available

memory.

Free/Busy Block List

1. Whenever request for memory comes in, DOS looks through free/busy block

list to find free block that fits.

– If list becomes disconnected, system stops & must be rebooted.

2. Well-designed application program releases memory block it no longer

needed.

Page 6: MS-DOS From Scratch

Process Management

• MS-DOS doesn’t support multitasking.

– Programs can’t break out of middle of DOS internal routine & restart

routine from somewhere else.

– There's no interleaving & no need for sophisticated algorithms or

policies to determine which job will run next or for how long.

Interrupt Handlers Are Responsible for Synchronizing Processes

• PC has 256 interrupts & interrupt handlers, & they are accessed via interrupt

vector table.

• Three types of interrupts:

1. Internal hardware interrupts -- generated by certain events occurring during

program’s execution (e.g., division by zero).

2. External hardware interrupts -- caused by peripheral device controllers or

by coprocessors & assigned by manufacturers.

3. Software interrupts -- generated by system & application programs to

access DOS & BIOS functions, which, in turn, access system resources.

Page 7: MS-DOS From Scratch

Device Management

• Ability to reorder requests to optimize seek & search time is not a feature of

DOS because it’s designed for a single-user environment.

– All requests are handled on a first-come first-served basis.

– Since version 3.0, BIOS can support spooling so users can schedule

several files to be printed one after the other.

• MS-DOS written for simple systems using keyboard, monitor, printer,

mouse, 1-2 serial ports, & maybe second printer.

– Devices do not require special management from OS.

– Device drivers are the only items needed by Device Manager to make

system work.

– A device driver is a software module that controls an I/O device and

handles its interrupts.

File Management

• Earliest versions of MS-DOS kept every file in a single directory.

• Version 2.0 implemented hierarchical directory structure.

• When disk is formatted, its tracks are divided into sectors of 512 bytes.

• 2-8 sectors are grouped into clusters & that's how File Manager allocates

space to files.

FORMAT Creates Three Special Areas on Disk

1. Boot record -- first sector of every logical disk & contains disk boot program

& table of disk's characteristics.

2. Root directory -- Lists system’s primary subdirectories & files (name,

extension, size, date & time of modification, starting cluster #, file attribute

codes).

3. FAT (File Allocation Table) -- contains status info about disk’s sectors:

which are allocated, which are free, and which can’t be allocated because of

errors.