240 likes | 345 Vues
This chapter delves into the intricate workings of DOS file systems, highlighting the structure of ROM BIOS, internal commands, and external commands essential for managing memory and I/O devices. Discover how the file allocation table organizes data, the importance of absolute and relative pathnames, and special character restrictions in filenames. It also covers batch commands, disk formatting, and the logical structure of a diskette, ensuring a solid foundation in disk operating systems and their security implications.
E N D
Chapter 6 Disk Operating System
Hardware ROM BIOS Operating System Internal Commands External Commands Memory I/O Device’s Applications
Video Area 640 K Program Memory Command Resident MS-DOS IO System Interrupt Handler 0000 Figure 2 Memory Map of 8088 Processor
C:DOS (ROOT dir) Chicago dir Atlanta dir Portland dir Payroll Inventory Payroll Inventory Payroll Inventory Files Files Files Files Files Files
Path statement • Absolute pathname • C:\US\sales\salesreps\smith • Relative pathname • CD \smith • “Program not found”
8.3 File Specification A:\DIRNAME\FILENAME.EXT Drive location Directory location File Name Can be up to 8 eight characters The following characters are not allowed: . ” / \ [ ] < > + = ; ‘ Spacebar Extension
Commands • Name Options Parameters • Keyword Drive Options • Keyword Source file File switches • Do what? To who? How?
Command Essentials • You must enter words shown in capital letters y). • You must supply any items shown in italic letters • Items in square brackets [] are optional. • Items separated by a bar ( | ) means you can enter one of the other ( Example OFF | ON ) • An Ellipsis (…) indicates you can repeat as many time as you want. • You must include all punctuation, except square brackets and vertical bars.
Global Filename Characters • ? = can be any character • * = any character can occupy that position and all remaining positions • DIR A:INPUT.??? Or DIR A:INPUT.* • ******WARNING******* • DELETE C:*.* • ******WARNING*******
Batch Commands • ECHO,FOR,GOTO,IF,PAUSE,REM • A batch file is a file containing 1 or more commands that DOS executes. ext = .bat • ECHO ON • REM This is an example of a batch cmd. • Copy C:prog1.exe to C:prog2.exe • DIR • Autoexec.bat = start program at DOS start
Redirection • DIR >PRN Sends cmd to printer • DIR >catalog Sends cmd to filename • MYPROG <INPUT.TXT • DIR >> filename appends to file
Piping & Filters • Filters = SORT, FIND,MORE • DIR|SORT>FILE • SORT <MYFILE >RESULT • TYPE MYFILE|MORE
Help /? • Command Summary C:>Help • Help command-name (C:>help copy) • Copy /?
Physical Structure of a Diskette • Formatting • concentric circles called tracks • pie-shaped wedges called sectors • Data is written to the tracks as bits,0’s and 1’s • bits become magnetized spots on the disk • spacing prevents one spot from affecting other spots • Read/write heads • above and below the diskette move in unison • Diskette made up of Mylar • covered with either cobalt oxide or iron oxide to hold magnetic charge • Formatting writes the division symbol ÷ F6 1111 0110 to each track
Logical Structure of a Diskette • The BIOS manages the disk in sectors, physical terms • a sector holds 512 bytes of data • The OS manages the disk in clusters, logical terms • A cluster is defined as the smallest unit of data that can be read from or written to at one time • File allocation unit (FAT) • One cluster equals the amount of storage space per two sectors, top and bottom of the diskette 512 bytes X 2 = 1024 (one cluster, double-density 3.5” diskette ) 80 X 9 = 720 (one side of diskette in sectors, the whole diskette in terms of clusters) 1024 X 720 = 737,280
Diskette size Tracks per side Number of sectors per tracks Capacity 5.25" Single side SD8 40 8 40 X 8 X 512 bytes = 160 KB 5.25" Double side DD9 40 9 2 X 40 X 9 X 512 bytes = 360 KB 5.25" Double side High Density DQ15 80 15 2 X 80 X 15 X 512 bytes = 1.2 MB 3.5" DD DQ9 80 9 2 X 80 X 9 X 512 bytes = 720 KB 3.5" HD DQ18 80 18 2 X 80 X 18 X 512 bytes = 1.44 MB 3.5" XD ( IBM only) DG36 80 36 2 X 80 X 36 X 512 bytes = 2.88 MB The Standard PC Diskette Configuration: Diskette drives turn at 300 RPM. That results in an average search time (½ revolution) of 100 ms.
$64 Million Question $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ What does this have to do with security? $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$