Professional Documents
Culture Documents
OPERATING SYSTEM
What is OS:Operating system works like a translater between the user and the computer. It is a medium that can operate the system. It can be understood as a set of programs within a computer system that maintains the control of various resources of the system (microprocessors, primary and secondary storage devices and I/O devices). Types of OS :1. Single user OS :Through this OS we can handle more than one computer at a time, eg. MSDOS, WINDOWS 95, 98, etc. 2. Multi user OS :Through this OS we can handle more than one computer at a time on one platform, e.g.WINDOWS NT, UNIX, LINUX, NOVELL NETWARE, etc.
CHAPTER 2.
An asterix (*) stands for one or more characters. E.g., DIR*.SYS lists all the files with any name but with the extention SYS. DIR A*.* lists all the files whose name starts with a and with any extention. The question mark (?) is used within filenames and extentions to represent a specific number of characters. E.g., DIR????.EXE lists all the files whose primary name consists of any four characters. System control programs :There are two sets of essential programs associated with the control of computer and the way it interacts with 1) Programs These are a) Based on ROM - All the instructions available on ROM b) Based on the disk All the instructions available on the disk. ROM based instructions are further categorized into two types of routines: BIOS Routines (Basic-Input-Output-System) which helps CPU in communicating with the hardware. Startup routines Starts the booting process. POST (Power-On-Self-Test) It checks and initializes hardware devices, such as keyboard, printer and monitor. Initialization Routines Sets the equipment connected to the computer in a ready to operate condition. Bootstrap Loader Loads the bootstrap program from the bootable disk. It is a set of instructions available in the first sector, i.e. sector 1 of track 0 of side 0 (also known as Boot Sector of the disk). Disk based instructions involves running files IO.SYS, MSDOS.SYS and COMMAND.COM. 1. Boot record :The term boot or bootstrap means start or start-up. When we boot the computer, we are turning it on and loading the operating system into the computer's memory. It is located on track 0, sector 1, side 0 of the formatted DOS disk. On a hard disk it is located on the first sector of the first cylinder of the DOS partition. 2. IO.SYS (or BIO.COM) :It has two modules. The first is the DISK BIOS module which contains the device drivers used for communicating with the CPU, printer and keyboard. The second one called, SYSINIT loads the second file MSDOS.SYS from the disk into the memory. It resets the disk system and initializes attached devices such as keyboard, screen, printer, disk and clock. 3. MSDOS.SYS (or DOS.COM) :2) Keyboard 3) Monitor 4) Attached devices like printer, drives and modems.
Also know as the kernel and provides an interface between software and hardware. It actually is a bridge between programs and IO.SYS. It actually manages calls for printing, data storage or reading, display and sends these to IO.SYS which further responds with the appropriate action. 4. COMMAND.COM :It is also known as command processor, because it reads commands from the keyboard. It is responsible fo rthe interpretation and carrying out of instructions. Also known as the shell. It also produces the DOS disk prompt, performs error checking and displays error messages. It has got three portions: a) Initialization portion Looks for the file AUTOEXEC.BAT. This portion is transferred into the memory when the control is transferred to COMMAND.COM and AUTOEXEC.BAT gets executed. After execution this portion is no longer required. b) Resident portion Stays in the memory throughout. It is responsible fo rperforming some basic tasks such as error handling, loading and unloading of transient portion whenever required. c) Transient portion Contains instructions for executing some commands (internal) which the user commonly uses. If any program needs more memory than available, the space occupied by the transient portion in the memory is released. After the execution of the application program, this portion has to be reloaded again into the memory to enable the user to give commnads again. Booting up process Booting is the process by which the computer starts itself, loads the OS into the memory and gets ready to process commands. This includes reading the boot record into memory, which passes control to DOS. Next DOS checks for the presence of IO.SYS, MSDOS.SYS and COMMAND.COM. If these files are found, the DOS prompt (C:\>) is displayed on the screen. It is the prompt which invites the user to type a command else the error message will be displayed. In short booting process can be summarized as follows:
ROM startup portion checks and initializes the hardware. It then performs memory check to calculate the size of memory that is available on the computer, and if it is working in a proper manner. Bootstrap portion of the ROM startup routine loads the DISK BOOTSTRAP PROGRAM from the boot sector of the disk into memory. The disk bootstrap program loads the file IO.SYS from the disk into memory. The SYSINIT module of IO.SYS loads the file MSDOS.SYS into memory. MSDOS.SYS looks fo r a file called CONFIG.SYS in the root directory of the bootable disk and executes it. It also loads COMMAND.COM into the memory. COMMAND.COM executes AUTOEXEC.BAT file if it is present under the root directory of the bootable disk. The transient portion of COMMAND.COM finally displays the DOS prompt, which looks like C:\> or A:\>.
CHAPTER 3.
Note :- To come out of a directory to it's parent's directory, type CD.. and to return directly to root from a subdirectory, type CD\ 2. CLS (Clears screen from DOS prompt ). Syntax :C:\>CLS
3. (a) COPY (Copies the files to one location to another). Syntax :C:\>COPY [source drive:][source path][source filename] [target drive:][target path] [target filename] e.g., C:\>COPY ABC.DAT A: (copies the file ABC.DAT from root to the floppy disk) C:\>COPY ABC.DAT C:\SMT (copies the file ABC.DAT from the root to the directory SMT)
3. (b) COPY CON (Creates a file). Syntax :e.g., C:\>COPY CON [file name] C:\>COPY CON ABC.BAT
5. DIR (Displays the list of directories and files on the disk). Syntax :C:\>DIR [drive name:][/switch]
The output presented by the DIR command involves: Primary name of the file in the first column. Secondary name of the file in the second column. <DIR> if the corrsponding name is of a directory in the third column. The size of each file in bytes in the fourth column.
The date on which the file was either created or modified in the fifth column. The time at which the file was either created or modified in the sixth column. Switches available are /P for listing pagewise /W for listing widthwise /W/P for listing widthwise as well as pagewise /OD for listing datewise /ON for listing names alphabetically /AD for listing only the directories /A-D for listing only the files /OS for listing the files sizewise in ascending order /O-S for listing the files sizewise in descending order /AH for listing the hidden files 6. LABEL (Used to create, change or delete disk volume name). Syntax :C:\>LABEL
8. PATH (Provides access to files located in other directory paths or other disks). Syntax :e.g., PATH=[drive:][directory;].. PATH=C:\>WINDOWS;C:\>DOS;C:\>IA;C:\>FOX;
9. REN (Rename an existing disk file). Syntax :e.g., C:\>REN [old filename] [new filename] C:\>ABC XYZ
10. RD (Removes a directory from the disk). Syntax :e.g., C:\>RD [dirname] C:\>RD SMT
11. TIME (Displays and sets the system time). Syntax :C:\>TIME
12. TYPE (Displays the contents of the file mentioned). Syntax :C:\>TYPE ABC
13. VER (Displays the version of the OS being used). Syntax :C:\>VER
14. VOL (Displays the volume name of the disk). Syntax :C:\>VOL
External Commands in DOS :1. ATTRIB {Sets (+) or removes (-) read-only or hide file attributes}. Syntax :e.g., C:\>ATTRIB [attribute] filename C:\>ATTRIB +r ABC C:\>ATTRIB +h ABC C:\>ATTRIB -r ABC C:\>ATTRIB -h ABC
2. DELTREE (Deletes a directory and all attached subdirectories and files). Syntax :e.g., C:\>DELTREE [dirname] C:\>DELTREE SMT
3. DISKCOPY (Makes a duplicate copy of a disk). Syntax :e.g., C:\>DISKCOPY [source disk drive] [target disk drive] C:\>DISKCOPY A: B:
4. EDIT (Full-screen editor, provides the facility for creating and editing the file). In older versions of DOS it was available with the name of EDLIN. Syntax :e.g., C:\>EDIT [filename] C:\>EDIT ABC
5. FIND (Finds and displays the specified text from a specified file). Syntax :e.g., C:\>FIND "text" [filename] C:\>FIND "SMT" ABC
6. FORMAT (Prepares the disk for storage purpose). Syntax :e.g., C:\>FORMAT [drive] [switch] C:\>FORMAT A:
DOS will ask you to put disk in drive A: and displays the following message Insert new diskette for drive A: And press enter when ready.. At this point, insert a new blank unformatted disk in drive A and press enter key. Switches available are -
/Q quick format /U unconditional format /S copies system files /V verifies format 7. MORE (Prints data on the screen and if exceeds the screen limits then displays one page at a time). Syntax :e.g., C:\>TYPE [filename] | MORE C:\>TYPE ABC | MORE
9. SCANDISK (Detects and repairs disk errors ). Syntax :e.g., C:\>SCANDISK [drive] C:\>SCANDISK A:
10. SYS (Transfers system files to the disk ). Syntax :e.g., C:\>SYS [drive] C:\>SYS A:
CHAPTER 4.
BATCH FILES
Concept of Batch files :This facility lets the user create and store a series of DOS commands that are acted upon (executed) automatically one line at a time in the order entered. These commands are stored under a filename and this file is called a batch file. This file always has the extention .bat. If the batch file is given the special name AUTOEXEC.BAT, it is executed automatically when you first start your computer. If the batch file is given some other name, like TASK.BAT, you must type TASK at command prompt to execute the file. Some commands in connection with the batch files :Ctrl-Break or Ctrl-C - Stops batch file operation. Echo - Turns screen display off and on during batch file operation. Pause - Pauses batch file execution and displays the message "Press any key to continue.." Types of Batch Files: Generaly there are three type of batch files are present: 1. Simple batch file : In simple batch file we gives dos command one by one and save the file with the extension .bat these commands run one by on automaticaly by typing the batch file name. . Example: C:\> Copy con tvs.bat Date Time Md tanuj Cd tanuj Md anurag cd.. cd.. ^z ( press ^ z or F6 for save the file) 2. Variable batch file : In variable batch file we creat the globle batch file and gives the variable in the form of %0,%1,%2....%9. for runing the batchfile we gives the value of variables in front of file name. Let us consider the following example. Example: C:\>copy con var.bat MD %1 CD %2 RD %3 Type %4 ^z
For runing the file we gives the command like this: C:\>var neelima divya naveen preeti C:\> var naveen tanuj anurag chauhan 3. Autoexec batchfile : This batch file runs automaticaly when system is boot. This file must be in root.