SlideShare a Scribd company logo
1 of 52
MS-DOS OPERATING SYSTEM
Prepared by: Mr. Emmanuel R. Mercado
Objectives
Understanding Operating Systems, Fourth Edition
2
You should be able to describe:
 The historical significance of MS-DOS
 How MS-DOS provided a foundation for early
Microsoft Windows releases
 The basics of command-driven systems and
how to construct simple batch files
 How one processor can be shared among
multiple processes
 The limitations of MS-DOS for many of today’s
computer users
MS-DOS Operating System
Understanding Operating Systems, Fourth Edition
3
 Developed to run single-user, stand-alone
desktop computers
 Manages jobs sequentially from a single user
 Advantages:
 Fundamental operation
 Straightforward user commands
 Disadvantages:
 Lack of flexibility
 Limited ability to meet the needs of programmers
and experienced users
History
Understanding Operating Systems, Fourth Edition
4
 MS-DOS was successor of CP/M operating
system that ran first PC
 Microsoft discovered an innovative operating
system, called 86-DOS, designed by Tim
Patterson of Seattle Computer Products
 Microsoft bought it, renamed it MS-DOS, and
made it available to IBM
 IBM chose MS-DOS in 1981, called it PC-
DOS, and proclaimed it the standard for their
line of PCs
History (continued)
Understanding Operating Systems, Fourth Edition
5
 MS-DOS became standard operating system
for most 16-bit personal computers
 Each version of MS-DOS is a standard version
 Later versions are compatible with earlier
versions
 Early versions of Windows (versions 1.0
through 3.1) were merely GUIs that ran on top
of the MS-DOS operating system
 Although MS-DOS is no longer widely used,
many Windows OSs offer a DOS emulator
History (continued)
Understanding Operating Systems, Fourth Edition
6
Table 13.1: The evolution of
MS-DOS
Design Goals
Understanding Operating Systems, Fourth Edition
7
 Designed to accommodate single novice user
in single-process environment
 Standard I/O support includes keyboard,
monitor, printer, and secondary storage unit
 User commands are based on English words
or phrases, interpreted by command processor
 Layering approach is fundamental to design of
the whole MS-DOS system
Design Goals (continued)
Understanding Operating Systems, Fourth Edition
8
Figure 13.2: The three layers of MS-DOS
Design Goals (continued)
Understanding Operating Systems, Fourth Edition
9
BIOS (Basic Input/Output System):
 Interfaces directly with various I/O devices
 Contains device drivers that control flow of
data to and from each device except disk
drives
 Receives status information of each I/O
operation and passes it on to processor
 Takes care of small differences among I/O
units
 Example: Allows user to purchase a printer from
any manufacturer without having to write a device
driver
Design Goals (continued)
Understanding Operating Systems, Fourth Edition
10
DOS kernel:
 Contains routines that interface with disk
drives
 Read into memory at initialization time from
MSDOS.SYS file residing in boot disk
 Accessed by application programs and
provides collection of hardware-independent
services, such as:
 Memory management and file and record
management
 Compensates for variations from
manufacturer to manufacturer
Design Goals (continued)
Understanding Operating Systems, Fourth Edition
11
DOS kernel: (continued)
 Makes disk file management transparent to
user
 Manages storage and retrieval of files
 Dynamically allocates and deallocates
secondary storage as it’s needed
Design Goals (continued)
Understanding Operating Systems, Fourth Edition
12
Command processor (the shell):
 Sends prompts to user
 Accepts commands that are typed in
 Executes commands, and issues appropriate
responses
 Resides in a file called COMMAND.COM,
which consists of two parts, stored in two
different sections of main memory
 Only part of OS that appears on the public
directory
 Weakness: It isn’t interpretive
Memory Management
Understanding Operating Systems, Fourth Edition
13
 Memory Manager manages single job for
single user
 To run second job, user must close or pause first
file before opening second
 Uses first-fit memory allocation scheme
 Main memory comes in two forms:
 ROM: Very small in size and contains a program,
a section of BIOS, with the the startup process
(bootstrapping)
 RAM: Part of the main memory where programs
are loaded and executed
Memory Management
(continued)
Understanding Operating Systems, Fourth Edition
14
Figure 13.3: One megabyte of RAM
main memory in MS-DOS. The
interrupt vectors are located in low-
addressable memory and
COMMAND.COM overlay is located in
high addressable memory.
Main Memory Allocation
Understanding Operating Systems, Fourth Edition
15
 MS-DOS Version 1.0 gave all available
memory to resident application program
 MS-DOS Version 2.0 began supporting
dynamic allocation, modification, and release
of main memory blocks by application
programs
 Amount of memory each application program
actually owns depends on:
 Type of file from which program is loaded
 Size of TPA
Main Memory Allocation
(continued)
Understanding Operating Systems, Fourth Edition
16
 Programs with COM extension are given all of
the TPA, whether or not they need it
 Programs with EXE extension are only given
amount of memory they need
 Except for COM files, there can be any
number of files in TPA at one time
 Two programs can’t be run at same time
 Shrinking and expanding of memory allocation
during execution can be done only from
programs written in either assembly language
or C
Memory Block Allocation
Understanding Operating Systems, Fourth Edition
17
 Memory Manager allocates memory by using
first-fit algorithm and linked list of memory
blocks
 Best-fit or last-fit strategy can be selected
with Version 3.3 and beyond
 When using last-fit, DOS allocates highest
addressable memory block big enough to satisfy
program’s request
 Size of a block can vary from as small as 16
bytes (called a “paragraph”) to as large as
maximum available memory
Memory Block Allocation
(continued)
Understanding Operating Systems, Fourth Edition
18
Table 13.2: First five bytes of a memory block define
block’s structural characteristics
Memory Block Allocation
(continued)
Understanding Operating Systems, Fourth Edition
19
Table 13.3: A sample memory block with first five bytes
containing 7700000004h
Memory Block Allocation
(continued)
Understanding Operating Systems, Fourth Edition
20
 When a memory request comes in:
 DOS looks through free/busy block list until it
finds a free block that fits request
 A well-designed application program releases
memory block it no longer needs
 If two free memory blocks are contiguous, they
are merged immediately into one block and
linked to the list
Memory Block Allocation
(continued)
Understanding Operating Systems, Fourth Edition
21
Figure 13.4: The linked list of memory blocks
Processor Management
Understanding Operating Systems, Fourth Edition
22
 MS-DOS doesn’t support reentrant code
(basis for multitasking)
 Programs can’t break out of middle of DOS
internal routine and then restart routine from
somewhere else
 Each job runs in complete segments and is
not interrupted midstream
 Interrupt handlers allows the saving of all
information about parent program that allows
its proper restart after child program has
finished
Interrupt Handlers
Understanding Operating Systems, Fourth Edition
23
 Responsible for synchronizing processes
 A personal computer has 256 interrupts and
interrupt handlers, accessed via interrupt
vector table
 Interrupts can be divided into three groups:
 Internal hardware interrupts
 External hardware interrupts
 Software interrupts
Interrupt Handlers (continued)
Understanding Operating Systems, Fourth Edition
24
 Internal hardware interrupts: Generated by
certain events occurring during program’s
execution, e.g., division by zero
 Assignment of such events to specific interrupt
numbers is electronically wired into processor
 Not modifiable by software instructions
Interrupt Handlers (continued)
Understanding Operating Systems, Fourth Edition
25
 External hardware interrupts: Caused by
peripheral device controllers or by
coprocessors
 Assignment of external devices to specific
interrupt levels is done by manufacturer
 Can’t be modified by software
 Implemented as physical electrical connections
 Software interrupts: Generated by system
and application programs
 Access DOS and BIOS functions
Interrupt Handlers (continued)
Understanding Operating Systems, Fourth Edition
26
 Software interrupts: (continued)
 Some are used to activate specialized application
programs that take over control of computer
 Example: Borland’s SideKick (type of TSR)
 Terminate and Stay Resident (TSR) interrupt
handler:
 Terminates process without releasing its memory
 Usually used by subroutine libraries
 When running, it sets up memory tables and prepares
for execution by connecting to DOS interrupt
Interrupt Handlers (continued)
Understanding Operating Systems, Fourth Edition
27
Interrupts synchronization:
 When CPU senses interrupt, it does two
things:
 Puts contents of PSW (program status word),
code segment register, and instruction pointer
register on a stack
 Disables interrupt system so that other interrupts
will be put off until current one has been resolved
 CPU uses 8-bit number to get address of
appropriate interrupt handler
 Interrupt handler reenables interrupt system to
allow higher-priority interrupts to occur
Device Management
Understanding Operating Systems, Fourth Edition
28
 Requests are handled first-come, first-served
 Does not support reordering requests, though in
Version 3.0, BIOS can support spooling
 MS-DOS Device Manager can work with
magnetic tape, floppy disks, or hard disks
 BIOS handles device driver software
 Device drivers are only items needed by
Device Manager to make system work
 Installable device drivers are salient feature of
MS-DOS design
File Management
Understanding Operating Systems, Fourth Edition
29
 MS-DOS supports following file organizations:
 Sequential
 Can have either variable or fixed-length records
 Direct
 Can only have fixed-length records
 Indexed sequential
 Can only have fixed-length records
Filename Conventions
Understanding Operating Systems, Fourth Edition
30
 A filename:
 Contains no spaces
 Consists of drive designation, directory, any
subdirectory, a primary name, and an optional
extension
 DOS isn’t case-sensitive
 Drive name is followed by a colon (:)
 Directories or subdirectories can be from one to
eight characters long and preceded by a
backslash
 Primary filename can be from one to eight
characters long
Filename Conventions
(continued)
Understanding Operating Systems, Fourth Edition
31
 Extension can be from one to three characters
long and can have special meaning
 File is assumed in current working directory if
no directories or subdirectories are included in
name
 File is assumed on current drive if no drive is
designated
 Relative name consists of primary name and
extension
 Absolute name consists of drive designation
and directory location
Managing Files
Understanding Operating Systems, Fourth Edition
32
 Earliest versions kept every file in single
directory
 Slow and cumbersome file retrieval
 Microsoft implemented hierarchical directory
structure in Version 2.0
 An inverted tree directory structure (root at top)
 Disk tracks are divided into sectors of 512
bytes each when formatted
 Corresponding to buffer size of 512 bytes
 Concept of cylinders, applies to hard disks
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
33
 Sectors (from two to eight) are grouped into
clusters
 When a file needs additional space, DOS
allocates more clusters to it
 FORMAT creates three special areas on
disk:
 Boot record
 Root directory
 FAT(file allocation table)
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
34
 Boot records: First sector of every logical
disk and contains:
 Disk boot program
 Table of disk’s characteristics
 Root directory: Where system begins its
interaction with user and contains:
 List of system’s primary subdirectories and files
 Any system-generated configuration files
 Any user-generated booting instructions
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
35
 Root Directory (continued):
 AUTOEXEC.BAT file: Batch file containing
series of commands defined by user
 Every time CPU is powered up, the commands in
this file are executed automatically by system
 The information kept in root directory include:
 Filename, File extension
 File size in bytes
 Date and time of the file’s last modification
 Starting cluster number for the file
 File attribute codes
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
36
 Root Directory (continued):
 Number of entries in root directory is fixed
 Version 2.0 and onward versions allow users to
avoid this limitation by creating subdirectories
 Each subdirectory can contain its own
subdirectories and/or files
 MS-DOS supports hidden files
 Files that are executable but not displayed in
response to DIR commands
 COMMAND.COM is the only system file that isn’t
hidden
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
37
Figure 13.5: An example of directory listing of a root
directory
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
38
Figure 13.6: Typical directory system
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
39
 File Allocation Table (FAT): Contains status
information about disk’s sectors
 Status includes, which sectors are allocated,
free, and can’t be allocated because of formatting
errors
 All sectors except first are linked in a chain
 Each FAT entry gives sector/cluster number of next
entry
 Last entry contains value FF to indicate end of
chain
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
40
Figure 13.7: A typical FAT
Managing Files (continued)
Understanding Operating Systems, Fourth Edition
41
 MS-DOS views data in disk file as continuous
string of bytes
 I/O operations request data by relative byte
(relative to beginning of file) rather than by
relative sector
 MS-DOS supports noncontiguous file storage
 Dynamically allocates disk space to file
 Compaction became feature of MS-DOS
Version 6.0 with inclusion of DEFRAG.EXE
 CHKDSK (filename) responds with number of
noncontiguous blocks in which file is stored
 Security feature is not built into MS-DOS
User Interface
Understanding Operating Systems, Fourth Edition
42
 MS-DOS uses command-driven interface
 Users type in commands at system prompt
 Default prompt is drive indicator and >
character
 Default prompt can be changed using
PROMPT command
 User commands include some or all of
following elements in this order:
 Command, source- file, destination-file, switches
User Interface (continued)
Understanding Operating Systems, Fourth Edition
43
 Switches are optional and give specific
details about how command is to be carried
out
 Begin with slash (i.e., /P /V /F)
 COMMAND.COM carries out commands
 Resident portion of code: Stored in low section
of memory
 Contains command interpreter and routines needed
to support an active program
 Transient code: Stored in highest addresses of
memory
 Can be overwritten by application programs if they
need to use its memory space
User Interface (continued)
Understanding Operating Systems, Fourth Edition
44
Table 13.4: MS-DOS user commands
User Interface (continued)
Understanding Operating Systems, Fourth Edition
45
Table 13.4 (continued): MS-DOS user commands
Batch Files
Understanding Operating Systems, Fourth Edition
46
 Customized batch files allows users to
quickly execute combinations of DOS
commands to:
 Configure systems
 Perform routine tasks
 Make it easier for nontechnical users to run
software
 For such programs to run automatically every
time system is restarted:
 File should be renamed AUTOEXEC.BAT and
loaded into system’s root directory
Redirection
Understanding Operating Systems, Fourth Edition
47
 MS-DOS can redirect output from one
standard input or output device to another
 Syntax: command > destination
 e.g., DIR > PRN sends directory listing to printer
instead of monitor screen
 Append Symbol (>>) redirect and append new
output to an existing file
 e.g., DIR >> B:DIRFILE
 Redirection works in opposite manner as well
 Symbol (<) changes source to a specific device
or file. e.g., INVENTRY < B:TEST.DAT
Filters
Understanding Operating Systems, Fourth Edition
48
 Filter commands: Accept input from default
device, manipulate data in some fashion, and
send results to default output device
 Example: SORT
 Can read data from file and sort it to another file
 Sorted in ascending order
 SORT /R sorts file in reverse order
 Files can be sorted by columns
 Example: MORE
 Causes output to be displayed on screen in groups of
24 lines, one screen at time
Pipes
Understanding Operating Systems, Fourth Edition
49
 Causes standard output from one command
to be used as standard input to another
command
 Symbol: Vertical bar (|)
 e.g., DIR | SORT alphabetically sort directory
and display sorted list on screen
 Pipes and other filters can be combined
 Possible to sort directory and display it one
screen at a time by using pipe command:
DIR | SORT | MORE
Additional Commands
Understanding Operating Systems, Fourth Edition
50
 FIND: Searches for specific string in given file
or files and displays all lines that contain the
string from those files
 e.g., FIND "AMNT-PAID" PAYROLL.COB
display all lines in the file PAYROLL.COB that
contain string AMNT-PAID
 PRINT: Allows user to set up series of files for
printing while freeing up COMMAND.COM
 PRINT /B allows changing of internal buffer size
 PRINT /Q specifies the number of files allowed in
print queue
Additional Commands
Understanding Operating Systems, Fourth Edition
51
 TREE: Displays directories and subdirectories
in hierarchical and indented list
 Options allow user to delete files while tree is
being generated
 TREE /F displays names of files in each directory
 Can also be used to delete file that’s duplicated
on several different directories
Summary
Understanding Operating Systems, Fourth Edition
52
 MS-DOS was written to serve users of several
generations of personal computers
 First standard operating system to be adopted
by manufacturers of personal computing
machines
 Advantages are its fundamental operation and
its straightforward user commands
 Weakness is that it was designed for single-
user/single-task systems
 Can’t support multitasking, networking, and
other sophisticated applications

More Related Content

What's hot

Random access memory
Random access memoryRandom access memory
Random access memoryAnikMazumdar2
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsDrishti Bhalla
 
Computer memory
Computer memoryComputer memory
Computer memorynikunjandy
 
Input output systems ppt - cs2411
Input output systems ppt - cs2411Input output systems ppt - cs2411
Input output systems ppt - cs2411Geerthik Varun
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
Chapitre ii mémoires
Chapitre ii mémoiresChapitre ii mémoires
Chapitre ii mémoiresSana Aroussi
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage StructureVimalanathan D
 
Power point presentation on memory of computer
Power point presentation on memory of computerPower point presentation on memory of computer
Power point presentation on memory of computerArpita Banerjee
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION sathish sak
 
what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)shire ali
 
Presentation on computer ram
Presentation on computer ramPresentation on computer ram
Presentation on computer ramSalim Hosen
 

What's hot (20)

Random access memory
Random access memoryRandom access memory
Random access memory
 
cours Lunix
cours Lunixcours Lunix
cours Lunix
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
 
bios booting process
bios booting processbios booting process
bios booting process
 
Types of RAM
Types of RAMTypes of RAM
Types of RAM
 
Computer memory
Computer memoryComputer memory
Computer memory
 
Intel 80286
Intel 80286Intel 80286
Intel 80286
 
Input output systems ppt - cs2411
Input output systems ppt - cs2411Input output systems ppt - cs2411
Input output systems ppt - cs2411
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Chapitre ii mémoires
Chapitre ii mémoiresChapitre ii mémoires
Chapitre ii mémoires
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Hard drive partitions
Hard drive partitionsHard drive partitions
Hard drive partitions
 
Disk management
Disk managementDisk management
Disk management
 
Power point presentation on memory of computer
Power point presentation on memory of computerPower point presentation on memory of computer
Power point presentation on memory of computer
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
 
what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)
 
operating system structure
operating system structureoperating system structure
operating system structure
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
Presentation on computer ram
Presentation on computer ramPresentation on computer ram
Presentation on computer ram
 
Case study windows
Case study windowsCase study windows
Case study windows
 

Viewers also liked

lecture:Operating Syste Ms
lecture:Operating Syste Mslecture:Operating Syste Ms
lecture:Operating Syste Msyeswanth reddy
 
Understanding operating systems 5th ed ch14
Understanding operating systems 5th ed ch14Understanding operating systems 5th ed ch14
Understanding operating systems 5th ed ch14BarrBoy
 
Types and generations of computers
Types and generations of computersTypes and generations of computers
Types and generations of computersHitesh Mendiratta
 
Interrupt handling
Interrupt handlingInterrupt handling
Interrupt handlingmaverick2203
 
Disk operating system
Disk operating systemDisk operating system
Disk operating systemamaliasutalim
 
A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875Duncan Epping
 
Computer hardware troubleshooting
Computer hardware troubleshootingComputer hardware troubleshooting
Computer hardware troubleshootingJerome Luison
 
Troubleshooting
TroubleshootingTroubleshooting
TroubleshootingJulia .
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filtersop205
 

Viewers also liked (20)

lecture:Operating Syste Ms
lecture:Operating Syste Mslecture:Operating Syste Ms
lecture:Operating Syste Ms
 
Understanding operating systems 5th ed ch14
Understanding operating systems 5th ed ch14Understanding operating systems 5th ed ch14
Understanding operating systems 5th ed ch14
 
Interrupt presentaion
Interrupt presentaionInterrupt presentaion
Interrupt presentaion
 
Types and generations of computers
Types and generations of computersTypes and generations of computers
Types and generations of computers
 
Interrupt handling
Interrupt handlingInterrupt handling
Interrupt handling
 
I/O System
I/O SystemI/O System
I/O System
 
Disk operating system
Disk operating systemDisk operating system
Disk operating system
 
Installing Operating System
Installing Operating System Installing Operating System
Installing Operating System
 
Interrupts
Interrupts Interrupts
Interrupts
 
Introduction to ms dos
Introduction to ms dosIntroduction to ms dos
Introduction to ms dos
 
Ms dos
Ms dosMs dos
Ms dos
 
SlideShare Networks
SlideShare NetworksSlideShare Networks
SlideShare Networks
 
A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875A day in the life of a VSAN I/O - STO7875
A day in the life of a VSAN I/O - STO7875
 
MS DOS
MS DOSMS DOS
MS DOS
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
File system
File systemFile system
File system
 
Interrupts
InterruptsInterrupts
Interrupts
 
Computer hardware troubleshooting
Computer hardware troubleshootingComputer hardware troubleshooting
Computer hardware troubleshooting
 
Troubleshooting
TroubleshootingTroubleshooting
Troubleshooting
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 

Similar to MS-DOS History and Design

Dos prompt, types of commands .27 t028
Dos prompt, types of commands  .27 t028Dos prompt, types of commands  .27 t028
Dos prompt, types of commands .27 t028myrajendra
 
ICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdfICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdfshubhangisonawane6
 
ch2-system structure.ppt
ch2-system structure.pptch2-system structure.ppt
ch2-system structure.pptJohnColaco1
 
Ch2 system structure
Ch2 system structureCh2 system structure
Ch2 system structureAnkit Dubey
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptmiki304759
 
Introduction to Operating System and its Types
Introduction to Operating System and its TypesIntroduction to Operating System and its Types
Introduction to Operating System and its Typessundas Shabbir
 
computer software industry and I will be available to meet
computer software industry and I will be available to meetcomputer software industry and I will be available to meet
computer software industry and I will be available to meetshubhamgupta7133
 
Microsoft history
Microsoft historyMicrosoft history
Microsoft historydjprince
 
Device driver dos
Device driver   dosDevice driver   dos
Device driver doslherrra
 
Comp10080 Os L12
Comp10080  Os L12Comp10080  Os L12
Comp10080 Os L12gueste5b156
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos3022359
 
Operating systems11 9-07 (1)
Operating systems11 9-07 (1)Operating systems11 9-07 (1)
Operating systems11 9-07 (1)vattikuti_sarada
 

Similar to MS-DOS History and Design (20)

Dos prompt, types of commands .27 t028
Dos prompt, types of commands  .27 t028Dos prompt, types of commands  .27 t028
Dos prompt, types of commands .27 t028
 
ICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdfICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdf
 
IMD 203 - Ch02
IMD 203 - Ch02IMD 203 - Ch02
IMD 203 - Ch02
 
ch2-system structure.ppt
ch2-system structure.pptch2-system structure.ppt
ch2-system structure.ppt
 
Ch2 system structure
Ch2 system structureCh2 system structure
Ch2 system structure
 
System software vt
System software vtSystem software vt
System software vt
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
Dos commands
Dos commandsDos commands
Dos commands
 
Introduction to Operating System and its Types
Introduction to Operating System and its TypesIntroduction to Operating System and its Types
Introduction to Operating System and its Types
 
Characteristic & Aplication of some popular operating system.
Characteristic & Aplication of some popular operating system.Characteristic & Aplication of some popular operating system.
Characteristic & Aplication of some popular operating system.
 
MICROSOFT DOS MUKUND
MICROSOFT DOS MUKUNDMICROSOFT DOS MUKUND
MICROSOFT DOS MUKUND
 
Software 3
Software 3Software 3
Software 3
 
computer software industry and I will be available to meet
computer software industry and I will be available to meetcomputer software industry and I will be available to meet
computer software industry and I will be available to meet
 
Microsoft history
Microsoft historyMicrosoft history
Microsoft history
 
Osup.f inal
Osup.f inalOsup.f inal
Osup.f inal
 
Device driver dos
Device driver   dosDevice driver   dos
Device driver dos
 
Cs1 3-operating systems
Cs1 3-operating systemsCs1 3-operating systems
Cs1 3-operating systems
 
Comp10080 Os L12
Comp10080  Os L12Comp10080  Os L12
Comp10080 Os L12
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos
 
Operating systems11 9-07 (1)
Operating systems11 9-07 (1)Operating systems11 9-07 (1)
Operating systems11 9-07 (1)
 

More from Erm78

8 th
8 th8 th
8 thErm78
 
7 th
7 th7 th
7 thErm78
 
9 th
9 th9 th
9 thErm78
 
6 th
6 th6 th
6 thErm78
 
Ordonio
OrdonioOrdonio
OrdonioErm78
 
Tamaray ACT22A
Tamaray ACT22ATamaray ACT22A
Tamaray ACT22AErm78
 
Unix
UnixUnix
UnixErm78
 

More from Erm78 (12)

2nd
2nd2nd
2nd
 
2nd
2nd2nd
2nd
 
5th
5th5th
5th
 
4th
4th4th
4th
 
3rd
3rd3rd
3rd
 
8 th
8 th8 th
8 th
 
7 th
7 th7 th
7 th
 
9 th
9 th9 th
9 th
 
6 th
6 th6 th
6 th
 
Ordonio
OrdonioOrdonio
Ordonio
 
Tamaray ACT22A
Tamaray ACT22ATamaray ACT22A
Tamaray ACT22A
 
Unix
UnixUnix
Unix
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

MS-DOS History and Design

  • 1. MS-DOS OPERATING SYSTEM Prepared by: Mr. Emmanuel R. Mercado
  • 2. Objectives Understanding Operating Systems, Fourth Edition 2 You should be able to describe:  The historical significance of MS-DOS  How MS-DOS provided a foundation for early Microsoft Windows releases  The basics of command-driven systems and how to construct simple batch files  How one processor can be shared among multiple processes  The limitations of MS-DOS for many of today’s computer users
  • 3. MS-DOS Operating System Understanding Operating Systems, Fourth Edition 3  Developed to run single-user, stand-alone desktop computers  Manages jobs sequentially from a single user  Advantages:  Fundamental operation  Straightforward user commands  Disadvantages:  Lack of flexibility  Limited ability to meet the needs of programmers and experienced users
  • 4. History Understanding Operating Systems, Fourth Edition 4  MS-DOS was successor of CP/M operating system that ran first PC  Microsoft discovered an innovative operating system, called 86-DOS, designed by Tim Patterson of Seattle Computer Products  Microsoft bought it, renamed it MS-DOS, and made it available to IBM  IBM chose MS-DOS in 1981, called it PC- DOS, and proclaimed it the standard for their line of PCs
  • 5. History (continued) Understanding Operating Systems, Fourth Edition 5  MS-DOS became standard operating system for most 16-bit personal computers  Each version of MS-DOS is a standard version  Later versions are compatible with earlier versions  Early versions of Windows (versions 1.0 through 3.1) were merely GUIs that ran on top of the MS-DOS operating system  Although MS-DOS is no longer widely used, many Windows OSs offer a DOS emulator
  • 6. History (continued) Understanding Operating Systems, Fourth Edition 6 Table 13.1: The evolution of MS-DOS
  • 7. Design Goals Understanding Operating Systems, Fourth Edition 7  Designed to accommodate single novice user in single-process environment  Standard I/O support includes keyboard, monitor, printer, and secondary storage unit  User commands are based on English words or phrases, interpreted by command processor  Layering approach is fundamental to design of the whole MS-DOS system
  • 8. Design Goals (continued) Understanding Operating Systems, Fourth Edition 8 Figure 13.2: The three layers of MS-DOS
  • 9. Design Goals (continued) Understanding Operating Systems, Fourth Edition 9 BIOS (Basic Input/Output System):  Interfaces directly with various I/O devices  Contains device drivers that control flow of data to and from each device except disk drives  Receives status information of each I/O operation and passes it on to processor  Takes care of small differences among I/O units  Example: Allows user to purchase a printer from any manufacturer without having to write a device driver
  • 10. Design Goals (continued) Understanding Operating Systems, Fourth Edition 10 DOS kernel:  Contains routines that interface with disk drives  Read into memory at initialization time from MSDOS.SYS file residing in boot disk  Accessed by application programs and provides collection of hardware-independent services, such as:  Memory management and file and record management  Compensates for variations from manufacturer to manufacturer
  • 11. Design Goals (continued) Understanding Operating Systems, Fourth Edition 11 DOS kernel: (continued)  Makes disk file management transparent to user  Manages storage and retrieval of files  Dynamically allocates and deallocates secondary storage as it’s needed
  • 12. Design Goals (continued) Understanding Operating Systems, Fourth Edition 12 Command processor (the shell):  Sends prompts to user  Accepts commands that are typed in  Executes commands, and issues appropriate responses  Resides in a file called COMMAND.COM, which consists of two parts, stored in two different sections of main memory  Only part of OS that appears on the public directory  Weakness: It isn’t interpretive
  • 13. Memory Management Understanding Operating Systems, Fourth Edition 13  Memory Manager manages single job for single user  To run second job, user must close or pause first file before opening second  Uses first-fit memory allocation scheme  Main memory comes in two forms:  ROM: Very small in size and contains a program, a section of BIOS, with the the startup process (bootstrapping)  RAM: Part of the main memory where programs are loaded and executed
  • 14. Memory Management (continued) Understanding Operating Systems, Fourth Edition 14 Figure 13.3: One megabyte of RAM main memory in MS-DOS. The interrupt vectors are located in low- addressable memory and COMMAND.COM overlay is located in high addressable memory.
  • 15. Main Memory Allocation Understanding Operating Systems, Fourth Edition 15  MS-DOS Version 1.0 gave all available memory to resident application program  MS-DOS Version 2.0 began supporting dynamic allocation, modification, and release of main memory blocks by application programs  Amount of memory each application program actually owns depends on:  Type of file from which program is loaded  Size of TPA
  • 16. Main Memory Allocation (continued) Understanding Operating Systems, Fourth Edition 16  Programs with COM extension are given all of the TPA, whether or not they need it  Programs with EXE extension are only given amount of memory they need  Except for COM files, there can be any number of files in TPA at one time  Two programs can’t be run at same time  Shrinking and expanding of memory allocation during execution can be done only from programs written in either assembly language or C
  • 17. Memory Block Allocation Understanding Operating Systems, Fourth Edition 17  Memory Manager allocates memory by using first-fit algorithm and linked list of memory blocks  Best-fit or last-fit strategy can be selected with Version 3.3 and beyond  When using last-fit, DOS allocates highest addressable memory block big enough to satisfy program’s request  Size of a block can vary from as small as 16 bytes (called a “paragraph”) to as large as maximum available memory
  • 18. Memory Block Allocation (continued) Understanding Operating Systems, Fourth Edition 18 Table 13.2: First five bytes of a memory block define block’s structural characteristics
  • 19. Memory Block Allocation (continued) Understanding Operating Systems, Fourth Edition 19 Table 13.3: A sample memory block with first five bytes containing 7700000004h
  • 20. Memory Block Allocation (continued) Understanding Operating Systems, Fourth Edition 20  When a memory request comes in:  DOS looks through free/busy block list until it finds a free block that fits request  A well-designed application program releases memory block it no longer needs  If two free memory blocks are contiguous, they are merged immediately into one block and linked to the list
  • 21. Memory Block Allocation (continued) Understanding Operating Systems, Fourth Edition 21 Figure 13.4: The linked list of memory blocks
  • 22. Processor Management Understanding Operating Systems, Fourth Edition 22  MS-DOS doesn’t support reentrant code (basis for multitasking)  Programs can’t break out of middle of DOS internal routine and then restart routine from somewhere else  Each job runs in complete segments and is not interrupted midstream  Interrupt handlers allows the saving of all information about parent program that allows its proper restart after child program has finished
  • 23. Interrupt Handlers Understanding Operating Systems, Fourth Edition 23  Responsible for synchronizing processes  A personal computer has 256 interrupts and interrupt handlers, accessed via interrupt vector table  Interrupts can be divided into three groups:  Internal hardware interrupts  External hardware interrupts  Software interrupts
  • 24. Interrupt Handlers (continued) Understanding Operating Systems, Fourth Edition 24  Internal hardware interrupts: Generated by certain events occurring during program’s execution, e.g., division by zero  Assignment of such events to specific interrupt numbers is electronically wired into processor  Not modifiable by software instructions
  • 25. Interrupt Handlers (continued) Understanding Operating Systems, Fourth Edition 25  External hardware interrupts: Caused by peripheral device controllers or by coprocessors  Assignment of external devices to specific interrupt levels is done by manufacturer  Can’t be modified by software  Implemented as physical electrical connections  Software interrupts: Generated by system and application programs  Access DOS and BIOS functions
  • 26. Interrupt Handlers (continued) Understanding Operating Systems, Fourth Edition 26  Software interrupts: (continued)  Some are used to activate specialized application programs that take over control of computer  Example: Borland’s SideKick (type of TSR)  Terminate and Stay Resident (TSR) interrupt handler:  Terminates process without releasing its memory  Usually used by subroutine libraries  When running, it sets up memory tables and prepares for execution by connecting to DOS interrupt
  • 27. Interrupt Handlers (continued) Understanding Operating Systems, Fourth Edition 27 Interrupts synchronization:  When CPU senses interrupt, it does two things:  Puts contents of PSW (program status word), code segment register, and instruction pointer register on a stack  Disables interrupt system so that other interrupts will be put off until current one has been resolved  CPU uses 8-bit number to get address of appropriate interrupt handler  Interrupt handler reenables interrupt system to allow higher-priority interrupts to occur
  • 28. Device Management Understanding Operating Systems, Fourth Edition 28  Requests are handled first-come, first-served  Does not support reordering requests, though in Version 3.0, BIOS can support spooling  MS-DOS Device Manager can work with magnetic tape, floppy disks, or hard disks  BIOS handles device driver software  Device drivers are only items needed by Device Manager to make system work  Installable device drivers are salient feature of MS-DOS design
  • 29. File Management Understanding Operating Systems, Fourth Edition 29  MS-DOS supports following file organizations:  Sequential  Can have either variable or fixed-length records  Direct  Can only have fixed-length records  Indexed sequential  Can only have fixed-length records
  • 30. Filename Conventions Understanding Operating Systems, Fourth Edition 30  A filename:  Contains no spaces  Consists of drive designation, directory, any subdirectory, a primary name, and an optional extension  DOS isn’t case-sensitive  Drive name is followed by a colon (:)  Directories or subdirectories can be from one to eight characters long and preceded by a backslash  Primary filename can be from one to eight characters long
  • 31. Filename Conventions (continued) Understanding Operating Systems, Fourth Edition 31  Extension can be from one to three characters long and can have special meaning  File is assumed in current working directory if no directories or subdirectories are included in name  File is assumed on current drive if no drive is designated  Relative name consists of primary name and extension  Absolute name consists of drive designation and directory location
  • 32. Managing Files Understanding Operating Systems, Fourth Edition 32  Earliest versions kept every file in single directory  Slow and cumbersome file retrieval  Microsoft implemented hierarchical directory structure in Version 2.0  An inverted tree directory structure (root at top)  Disk tracks are divided into sectors of 512 bytes each when formatted  Corresponding to buffer size of 512 bytes  Concept of cylinders, applies to hard disks
  • 33. Managing Files (continued) Understanding Operating Systems, Fourth Edition 33  Sectors (from two to eight) are grouped into clusters  When a file needs additional space, DOS allocates more clusters to it  FORMAT creates three special areas on disk:  Boot record  Root directory  FAT(file allocation table)
  • 34. Managing Files (continued) Understanding Operating Systems, Fourth Edition 34  Boot records: First sector of every logical disk and contains:  Disk boot program  Table of disk’s characteristics  Root directory: Where system begins its interaction with user and contains:  List of system’s primary subdirectories and files  Any system-generated configuration files  Any user-generated booting instructions
  • 35. Managing Files (continued) Understanding Operating Systems, Fourth Edition 35  Root Directory (continued):  AUTOEXEC.BAT file: Batch file containing series of commands defined by user  Every time CPU is powered up, the commands in this file are executed automatically by system  The information kept in root directory include:  Filename, File extension  File size in bytes  Date and time of the file’s last modification  Starting cluster number for the file  File attribute codes
  • 36. Managing Files (continued) Understanding Operating Systems, Fourth Edition 36  Root Directory (continued):  Number of entries in root directory is fixed  Version 2.0 and onward versions allow users to avoid this limitation by creating subdirectories  Each subdirectory can contain its own subdirectories and/or files  MS-DOS supports hidden files  Files that are executable but not displayed in response to DIR commands  COMMAND.COM is the only system file that isn’t hidden
  • 37. Managing Files (continued) Understanding Operating Systems, Fourth Edition 37 Figure 13.5: An example of directory listing of a root directory
  • 38. Managing Files (continued) Understanding Operating Systems, Fourth Edition 38 Figure 13.6: Typical directory system
  • 39. Managing Files (continued) Understanding Operating Systems, Fourth Edition 39  File Allocation Table (FAT): Contains status information about disk’s sectors  Status includes, which sectors are allocated, free, and can’t be allocated because of formatting errors  All sectors except first are linked in a chain  Each FAT entry gives sector/cluster number of next entry  Last entry contains value FF to indicate end of chain
  • 40. Managing Files (continued) Understanding Operating Systems, Fourth Edition 40 Figure 13.7: A typical FAT
  • 41. Managing Files (continued) Understanding Operating Systems, Fourth Edition 41  MS-DOS views data in disk file as continuous string of bytes  I/O operations request data by relative byte (relative to beginning of file) rather than by relative sector  MS-DOS supports noncontiguous file storage  Dynamically allocates disk space to file  Compaction became feature of MS-DOS Version 6.0 with inclusion of DEFRAG.EXE  CHKDSK (filename) responds with number of noncontiguous blocks in which file is stored  Security feature is not built into MS-DOS
  • 42. User Interface Understanding Operating Systems, Fourth Edition 42  MS-DOS uses command-driven interface  Users type in commands at system prompt  Default prompt is drive indicator and > character  Default prompt can be changed using PROMPT command  User commands include some or all of following elements in this order:  Command, source- file, destination-file, switches
  • 43. User Interface (continued) Understanding Operating Systems, Fourth Edition 43  Switches are optional and give specific details about how command is to be carried out  Begin with slash (i.e., /P /V /F)  COMMAND.COM carries out commands  Resident portion of code: Stored in low section of memory  Contains command interpreter and routines needed to support an active program  Transient code: Stored in highest addresses of memory  Can be overwritten by application programs if they need to use its memory space
  • 44. User Interface (continued) Understanding Operating Systems, Fourth Edition 44 Table 13.4: MS-DOS user commands
  • 45. User Interface (continued) Understanding Operating Systems, Fourth Edition 45 Table 13.4 (continued): MS-DOS user commands
  • 46. Batch Files Understanding Operating Systems, Fourth Edition 46  Customized batch files allows users to quickly execute combinations of DOS commands to:  Configure systems  Perform routine tasks  Make it easier for nontechnical users to run software  For such programs to run automatically every time system is restarted:  File should be renamed AUTOEXEC.BAT and loaded into system’s root directory
  • 47. Redirection Understanding Operating Systems, Fourth Edition 47  MS-DOS can redirect output from one standard input or output device to another  Syntax: command > destination  e.g., DIR > PRN sends directory listing to printer instead of monitor screen  Append Symbol (>>) redirect and append new output to an existing file  e.g., DIR >> B:DIRFILE  Redirection works in opposite manner as well  Symbol (<) changes source to a specific device or file. e.g., INVENTRY < B:TEST.DAT
  • 48. Filters Understanding Operating Systems, Fourth Edition 48  Filter commands: Accept input from default device, manipulate data in some fashion, and send results to default output device  Example: SORT  Can read data from file and sort it to another file  Sorted in ascending order  SORT /R sorts file in reverse order  Files can be sorted by columns  Example: MORE  Causes output to be displayed on screen in groups of 24 lines, one screen at time
  • 49. Pipes Understanding Operating Systems, Fourth Edition 49  Causes standard output from one command to be used as standard input to another command  Symbol: Vertical bar (|)  e.g., DIR | SORT alphabetically sort directory and display sorted list on screen  Pipes and other filters can be combined  Possible to sort directory and display it one screen at a time by using pipe command: DIR | SORT | MORE
  • 50. Additional Commands Understanding Operating Systems, Fourth Edition 50  FIND: Searches for specific string in given file or files and displays all lines that contain the string from those files  e.g., FIND "AMNT-PAID" PAYROLL.COB display all lines in the file PAYROLL.COB that contain string AMNT-PAID  PRINT: Allows user to set up series of files for printing while freeing up COMMAND.COM  PRINT /B allows changing of internal buffer size  PRINT /Q specifies the number of files allowed in print queue
  • 51. Additional Commands Understanding Operating Systems, Fourth Edition 51  TREE: Displays directories and subdirectories in hierarchical and indented list  Options allow user to delete files while tree is being generated  TREE /F displays names of files in each directory  Can also be used to delete file that’s duplicated on several different directories
  • 52. Summary Understanding Operating Systems, Fourth Edition 52  MS-DOS was written to serve users of several generations of personal computers  First standard operating system to be adopted by manufacturers of personal computing machines  Advantages are its fundamental operation and its straightforward user commands  Weakness is that it was designed for single- user/single-task systems  Can’t support multitasking, networking, and other sophisticated applications