Introduction to MS-DOS
Download
Report
Transcript Introduction to MS-DOS
An Overview of Microsoft Disk
Operating System
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
1
Introduction to MS-DOS
•
An operating system is a set of interrelated programs that manage and control computer
processing.The Microsoft Disk Operating System, MS-DOS, is a traditional
microcomputer operating system that consists of four major components.
The Operating-system loader
- It brings the operating system from the startup into RAM.
- Bootstrapping
The MS-DOS BIOS
- BIOS stands for Basic Input/Output systems
- Loaded from the file IO.SYS during initialization.
- Layer that sits between operating system kernel and hardware.
The User Interface (shell)
- Conventional program that allows the user to interact with the operating system.
- Default MS – DOS user interface is a shell program called Command.com.
The MS-DOS Kernel
- Heart of the operating system
- it is a proprietary program supplied by Microsoft corporation.
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
2
MS-DOS Kernel
•The kernel provides a collection of hardware-independent services called system functions.
- File Management
- Memory Management
- Device Input and Output
- Process control
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
3
File Management
•
Block Devices are accessed on a sector basis. The MS- DOS kernel through the device driver sees a
block as a logical fixed size array of sectors. the device driver in turn translates the logical sector
requests from the MS – DOS into physical locations on the block device.
•
MS – DOS file system is divided into four parts
- Boot Sector
- Always at the beginning of a partition.
- Contains OEM identification, a loader routine , and a BIOS parameter block.
- File Allocation Tables (FAT)
- Provides a map to the storage locations of files on the disk by indicating which
clusters are allocated to each file.
- Second copy of FAT as back up.
- Free cluster is found by scanning the FAT for a zero value.
- Root directory
- Root directory entries are 32 bytes long.
- Each entry includes a filename and extension, size, starting FAT entry, the time and date the
file was created and the files attributes.
- Files Area
- Contains subdirectories, file data and unallocated clusters.
- The area is divided into fixed size clusters and the use for a particular cluster is
specified by the corresponding FAT entry
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
4
Memory Management
•
•
•
•
Based on a pool of variable sized memory blocks.
Two basic functions are to allocate a block from the pool and to return the allocated block to the pool.
MS-DOS compatible personal computers can be fitted with three kinds of RAMs
– Conventional Memory
– Expanded Memory
– Extended Memory
Conventional Memory
- Up to 1MB of Memory is directly addressable.
- Physical addresses for references are generated by a 16-bit segment register combined with 16-bit offset.
- Out of 1MB MS-DOS occupies 640KB of the conventional memory.
- This 640KB is divided into three zones
- The interrupt vector table
- Occupies lowest 1024 bytes of memory.
- Its address and length are hardwired into the processor and cannot be changed.
- The operating system area
- Begins immediately above the interrupt vector table.
- Holds the operating system, its tables and buffers, and device drivers.
- Amount of memory occupied varies from version to version of MS-DOS.
- The transient program area
- Remainder of the 640KB area.
- Organized into a structure called Memory Arena, which is divided into arena entries (memory
blocks).
- Each arena entry has a arena entry header.
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
5
How MS-DOS supports Conventional Memory Management
•
The MS-DOS kernel supports three memory management functions, invoked with interrupt 21H, which operate
on the TPA:
- Function 48H (Allocate Memory block)
- Function 49H (Free Memory block)
- Function 4AH (Resize Memory block)
•
The memory manager can use any of three allocation strategies:
- First fit – the arena entry at the lowest address that is large enough to satisfy the request.
- Best fit – the smallest available arena entry that satisfies the request, regardless of its position.
- Last fit – the arena entry at the highest address that is large enough to satisfy the request
Default approach used by MS-DOS is First-fit approach.
Expanded Memory
- To circumvent the 1MB limit of conventional memory, expanded memory was designed.
- As much as 8MB of expanded memory can be installed in a single machine.
- Made available to the application software in 16KB pages.
Expanded Memory Manager
- Provides an interface between application programs and expanded memory.
- Divided into Driver and Manager.
- Manager controls the status, allocation, mapping and deallocation of expanded memory.
Extended Memory
- Storage at addresses above 1MB that can be accessed in Protected mode.
- Extended memory is linearly addressable, so no manager required.
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
6
Device Input and Output
•
•
•
•
MS-DOS recognizes two types of devices: block devices e.g. floppy disk or fixed disk
drives; and character devices, e.g keyboard, display, printer, and communication ports.
MS-DOS identifies each block device by a drive letter assigned when the devices
controlling software, the device driver, is loaded. A character device on the other hand,
is identified by a logical name built into the device driver.
Distinction between character and block devices is that the MS-DOS always adds new
block – device drivers to the tail of the driver chain but adds new character – device
drivers to the head of the chain.
Techniques to access character devices:
- Handle type function calls
A handle is a 16 bit number returned by the operating system whenever a device is
opened or created.
- Character input and output functions:
Interrupt 21H functions 01H to 0CH. These functions are designed to communicate
directly with the keyboard, display, printer and serial port.
Process Control
•
•
Process, or task, control includes program loading, task execution, task termination, task
scheduling and intertask communication.
MS-DOS is not a multitasking operating system ,it is a single tasking operating system.
11/13/01
CS-550 Presentation - Overview of
Microsoft disk operating system.
7