MS-DOS-by-Dominic-Swayne-2003

Download Report

Transcript MS-DOS-by-Dominic-Swayne-2003

Microsoft Disk Operating System
and PC DOS
CS-550-1: Operating Systems
Fall 2003
Dominic Swayne
2003 Dominic Swayne
1
Introduction
• Understand the Operating System
• Cover some of its important features
• Improve your understanding of the operating system
2003 Dominic Swayne
2
Brief History
• 8-bit processors had been the norm in Personal
Computers (PC)
• Digital Research’s Control Program for
Microcomputers CP/M-80 most popular 8-bit OS
• Intel’s 8086 – first 16 bit processor for PCs
• OS developed by Seattle Computer Products (SCP)
for their own 8086 based system
• IBM to launch 8086 based PC – needed an OS
• Digital Research’s CP/M-86 and Softech
• Microsoft licenses the software from SCP
• The rest is history
2003 Dominic Swayne
3
Design Goals
• Easy to translate CP/M-80 applications – backwards
compatible with 8-bit applications
• Speed and efficiency – reduce disk transfers,
improve their speed and decrease OS compute time
• Written in Assembly Language – due to development
tools
– CP/M-80 based assembler
– 2k-byte monitor/debugger
2003 Dominic Swayne
4
Limitations
• Hardware could only address 1MB
• Programs couldn’t be larger than 640kb
• Single user – single processor – no hard drives
2003 Dominic Swayne
5
DOS Modules
• Basic Input – Output System (BIOS)
– Loaded in low memory – just above Interrupt Tables
– EPROM based
– Additional drivers loaded from CONFIG.SYS
• Kernel
– Loaded above BIOS
– MSDOS.SYS file
– No default error handling
• COMMAND.COM
– User interface
– Resident and Transient portions
– Handles all error traps
2003 Dominic Swayne
6
Memory Map
Reserved for BIOS
1MB
Interrupt vector starts at 0
640k
I/O System - from
manufacturer
Unused
Command Transient
Program memory
DOS kernel starts at 1k
Resident portion of
COMMAND.COM
Command Resident
DOS Kernel
1k
I/O System
Interrupt Vectors
0k
Above 640kb is 384kb of
additional system memory
– not directly addressable
1MB upper limit
2003 Dominic Swayne
7
Synchronization
• No true multi-tasking - Re-entrant code not supported by DOS
• Interrupt driven – no scheduler or CPU sharing
• Three types of interrupts:
– Internal, External, Software
• CPU senses interrupt
– Places Program Status Word, code segment register and
instruction pointer on a stack
– Disables interrupt system
– Starts processing based at 8-bit address from interrupt
table (interrupt vector)
– Re-enables interrupt system
2003 Dominic Swayne
8
Discrimination
• Memory allocated at program load – allocation based
on header file for .EXE files (header file specified
min/max)
• .COM software gets all available program area (aka
Transient Program Area)
• .BAT files – text files that call programs in sequence
• Dynamic memory allocation/recovery available
starting with version 3.3
• Only works with Assembly language and C programs
2003 Dominic Swayne
9
Memory Block
• Free blocks in linked list
• 32 bit descriptor – 16 bit segment/16 bit offset, 64k direct
• 16-byte – minimum size
• Maximum size – as much as is free
• Free adjacent blocks on the list merge automatically
• “Bug” permits access to 64k of Upper Memory
2003 Dominic Swayne
10
Processor Modes
• Real mode – compatible with 8086 limits
• Protected mode – selector/table/offset – memory
system
– Four 16-bit words used as memory descriptor
– First available on the 80286 based systems (required hard
reboot to switch modes)
– Four privilege levels (0 – 3, with 0 having most privileges)
– Additional table indicator to distinguish between local and
global memory
2003 Dominic Swayne
11
Conclusion
•Revolutionary design – no chance
•Revolutionary impact – absolutely
•Simple, expandable OS
•Standardized user interface and applications
•Lasted from 1981 until 1994 as a separate product –
still in use by Windows 98
(and in ME though better hidden)
2003 Dominic Swayne
12