Os 12
Os 12
Os 12
History of DOS
Version Release date 1.0 1981 1.1 1982 2.0 1983 3.0 1984 3.1 3.2 3.3 4.0 5.0 6.0 6.22
Understanding Operating Systems
Features CP/M compatible; supported only 1 directory Allowed double-sided 5 inch disks Eliminated some defects in version 1 Increased memory requirement to 36K, supported PC/AT First release to support networking Supported token ring and 3 inch disks IBM PS/2 computer Supported hard disks larger than 32 megabytes Better use of extended memory Better use of conventional memory Provided users with capabilities previously available only as third party applications
3
Design Goals
User
MS-DOS
Hardware
Understanding Operating Systems
Accommodate single novice user in single-process environment. Standard I/O support includes keyboard, monitor, printer, & secondary storage unit. User commands are based on English words/phrases indicative of action to be performed. Commands are interpreted by command processor. Layering approach protects user from hardware.
4
In its heyday, MS-DOS ran enormous collection of software packages making it difficult to discontinue.
Understanding Operating Systems 6
Reserved for BIOS Unused Transient part of Command.COM Transient program Area (user memory)
TSR programs Resident part of Command.COM Installable Drivers Buffer Cache MS-DOS Kernel BIOS Interface Interrupt Vectors
1M 640K
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.
Except for COM files, there can be any number of files in TPA at one time.
Understanding Operating Systems 9
Size of a block can vary from 16 bytes (paragraph) to maximum available memory.
Understanding Operating Systems 10
11
Busy
Free
Busy
Free
Busy
Block 1
Block 2
Block 3
Block 4
Block 5
12
Process Management
MS-DOS wasnt written in reentrant code because it was designed for a single-user, single-task environment. Reentrant code is basis for multitasking. Programs cant 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. Some software programs give illusion that two jobs can run together. E.g., Microsoft Windows versions 1.0 to 3.0. Possible because MS-DOS interrupt handlers give programmers capability to save all info about parent program that allows its proper restart after child program finishes.
Understanding Operating Systems 13
1. Internal hardware interrupts -- generated by certain events occurring during programs 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. Terminate and Stay Resident (TSR) -- a process without releasing its memory, thus providing memory-resident programming facilities.
Understanding Operating Systems 14
Device Management
Ability to reorder requests to optimize seek & search time is not feature because its designed for a single-user environment. All requests are handled on a first-come first-served basis. 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. Use one of each type of I/O device for each port, so no device channels. Devices do not require special management from OS. Device drivers are only items needed by Device Manager to make system work.
Understanding Operating Systems 15
Managing Files
Earliest versions of MS-DOS kept every file in a single directory. Version 2.0 implemented hierarchical directory structure. Inverted tree directory structure. When disk is formatted its tracks divided into sectors of 512 bytes. 2-8 sectors are grouped into clusters & that's how File Manager allocates space to files. Supports hidden filesfiles that are executable but not displayed in response to DIR commands.
Understanding Operating Systems 17
3. FAT (File Allocation Table) -- contains status info about disks sectors: which are allocated, which are free, and which cant be allocated because of formatting errors.
Understanding Operating Systems 18
User Interface
Command-driven operating system.
When user presses Enter key, shell (COMMAND.COM) interprets command & calls on next lower level routine to satisfy request. User commands include some or all of these elements in this order: command source-file destination-file switches
Understanding Operating Systems 20
Command DIR CD or CHDIR COPY DEL or ERASE RENAME TYPE PRINT DATE TIME MD or MKDIR FIND FORMAT CHKDSK PROMPT DEFRAG (filename)
Stands for Directory Change Directory Copy Delete Rename Type Print Date Time Make Directory Find Format Disk Check Disk System Prompt Defragment Disk
Action to be performed List whats in this directory. Change working directory. Copy a file. Append one to another. Delete the following file or files. Rename a file. Display text file on screen. Print one or more files on printer. Display and/or change system date. Display and/or change system time. Create a new directory or subdirectory. Find a string. Search files for a string. Logically prepare disk for file storage. Check disk for disk/file/directory status. Change system prompt symbol. Compact fragmented files. Run, execute, file.
21
22
Pipe
Cause standard output from one command to be used as standard input to another command.
Symbol is a vertical bar, |. Alphabetically sort directory & display sorted list on screen: DIR | SORT
Other Commands
FIND -- filter command that searches for specific string in given file or files & displays all lines that contain string from those files. PRINT -- allows user to set up series of files for printing while freeing up COMMAND.COM to accept other commands.
25