0% found this document useful (0 votes)
41 views

Operating System - Rudiments of Computer Science (XI)

The document provides an overview of operating systems, detailing their components such as process management, memory management, device management, file management, security management, and command interpretation. It explains the roles of various software types, including application software, compilers, interpreters, and linkers, while also categorizing operating systems based on user interaction and job processing methods. Additionally, it discusses the advantages and disadvantages of different operating systems, including batch processing and multiprogramming systems.

Uploaded by

Eshita Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
41 views

Operating System - Rudiments of Computer Science (XI)

The document provides an overview of operating systems, detailing their components such as process management, memory management, device management, file management, security management, and command interpretation. It explains the roles of various software types, including application software, compilers, interpreters, and linkers, while also categorizing operating systems based on user interaction and job processing methods. Additionally, it discusses the advantages and disadvantages of different operating systems, including batch processing and multiprogramming systems.

Uploaded by

Eshita Das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 58
Ga CeSiaesei Te consists mainly of the CPU, memory module, cannot do anythi oy of instructions needs t© be at rcs the. hardware work. Such coms “a sequenct inderstands t© ma ised to run the rees. These help In system and. its ‘closer to the ting System is the mast or ahich acts asa link between Various application programs sm, The user 1us functions like Process The earliest rang sytem consists of 2 St of progres at He used to do its vario Opa anory Nanagerent, npudoutout Control Fle iaragement, Security Control, Command | Manager etc. These functions are explained below | pag | ce hen a program i executed, Its broken down Into Smale! nits called | computers lacked _iroken dovmroceneor anv shares the | (laa | operating systems. | ee eee a ages reas oco ae 8 unt of or computer resources like CPU, memory, files and input/output devices. A multiprocessing system has | which run together. The Process Management ‘Module of the OS is responsible for many processes reation, deletion and running of several processes simultaneously. Fe mtircesng system, al processes residing in the main memory can be In one of the following | three states as shown by the 3-state model or the Process State Diagram. { |. Ready Process: Any new process entering @ New Job | -apsten must Iitialy gb to the Ready state, arrives tnecpuie completed | There it waits in a queue with the other eloceed ts the sob ‘ Process State for execution | Diagram coy processes to be processed by the CPU. Thus there can be several processes in this state. : Processes can enter the “Running state via the Ready state only. In the ‘Running state the process has control over the CPU and uses it to get executed. Though Process waiting for lIO completion | f. Three state model of a process 153 P1-6-1 Part 1: Onapter 8 . Blocked states, but only one in be In the Ready o st any Instant for a single processor. Process state at Processes normally leave the system from the Running hy i nptoutout operation, oF an InETUPL, the Runa ater f i the event of af input/output operation is comp once the i pleted, tna’ oF changed to ocr mce state to the Ready state for ont Me roca’ Ny | : ise CPU utilsaton 2 computdhagSem load, 1B |») Memory Management: To tint Tr proken down into 2 number of oats Svea) its main memory. Every prograr acter dytmenn,. tr a process is created, a portion ry is alloca: fora vam, iiony Tener 3 process execution Is over, it IS removed from the main mene? thee reallocated to some other process. — and’ eg a available memory space (i.e. RAM) Is constant, the operating system ee ent tater nee tof processes. The Memory Management Module of the OS is responsible for the Allocatic = May ne 4 allocation of memory space to various programs. ©) Device Management: Several input/output devices (ike keyboard, mouse, mon 1B> ©) Device Mans Computer system. Each device has its special hardware and pet ram that particular device uses the device driver program to access the devi communicates with the input/output hardware. The Device Management Module keeps track of the input/output reque When a user creates [Z> ©) File Management: A computer stores data in units called files. 05 gives a unique file name to the file and allocates space for storing File the file the OS opens the file and retrieves the data stored in the file. The File MangySt®™. To, organising and security of files." Mea meceaement deals with creating, naming, storing, retrieving, particular fo have sub-folders, forming a tree structure. The OS is responsible for c folder structures and keeping track of which file is stored in which folder. fles the OS also keeps track of which file is opened for reading and which one for wns B= @ Security Management: Unauthorised aecess to information stored in computers is ot desir operating system has a security mechanism to protect the fle and programs running w geace from unauthorised access. The Security Management Module Of the computer i reapers users with only the correct password can access a file. Moreover a file can also have 4 Fead-write access. Accordingly a user with a read only access will not be allowed to write inte 1) Command Interpretation: A user interacts with the operating system by means~of interpreting the coprthands provided by the OS. The Command Interpretation Module takes care of er commands and making the system resources to handle the requests. ext Editor: A text editing software is used to type in some text and store it. One can open the nefhe editor for editing purpose also. This utility is used mostly by program developers who use it the source code of a £0 form the executable program. lon of editors were called line editors and could be used to edit a full line of text. Even Whe first generati. Tole ne Single character the entire line had to be re-entered. The MS DOS text editor called the device driver which can operate that particular device. Any other ice. The device rt : Processes, issues commands to the input/output devices and ensures correct data tise ‘bem y he, the file in the systen Files can be grouped together and stored in units called folders. a eating and mainta te When working wee Be | urit protecting the computer system from misuse and ensures a smooth run File security can be provided by using individual or group level passwords. A user or a group ce Tead-oniy hhigh level language. The source code written using the editor can then be trans | Bay Ne fy aie, tert fe tote EDLIN is a1 were the cursor keys could be used to move up or down the screen oe an, Next came screen editors, te) Yeon’, file. UNIX operating system's vi editor is an example. At present we have window based | 'sedt with such an editor to easily navigate through the fle and editit. | xt editors. A mouse can be 154 1 Tr OF these at@r These include programs like assemblers, compilers, and interpreters. The main Programs is to translate a program written in assembly language or in a high lee! putments of Computer Sotenee operating System anrace (is 268 {rhe tcf Machine language that the computer understands. The different types Geembler: An Assembler fevers wud to tuna a pram anton in Assembly tanguage wo El SS ne seca sembly program depends on the machine architecture, thus seers are also machine ndent. The input to th mbler ibly language program se source program, and the cures ne a the assembler is an assembly lang There is 2 one-to-one corresponiie, code generated. Netwide Assembl eect Orne Ry language program, an assembler first checks if the program Is syntactically Sertacd Temi i checks i all the identifiers and labels used in the program are properly defined. If everything is ok, only then Is the program converted to its proper machine code the source code twice by the assembler to produce the final object file. | 24: PaSs assembler, In a two pass assemble, the first pass of the source Process the various symbols used in the program and the second pass is used actual machine code preter: An Interpreter is used to ‘machine code and simutt Assembler lachine language program also called an object program. nce between an assembly language statement and its machine ‘or NASM is an example of an assembler. » translate a program wien in a high lev! language 10] taneously execute the converted code. | interpreter In an interpreter, each statement from the high level language Is translated and executed one | “O_satement atone. nts may thle Sega gaa ued ane coast wee | the entire source code Is translated and converted into an object program in one go. Since no. object | code is prepared and saved in case of an interpreter, every time a program is to be run it needs to be translated or interpi compared to a compiled progr reted. Thus it takes more time to run an interpreted program as_) am. Since the program is executed by EPA | interpreting-the program line by line, thus an error can. be (Start \ de ‘more easily and rectified. Original BASIC is an example. = piler: A compiler is a language translator that first takes as its input the source code from a high level language. The entire program is then translated and saved as a machine language code called the object program. In case the program needs to be modified, the source program needs to be reloaded, modified and compiled again. However, a compiler only creates an object program. It does not execute the program. a | compiler { Compile Source | \ a Apart from compiling @ source program, compilers also check S syntax errors and generate a list of error messages when it < p—emblast | | finds errors and does not produce an object code unless the errors 4 are rectified. However a compiler cannot detect logical errors, ‘Compilers are language specific, i.e. each high level language will have its own compiler program. Thus one cannot use a C++ compiler to compile a source code writtén in FORTRAN. The flowchart of the compilation process is given above. | 1 The whol source code i tansated before RIS RUN | | OGForence bin run Terns pore run ately ar | 2. The caplaon cates an oben EVER! | interpreted be linked before it can be run [3. Every time the program is run, it needs to be 3. A compiled program has to be compiled only once and | Interpreted run as many times required [AAS each statement is translated one by one, its easy | 4. As the whole program is complied at once, tis | |__ tofind errors in a translated program |____ dificult to locate the error '5, Running time of an interpreted program is longer Example of interpreted programs include Part 1: Chapter 6 ea 5A large program is usually written er A particular progr] Linker Eom te cove fr one or mare MOS Ae form's part of the entire program tan then be compiled to produce reapetve objet codes or obit PBS, oF Sich object programs are then combine to produce, the. final progam system software that is two oF more a Sons rerd pectic jobs. functions for doing somes ° ginal program. is stored in the secon the linker is i Wary storage jy, hard disk. To run the code, the system. The Pre relocator is used to adjust the relative agy % different sub-routines in the executable POT per the requirement by the me ‘ory. The loader forms a part ofthe operating ‘system nowadays. a = ‘Debugger: A debugger isa system software that is bascaly ued 0 debUD 8 remove err fon, saree of a program. It can be used to run 3 program ie f —— manner fo check tora ne | Jebugger J yam at cf vie ihe crime gree ws oer a" ¥ library programs that are used to yrams: These are common set of ts 7 brary ike tle es, ne rasan fies, ordering files, ask deffagmenter programs, antag —o ‘etc, These programs are usually part of the uility functions provided by the Operating Sya™ executal ced by n sader: The execute progam code 0012" Yoodeg into the primary eat he xf program needs ‘the loader is to do this job. In the pany * + Application Software - . ‘ams that are made to carry out some speci Application | Application software ae a pre entic application, processing language, or ogee Software | We processing a pyrl Sr these application programs, whic in turn interact with the | esr. yout the desred work. These can be tailor-made software serving 2 SPecfc purpose g | General purpose software developed for some general use. Tallor-made software are written for specific purposes like stock management, school managemery, saree rrmeragement, payroll calcuation etc. Programs to control the working of, speciRc automat pectin facies in factory aso fll n tis category. Therefore talon made application Programs are wt | {D cater to the needs of a particular company, manufecturing unit or organisation. | ‘Another type of application software are general purpose software: These include utility software tha | rr iced te do common business oriented jobs or scientific analysis. These software are used tot word. processing, spread sheet processing, database handling, presentations). computer aided desig, | Glectronic mailing, desktop publishing etc. These are usually avallable as bundled packages like MS Offte, | | Corel Suite, Adobe Smart Sulte, AutoCAD etc. The major advantages of such software are that they are pe: | | tested, feature rch, professionally developed programs that are usually easy to use from a user point of view. PIN Opera ieee | >perating | We have seen that an operating system forms the most important system software in a computer system. In ‘System | this section we will discuss about the various types of operating systems, and some of their common features. | + Categories of Operating Systems | Based on the way a user interacts with a computer and the wa y the computer carries out the jobs | assigned to it, one can broadly classify operating systems into the categories as desrled below 1-6-4 156 usmenta of Computer lence Ing Systems: These ame vende of GB of data. These computers canbe usedas wel aaa consist puters can be used puters which can | es oon oes sock ence, whee Inge nib as web servers, business server | he at ; ‘Thus operating systems for maint ses are Specialy Seven ae ena coment at | operating ating ye at a glen time. Example for handling large vol |, System wed for reat | ay teen process mary Jobs a ave tine: Ex Of BUCH an Operating eed large volurnes of | | workwas GHEMAA Nzae | 0, developed in, atch Processing operating SYsreon Such an operating system Is used fo | 198s by Genera » in juman intervention. The Jobs Speratng sytem i used for processing a set of | Hetors fer IBM 704 foo veut a1 an np ue, The COMPUT Ne proce ech ses te crater | 12 Day interaction from the User ne after the other | rr inputs a set of separate Js and processes cach fob one after the \ ine earty ays of | h era vod sis, To separate, one Job For Sackier, specel languages hed wakes | manufocier \ frsteome MGe) containing contol Sater introduced. The control statements were used by | OUshE outs new tre operating ining ono obs and determine the resources needed by the job during \ \macine, there te Sen Usaly every program or det? Jods ane preceded and followed by such language statements. | "Sperating syste | Spersting system. is competed its output is usualy printed stored in a file. However a delay is there between. Srp auoission Pete Ws the Job completion time, This delay is ‘called the turnaround time. eS te ba ae age number of cats wou ran iercion. | ‘Petey ny ing Is suitable for jobs req jiring 2 cs Bs fey le Poeessing, Wee large ing, statistical analysis et. \ Eesemoers stem has the following disadvantages: | Sto be wten owever a ptch operating SY is under processing and the | level ae ay | atch operating system does ase tv sei shane sper a sr Ute ORANG te! So Tanguage | ge ‘no tnd rel over any intermediate result of the processing. \ Spot, and forthe | | users have | ‘rsttimehad’ | sa amcznnenl vies a be CS MST AE not be desired at times. | features te virtual | i Wee | ripropramming operating SYSTEMS: puniprograming means intertanwad execution of Uv oF \ Q ml in in fant jobs or programs by the same computer- ‘Such a type of operating system | eet ae ay ery sve, ete a re needed to do this. In case several jobs are in the ready state, then the | operat system should be able to ‘decide the order in ‘which the jobs need to be executed. Moreover | when ng ral processes are running together, ‘each one should run independent of the other. \ stash ating System: A malttasking operating system can handle multiple tasks | ly Segether i oa uldprogramming ‘techniques. When multiple programs are running I 4 togeier, ech fs broken down into @ number Of aries rocesses. When one process of a particular | s"\\SS09 am has finished using the CPU and is ready to do 1/0 operations, the CPU is allocated to a | °° ‘of another program which needs execution. The CPU switches from one process to another | almost instantaneously and to the user gives the impression of ‘simultaneous operation of all the | apa, Examples of multitasking operating Systems ae UNIX, Windows, Linux etc. \ Multiuser Operating System: Such an operating system Sitews multiple users to access a rimputer through more than one terminal. Railway booking systems use such an approach, | compl umber of users can access the main server computer from various terminals spread across a ie area network, Examples of such operating systems are UNDK, Linus Windows2000 etc. \ Multiprocessing Operating System: A hardware implementation of a CPU may have multiple that work in parallel, Such computer systems are required for advanced | Indepemresearch end commercial applications which require a great deal of processing Powe’. ‘An | Sperating system that supports such a hardware configuration and helps to share the limited resources | Of the computer amongst the different processors Is called a Multiprocessing Operating System. | Examples include UNIX, Linux, Windows. ‘Time Sharing Operating Systems: Such an operating system allows various users to share the \ Total available time of the CPU, memory and other resources of the computer system under its supervision. Timesharing isthe process by which many users can simultaneously use a computer | Time Sherind ‘system such that each user is given the impression that he is using his own computer. A computer | Gd van ‘achieves this by using a task-scheduling algorithm that allocates a very short period of the \ ime (known as a time slot) to each user one by one. Once the last user Is accessed, the process \ again starts from the first user. Examples of such systems are the VAX/VMS and UNIX workstations. | 157 P1-6-5 ene : of operating systems are used — . i fog: These types oman lacey systems (RT fing Is critical. Examples of such py ie ote paren metre for date Procol of artifical satellites, ren! (pee My the meee - ar pone plant moriire designed t0 respond to external inter ypys' ge ee es sytem. Examples of such OS include LYN, RX ete. > that . he computer 8 c Immediate response of ystems (NOS): Ths tyPe of operating system is used jn ) Network Operating SVsie" ike a Local Area Network (LAN). Such an OS is capa OM connected in a compute’ Me a system where itis installed, but also handles com, ot han rot only the resources oe fo i To access resources from other computers, a ser nigga from other computers con proper password. One of the main advantages of us ?Y ‘into the remote com re resources like printers connect angie 129 ri ystems t wliee common hardwa ted to the nee, plas of network OS include windows2008 Server, LINUX etc. Exam Distributed ‘systems: In such a system, several computers that are con 9 a ‘on jb by ‘Sharing the job load between them. An operating system tt 0 pecial features to coordinate the operations and flow of gat ad ie, ® a Gisrbuted processing should have s the participating computers : network OS, in a distributed system, the user remains unaware that the voi seed In a distributed manner. To the user it appears that the processing is, Ee I beg . The operating system carries out all the operations required tc" {0"e ny single processor system. is ted m AMOEBA is an example of such perform the processing in a distributed manner. i an operating system @) Personal Computer Operating System: These types of operating systems are used in Usually meant for home use. Such an OS does not have the full features of @ normal operating sae have features more suited for home use. Examples include Windows 2007 Home edition ete + General structure of an Oper Modem operating systems have a layered structure, The bottom-most layer forms the hardware inter of the computer and the outermost layer forms the user interface. In between these two layers are the layers of the operating system. Each layer is responsible for a set of functions and communicates wee layers below and above it. te & a) The Kernel isthe innermost layer and is the central controiting part of the operating system. It always resides in the main memory and (©5 Kerns! directly communicates with the hardware of the computer. A typical kemel contains programs that are used for the basic functions of an Interpreter ‘operating system like process management, memory management, input/output device management. It also includes low level security features and interprets the commands supplied to it by the command line or GUI of the OS. The kernel is also that part of an operating system Cn that a user cannot replace or modify. Z & ) The Shell isthe layer next to the Kernel. It usually serves as the user | interface through which the users interact with the operating system and acts as a command “oloaes interpreter. The shell also manages running of multiple application programs. The shell can bea ‘command line interface (like in DOS) or a graphical user interface (like in Windows or Mac). & given operating system can have both a command line and a GUI shell, or more than one command line sels | as in UNIX. The user can switch between the two as per his convenience In some operating systems like UNIX, the shell also provides the platform to write programs that can be used a5 user defined commands. Several such commands can be combined to form a shell seript which Can be used to perform a specific operation, ee + Types of User Interfaces in an Ope y Types of OS | AN operating system provides an interface through which the user interacts with the system. Common typé | Interfaces _ of interfaces include Command-Line Interface (CLI) or Character User Interface (CUI) lke D0S, % Graphical User Interface (GU!) like Windows and Mac OS. In a CUI, the commands are to be typed to te ‘executed. In a GUI a pointing device can be used to click on icons or menus to execute a command. | Koc Ones 158 | [ee eee ercomputer Science command ine Ince: A rn a Se ee c et te petal mays IEEACS, Yoru common ned (0 be ped a = ne mands oO a com ig on wae Yo ike creating, deleting, editing, renami Fee Secon he asaemy ; pr sual ee'proper parameters, TVS Program Wh Wn ca wm, which Is run ‘ne Fr & NPE ped. For ei crn tn cen ute rere ta ash cen, an der ste ee ede sitet type nd Yom, ® user Interface: aternatvely | 2 peeranay B rane foie gaia canbe OA nd he requited = » at mies rowaes 9 wine Sy wane 8 cued BD a Fret002:eertace that CoO, Pe einen py using © polcting (5) ~~~ eae Graph ronnie (rouse. The MOUSE erated to point and cick on oe Graphic Hehe he OU pes oF icons tO Smee Poin een | ond DOSEN pT uses ong NN Taremember = \ co {302, y eype and execute He ne ‘| o wras nem comm a a n same type reget eo eames res 209 same wane iesgrarmang environments eet : wseless.txt, the user simply may have to srs 0 aon ne aputton over the fle icon my tect the Delete option from the drop-down menu | oo ne meng on eat ova" ee fie will get deleted pitferences betwoen CULand GU) \ iene Difference mhave to De: typed =n be remeibored t Be able nmands ‘executed by simp them — ms Gifferent commands for Je ai the EDIT icular command. is used in the applications “Drag and drop ystem . pleand Directory 5) tem maintains a directory oF folder Ep, The data is stored by the ‘computer system in the form of of related data or information that |: stored in a aerera program file. A dota fe basicaly Sore data Ar binary in nature, On the other hand 2 program ‘peed of run, Te various types of Gat files are discussed later: ‘fle canbe characterised by the Following properties: File Name: Each fle is identified by 2 fil Fyeent operating systems may have different rules for nat Fie Extension: An optional extension name which can cxanple 2 word processed document may have an extension File Date and Time: Along with the data, time ofits creation or modification. ming a file. 159 fy clicking on. J Usually an universal ico For example to CUT 2 por text the symbol 9 15 Us features. certain command execution easier _ structure to store data in a computer le name. The file can be accessed by each file also stores information related nz 1 cuvene ‘membered they can be \ ‘ S [to represent @ | tion of ‘GUI based \ ised for an icon in all ‘re avaliable which make .r storage media like a files. secondary storage media. A file data or information and can be file contains code that can be using this name. be used to specify the type of the file. For of doc or docx. to the date and Fille Length: The total byte content of the file called the file length is also stored, P1-6-7 part 1: Chapter © . ate have ceran Me . remctnsete saci eh ee geet att zene, Se read and cannot be mailed bY te weer lay 9 hidden fe Users te {mec ony esa spt aden les 0 thet these are nt cet aay ™ ey se various operations possible on 2 fle Include: Mental, ti, . ‘Rand Operation: To read the information wich stered in the Mes . write Operation: To inset some new data ito 2 fle. Ferre oration: To change the ame of le. . ‘To make a copy of a file from one location to another, Keeping the. on copy Operation: San operation: To arrange te contents of 2 le ina particular order. 1 Move Operation: To move a fie from one locaton to another. + Delete Operation: To delete a fle. + Close Operation: To cose an opened fle Modify Operation: To modi or change the contents of a file + Execute Operation: To run an executable fie. very file has a file type as specified by the extension of the file. It basically sta jposram to which ft belongs. The fle extension is used to tell the computer the appicati tes the ap roar raneve the contents ofthe fe. For example a fle with some graphic content Prooram get painting or a photograph can be opened by the Paint or the Photoshop application program, Wke a drayin Bp | Therefore cata fes ar cassie acording tn the nay application programs use them, cnet system in general supports the following categories of data files: Data File Types 4) Transaction File: Such a fie is used to store input data temporarily unt itis processed, F transaction file may temporarily store the weekly data of employees in an organisation, su ome is later required while processing the payroll file. h informa ») Master File: Such a file contains all the current data relevant to an application. Master descriptive data which are permanent in nature, such as 1D, name and address of an emy Wes cy SXgankation. The data in transaction fis is used to update the master files. For example, to ee Bal ‘weekly pay of an employee, the weekly data from the transaction file is combined with ota eee fle by the payroll program. The master fle is finaly updated withthe new data from the transac te ©) Output File: Some applications use multiple programs for data processing. In such an applica, ‘output produced by one program is used as an input forthe next program. Here the temporary ere Ce re gored a fle called the output fe. The second program in turn inputs from tis ie. jons need to generate various types of reports based on we 4) Report File: Data processing applicati file contains a soft copy of such a report. The report file is usually stored in an elton queries. A report format before itis printed to get a paper copy. €) Backup File: Such a fle Keeps a copy of a given fleas backup. In case the original file gets compte deleted accidentally, then the last saved data of the fle can be retrieved from the backup file ‘Some common file extensions and their meaning Prt perating-system commands for execution sequential ese can be Common File Emunrions text fle containing @ sequence of of ‘A these are extensions for graphic fles lke drawings, paintings, or photographs. pre fi A fle mana. bmp, 9 | ea Jon | opened by applications tke Pain, Photoshop, Paso, et, _ sab “These which ae used to organise and store compressed installation | Pinder various logical headings the nei organised File organization basically dea | ctr er PE Ne nosed in 2 le, The ORM SR ori on dateure ot aoe | the data records OT Petorage, Te four ised JM aiy used methods of file organisation are: \ . Fern rents are sor Po para ancl wees a serial le organisation: 10 © sera le, the oy records are stored inthe Me In chronologies ely 1, era fe ory one er te th: NOFMANY \ pata Fite created. | Srperiention : verti, we reco are ered ia PRCRE er th | . si nr me acca oe ponvey fed ofthe Re tial fle the records are physically | tn an Indexed sequen ly 1 tase te sequential TSO he In on inden tte, 2 primary we forthe fe 1 as? | i | 4 te tne records in the fle can be accessed cHecty | n key ofthe fle He thee edps to find the locaton ofthe record | rectris (orders) ae used (2 Folders Dieter arecores OF Mes Directories | Girectory 2H? pe under = common | Seructore | ‘fle is created, @ new entry when Tarte fle is created in the directory. (oren the file Is deleted, the entry Ter the file is also deleted from the fe ig, Using dere s wee parte and tare es EE thereby helping in fle search. E ‘al modern operating systems use 2 ‘Troe structure of Folders or Directories \ hierarchical or inverted tree Hike beferory structure, In such a structure there is 9 Ta) root directory which in tur can have several reenter, and 30 on. Each directory can also store ane or more files. he dagram shows one such drectory structure. Here the € drive forms the root directory, which has the wre frei ‘Schoo’, "Home, and Misc. White the ‘Home! sub-directory contains several files, the ‘Schoo! speredory again contains two sub-sub directories namely * Word ‘and ‘Prof. Each of these sub-sub Girectones in turn contains several files. Difference between File and Directory (or Folder) a Geroemics ay Panrtandanuaganapec | (7 Reston nae are SE a 0 Differs Fils can fave fle extensions to indicate the type of em || Fite & F 7 ttle ore appeation program tobe used =|" + orm Ne crprietone che serial sequel, | © Varta dreary onganistions indie Snge | indexed sequential, and direct fle organisation directory, one directory per user, and multiple | ae sa ‘directory per user organisation TE aiven folder can contain other folders 2. Directories do not have such extensions 161 P1-6-9 ce biw ¥ Part 1: Chapter 6 Bp | «Pi atiocation Table ss sored in 9 secondary ore device Ihe 3 hard dk. To stn bon bs co ear eee Eich Bock fort the mim ets Sch Fite Anooation we anocavlon | Siface fs divided Into small nie | Surface Te ancfwnite operations. Duning 2 read operation, the whole block containing "A tnt to dar reoduring a write operation, the whole block is written into the disk. »"> “es e In come operating systems a single sector forms a block, while in others several Computers Jae ner Nock. When a new fil is created, an operating system allocates space [orm 2 create ene || to store that file in several blocks depending upon the fle size. in the aa Computers maintain on the disk, a table indicating the block location of a file. This tabi cor itecation ‘Table or FAT and heips the computer to locate a file easy by serving as an in Fane a neten to 2 disk, the operating system checks the FAT for an empty area, stores the fle (neo Mh fle is writen 10 2 in the FAT. When an existing fle Is deleted, the entry of te fie Genes aM ss writes the fle locetearefore forms the most Important area ina disk as It stores Informatio” Hts § the location of a file and the availability of free space to store new files. ation regan ie bBooting sooty | In the early days of computing, a program had to be manually input tothe computer before it cou The next step in computing was to automatically load the programs prepared offline, through see qaice, The procedure of starting a computer by loading the basic components of the arf | into its main memory is known as booting. The word has come from the term "booker Which basically means pulling the computer up by its own efforts. i The sequence of steps that are carried out during a general booting are given below: = After starting the computer, the instruction register (IR) is automatically loaded with a predefined location, from where the execution of instructions starts. The primitive bootstrap program which stored in the ROM is located at this memory location. Susy ‘The bootstrap program performs certain tasks when initiated. One of its tasks is to run a diagnostic Fe cet the state of the various components of the computer system. This is called the Power Self Test (POST). It consists of testing the system bus, internal clock, video display card, RAM, keybra, land disk drives. If the test is successful the speaker emits a short beep. If the POST check is passed, it reads a simple block of code from a section of the hard disk called te boot sector and loads it into the main memory. This block of code stores information regarding te location of the remaining portion of the bootstrap program, which is loaded next. ‘Once the full bootstrap program is loaded, it can then locate the operating system kernel and devr drivers and load them into memory to finally make the computer running, there are two different types of booting processes & tora. fRE £3. fy Depending upon the way a booting takes place, discussed below: i a. Cold Booting: The first process to carry out when a computer is turned on is to intalse te c microprocessor, Next the Power On Self Test (POST) is carried out. It consists of testing the interna ea ae BUS, Internal Clock, Video Display Card, RAM, Keyboard, and Disk Drives. If the test is successful te come: ‘speaker emits a short beep. Then the components of the operating system are loaded into the maa memory. This is known as Cold Booting. b. Warm Booting: If for any reason the computer hangs while working, it needs to be restarted pet functional, A computer can be restarted by pressing the Ctrl+-Alt+Del keys ‘simultaneously. When ths| done, the computer restarts by skipping the RAM test. This is known as Warm Booting. te \AApooling Spooling or Simultaneous Peripheral Operations On-Line is a technique used to solve the problem of spe! mismatch between the processor and peripheral devices like printers, keyboards etc ‘The CPU works at a much faster speed than input/output devices like keyboards or printers. slow 1/O device is inputting or outputting bytes to or from the main memory, the CPU remal large percentage of the input/output time. Until the input/output operation is overs process the next data Spooling ‘Thus wher ford ins Cee] P1-6-10 162 oe womert of commer Slenee spon return tote te i 0 Ha oo ard ik before IS tpaded into the main memory. Similarly, lata that comes from a slow input Short Ona a TA I Seton by te Ch, ae ah merry zerrage medium like a magnetic disk Is ruc utput device. AS hain ma th the righ speed magnetic ask is much fster than that wih te seach | te aoe ticle time considera Mig devices, is reduces bly ou ct tose at vo des te he pte, tendo ia \ tt Use 8 Sed by te CP the operating stem Oper 2 ‘special le calea's | 2s ry cated the spo Sec ‘ne output data to be printed is then | are. PETS es cose ae etry. The Out pe cata for pring. A spec proces Die data stored in the © Fy ae from te dk to the printer Ine with te slower ‘eet | mmory. However a process can be loaded into the | t ro run a program ory IS sufcent ai ead SH eT dom tre eaten | sremory only whe will suffice afore stating execution is smalier than the process ‘ize then the process can never be | / eded nd executed: on in memory 2 aoe rent scheme call this problem. Tt allows the execution of | fon meeGEMT ent ee MAM MET “ ‘techniques the operating ing techniques woore a erent Using SHOPPING oT single lage man memo | a s \ cperting System was inoduced joimly by Microsoft and IBM dun 1981 and hence was als0 | coed g08 was a popular operating SYSteT ‘Used by personal computer US's: DOS is a single-user, in which means that the functions ng Syste I offers a command line Sparacter user interface through which | 06 boots by lading fs BIOS from the system file 10.SYS which in tt Joads the DOS kemel from the | oem fe HSDOS.SYS. The Kernel mr executes the CONFIG SYS file which 's used for configuring the DOS ray opening the COMMAND.COM Tes ‘The Dos | Fr pereing spec functions and loading orp bain fle called the AUTOEXEC.BAT tis a special batch file written In plain saps for various start-up operations that 2 peclants to perform automatically every Une the compute starts the commands given to 005 are in general compute programs. Depending upon the location of the ‘hose are cassfied as Internal and External Pommands. Once DOS has been started up |.6- fhe computer has booted, certain important Commands are automatically loaded into the ‘computer’s memory avaiable for use at all times. These are called he Intemal Commands. The internal commands form a part of the COMMAND.COM program. These command programs are not displayed at the time of tang te fies. Examples of some internal commands 3s (1S, DATE, TIME, DIR, CD, MD, RD, COPY, DEL, RENAME etc eS Extemal commands on the other hand are ‘command pro hat te ont programs that are kept in the disk until th are poate eno oe an external one DOS has to refer to the disk or path where these programs are sored to run these programs. These programs are d ae sed worn ese ogra, Ts splayed at the time of listing the files. DISKCOPY, SYS, FORMAT, XCOPY, MOVE, BACKUP, RESTORE, DELTREE, ATTRIB ete ‘Whenever'a DOS bigeplentee am eve ae COMMAND. COM ches its list to see if the command is an internal 00k for * e command is not 2 program that has the same name and i found will get executed. a 168 P1-6-11 | allows the overcomes {allows ¢ Jed Virtual Memory Eric, a portion of the memory ta high speed | jesattagicl 0 tne main memory. The operating SAS Tres. | \Proceses even. the main memory. A special Process, ‘called | \cemceneitelens the adary storage ard the main memory | | Free main | memory by using | secondary | storage. ino the main m2 as to be faded into Ne TN he entre process, Du te loaded tae | Virtual Memory mn Tsions provided by the basic Kernel of DOS can | Kos, & Internal & External Commands =. Part 4: Chapter Inthe aiphabets ta res OOS; 2 fle name can be up to 8 characters lng and an conan the upper ben e's 25 3 nae manage ace ne ic mt underscore chereSitgle Word, In case two different words have to be used they should be jo, foe ‘Character. 4 fle can alo have an optional extension of up to 3 characters, met ve I ee ‘arious Internal DOS Commands | Aor alscusses the various important and common internal DOS commands used, cts | teers, | arg 1S clear screen command is used to clea all the other commands already typed in | the screen blank and only with the current command Sey ee a= mnmand is used to display or modify the eurrent date. Aer T¥PIN9 the commang, 4 r press Enter to keep the same date. DATE | The DATE cor | Rew date in the format dd-mm- | Output: The current date is: 24-May-09 a Enter the new date: (dd-mm-yy) 1B * TIME en eee Ta ae = | ng, TIME command is used to display or modify the current time. After tying the command, ype yg, Te | time in the format hour-min-sec or press Enter to keep the same time. | atte. cerns Se ee EE | | Output: The current time is: 11:30:14.34 Enter the new time: * OR | The DIR or directory command is used to list all the sub files or sub directories under a given directo | Along with the file name, the date & time of file creation and the size is also displayed. aT. | | Example: Output: Volume in drive C has no label. | Volume Serial Number is 7CB5-93F2 Directory of C: | 42-Jul-07 08:21PM 125 AUTOEXEC.BAT | 09-Jul-08 10:21AM = AVPDOS: 12-Jul-07 08:21PM 138 CONFIG.SYS 16-Feb-08 08:46PM TC 14-Apr-09 10:33PM TEMP 06:22PM 4,377,400 TURBOC.EXE oR 30-Apr-94 3 File(s) 4,377,663 bytes | 3Dir(s) _5,168,078,848 bytes free 08:21PM = 138 CONFIG.SYS Output: 12-Jul-07 The above example shows how a particular file can be searched in a directory using the DIR command. The file name is to be typed along with the DIR command. If the file is present, its name and details will be displayed in the listing. If itis not present then the message "File nat found” is displayed. | The following switches are used with DIR for displaying the directory structure in various ways. P1-6-12 164 qaonemn et comter ove Operating System ee ina wide lst format ~ fora era a pa te foowng " we uaty tas wy name (alphabetic) SY cio (aralns e by extension nabet, & By Gate time (oorion. ee Stones wenn 8 oid a vas per the following sub Sain Cuore fer: \ van spect’ \ s paspiays files Yo" pirectories Read-only files etme Spun Mes © ies ready for archiving \ ue \ = aang wematon om \ es bre (OT the names: rectory Temp under tne C: Arve one PaO ing of the ejayed ina singe seen rectory Musie under the O* drive in both 3 or folder in. 0S. Along with the command, | MKDIR / MO Iso to be typed as: \ DIR or MD : 4 comme make a new nu ecrY and the name ‘of the new directory is al ies called School and Home under the GProg directory located | ited ithin the directory CPrOd- \ That here the MD command Is ex ‘School and Home are automatically created under CProg- ‘To create multiple blank spaces after the MD command. | ‘The above ‘command will perform the same job of creating a folder called School under The ath cave executed from direty under the C: drive. the Grog fer | | \ der in DOS. Along with the \ fed is also to be typed as: | RMDIR / RMDIR or RO MORRO canmand is used to remove or delete a directory oF command, the path i.e. the location and name of the directory to be remov 485 P1-6-13 to 1B ~ comorco ge from one Beh ped as: CD (Directory. Namath enon e chan os CO | The CHDIR or CD command is used tO ‘to move ‘© command, the path and name of the directon | Biampie: cco Temp 2 : drive. Opie: ioaTew Jed Tem The above command will move tothe director myDoes under C: drive, | Output: c:imyDocs\Word> inder the director” | The above command moves to the Word directory command. Simply type the driyg a the CD need to Use as shown belo Ze switch to a diferent drive here ed rnoves tothe AV D | followed by a ‘symbol, The following COM 5 OIE the | Output o> sword to C:\Temp\Program | camybocs| ‘The following command will move the current rectory OM Output: c:\Temp\Program> De ae pare Le. = Fhe following €D command can be uo SS ey want 10 OME ‘ack foe parent retry te hierarchy. The .. é following example wil move the current directory ‘MyDocs\ Ss Output: C:\MyDocs> the root drive from any location. As The CD command can also be used to move Airectiy to he rooriMyDoes\Word to C:\ shown rent dit below, the erate ber es the curr Piieen Output: c> ie = copy COPY | The COPY command is used to copy a file from one location to a different one or make a copy of a file with 2 different name at the same location. The copy command is to be followed by the source file name and path and the destination file name and path as: COPY (Source File] [Target File) The following COPY command can be used to copy the file biodata.doc located under the C: drive to the ‘Temp directory also located under the C: drive. Source te nane ciel Cae Tat epee fe rane Output: ‘\> COPY biodata.doc C:\Tempibiodata.doc 1 file(s) copied. |_ The following COPY command copies the fle progt2.c located under the Temp directory in D: drive to the CProgs directory located under the C: drive. Note that the COPY command can be executed from any location, provided the source and target paths and file names are given, P1-6-14 166 meee apa a rae Toes ‘output: 0 s\Word>O' :\Templprogi2.¢ CACProge\prog12.c i ’ 4 file(s) copied. a" COPY command makes a copy of the file prog12.¢ located under the CProgs dir \ ‘The following pce, but with a afferent fle name (2 ee hacia vite sanarene | . drive in the same ie SCRSRESEBESEE Tn yer mre Bere tie path andifleniame oiforenttarget File name of file copied under the same folder | ‘output: GACOPY ‘cAcProgstprog12.¢ backup.C | 1 file(s) copied. | autoexec.bat at the same place as the | | rowing COPY command simply makes 2 COPY of the file eo 0 forthe ©: drive but witha different fle name ‘OldAuto.bat. source fia nama onty Terpetimeneme only | lifferent parts of the coms mes called device names. Every port ina | Mique narme so that sofware can identiy and luge the ports just as file names. | ve the device name for console Le. Keyboard 21 Monitor, COM1, COM2 ete. (Communications | | CONS 1 et) are for Serial Ports, LPT4, LPT? (ine Printer Port #1, #2) are for Parallel Ports. | command can aso be used with the above device "ores ‘The device name is treated as a file caer ing comand can be used to copy the oaeeeec typed from keyboard to form a file. ‘the input console i.e. the keyboard. ow GON indicates the source of the file as are e 1A p08 refers to di puter with special nat ‘machine has 2 ur ‘The COPY name. Thus Here the device na | command | | az 4 file(s) copied. pressed, 0S wil allow the user to type any text \ keys or F6 key to ‘end the command. The text will | + When the above command line is typed and the enter Key ry from where COPY CON was executed. \ including new line. ‘When typing is over, press the Ctrl+Z be copied to the file MyData.txt and saved under the director ‘te same file can also be displayed onto the screen again by 1516 the COPY and CON combination | but now in the ‘order. When the device name CON is placed as the target, then CON refers to the | mentor a thus the following command will copy Le. display the contents athe file MyData.txt on the | ‘Freon Le. the file will be copied onto the screen. Svan ONS Class 11, Section E ' 4 file(s) copied. : similarly the following command can be used to print the contents of the file M\ printer Connected to the parallel port with the device name LPT ee EMS | Output: C:\>COPY MyData.t LPT 1 file(s) copied. \ eS * RENAME or REN a The RENAME or REN command is used to ret name a file or a directory. The rename | fone by tha path and fleet ae to be renamed and the changed salary eee eee ME [Old Fle_Or Folder. Name) (New. File Or Folder. Name} aa 167 P1-6-15 am 2 Part +: Chapter 6 | The following example wil rename the fe withthe Ae name MyData-O fo 0 De TAME Shura | ‘Od file name to change New le name e a, | The folowing example wil rename the fe wit the fle name Progi?.° 1e NeW NAME Sorting | the file Progt2.c is located under the Temp folder in the D: CNS. Me, | Example: co > | File path and old file nameto change New fle name kup. | The following example wil rename the directory Temp inthe D: drive fo OS | Old directory name to change New directory name Ey eo + DEL and ERASE a ae to be lowed ye FEY an Hey. OEL/ERASE | The DEL command is used to delete a file. The DEL command is | to delete as: DEL (File Path And Name] jsoless.txt. |The following example wil delete the file withthe file name Us | | The following example deletes the file with fle name Progt5.C located under CProgs folder under D: dig “The ERASE command can also be used in place ofthe DEL command to delete 2 fle as shown belo Ge | vou | The VOL command displays the disk or drive space specified. The command is typed as: VOL [Drive vot | The following example will show the volume of the C: drive. | Output: Volume in drive C has no label. Volume Serial Number Is 7CB5-93F2 i, 7 or delete the volume label name of any drive, + LABEL The LABEL command in DOS is used to create, change ‘The command should be typed as: LABEL [Drive_Name] [Label Name] The following example will put the label name Mydisk for the D: drive. | » Various External DOS Commands ‘This section discusses the various important and common external DOS commands used. * DISKCOPY ‘The DISKCOPY command is used to copy the complete contents of one floppy disk to another. disks must be of the same type. The command is to be followed by the source and target drive DISKCOPY two floppy names as: DISKCOPY [Drive1): [Drive2): |The following command will copy the contents of the floppy in drive A: to the floppy in drive B: | (ample: “C:P:DISKCOPY AB: aE na P1-6-16 168 antiments of Computer Sclonce TREE Ts es Oa tee a a in. an easy to read graphical format woh ies ane rectory at the top, followed by the sub and sub-eut dies Se eres The fom ae a de 9002 prverPatn : ee Te it aga egy he ey we sche eee | Move \ OVE ‘ne MOVE command can be used to move a file from one location to another. (Unlike 2 COPY. PY wm ‘moving a file no Copy of the file is Kept in the source folder). It can also be used to rename a direct Iter typing the command name, type the source file name along with the path and then type the destination path. The command is to be typed as: MOVE [Source File} [Target File Destination} ‘The following example will move the file test.doc from the C: drive to the D: drive. Source filename tomove Destination drive folowing example will move the file project.doc from the sub-directory Word under the directory MYDO°® TMipe: drive tothe directory Temp in the D: drive. ote oe ((esainpletJIC:> MOVE C:MyDocs\Wordiprojectdoe_O:\Tem Source directory and fle name tomove Destination directory ‘The following example will move the same file project.dec from the sub-directory Word under MyDoes In the C: drive to the directory Temp in the D: drive, but with the changed file name computer.doc- aaa - ‘Source directory and file name to move " Destination directory with new file name he following example is used to change or rename a directory name from MyDocs to Docuent- (eile OS MOVE W/Does pyeomenk | Original directory name Renamed directory name \e + XCOPY coPY | x ‘he XCOPY command is used to copy files and directory trees from one location t0 anoint \ Tonmand wil copy all the fles and drectores and sub-directories The command ts to be xCOPY (Source Directory] [Target Directory Destination] to | ‘The following example copies the directory structure under €:\MyDocs along with sub-directories and files tO | the D: drive. \ Source directory structure to copy Destination drive \ + ATTRIB \ a The ATTRIB command helps to set the attribute for a file. Different options available with ATTRIB are: +2 Marks as an archive file ie. the file can be edited if required; ~ a removes the attribute | +r Marks the fle read-only i.e. it can be opened but not edited; ~ r removes the attribute | +45. Makes the file a system file ie. for files lke io.sys, msdos.sys etc.; ~ $ removes the attribute +h Makes the fle hidden i.e. itis not displayed during a listing; ~ h removes the attribute ‘The following example will change the attribute of the file MyData.txt to a read-only, archive fll. \ \ aTTRIB BACKUP ‘The following example takes backup of entire D: dive into floppies of drive Bs ‘Sub-directories under the D: dive ao. . & RESTORE NET ~_ ; get back the files, directories and sub-trectorieg RESTORE i NDELETE The following example will undelete i.e. restore the file project.doc from the D: drive. (leample: c-> UNDELETE CimyDocemerdpreectdoe POY: Chapter J ftw example wi reevete rate at fe le MDa. Dy sng * BACKUP ax BACKUP command in DOs i used to take bee @ required number of floppies. It Is not Dackup, To get back the fles ‘the RESTORE command need to in the normal format, the be a ‘Should be typed as: BACKUP. [Source. Drive Path) [Target.Drive_ Path] RRS ‘Certain switches are used to facitate backup. These Include: Used to backup sub-directories wid changed since last backup coples of data, files, to ew the fles ty ene ty Bs a ‘Backs-up files which have been ‘Yesdate —Backs-up only those files that have been modified after the specified date ‘been modified after the specified time ‘Retime ——_Backs-up only those fs that have . The backy p Wingy ‘shoud be flowed bythe rive and path wien as # IR, RESTORE command in 005s used to Se rane backup files and then the taret sve ae: RESTORE [Source.OrWve] [Target Drive] | Certain ‘switches are used to facilitate restore operation. These include: Used to restore sub-directories Prompts for permission to restore Restores only those es that have been last modified on or before the specified date Restores only thse fils that have been last modified on or after the specified date Restores only those fes that have been last modfied on or before the specified time Restores only those fies that have been last modified on or after the specified time Restores only those files that have been modfid since the last backup Restores only those files that are non-existing jin the drive The following example restores all files from B: drive to the D: drive including sub-directories and wit) ask foe permission with a prompt. - (ibieainte: oss ResTORE BI DINO (= UNDELETE ‘The UNDELETE command in DOS is used to restore a deleted file, if possible. The command should te typed as: UNDELETE [Source_Drive Path] Certain switches are used to facilitate backup. These include: /dos Recovers files listed as deleted by MS-DOS Recovers files protected by Delete Tracker Jat /ds Recovers files protected by Delete Sentry ‘CHKDSK The CHKDSK command in DOS checks a disk for errors and displays a status report. The ccommant should be typed as: CHKDSK [Drive Name] P1-6-18 170 Rudiments of Computer Science: operating System" Certain switches are used with this command, These include: | " Fixes errors on the disk n Displays the full path and name of every file on the disk ‘The following example will check the D: drive for errors and fix them if possibt + SCANDISK ‘The SANDISK command is used to check a data disk for logical and phy nid repel Ee yysical errors af the eat Plc of folder onan carocen ithe compar not propery shut down. Te Sa Ulty checks the disk surface for any physical damage. It tries to repair the disk surface et In case it SsCANDISK unable to do so, it marks the damaged area events further a Sa efor err, Te oma + be typed as: SCANDISK [Drive Name] conan shes are used with hs command, These nce: fall Checks and repairs all the drives -—Iautofix Fixes the problems without prompting Jeurface Performs a surface scan after other checks | The following example scans all the drives. = FORMAT ‘The FORMAT command in DOS is used to lay down the pattern of tracks and storage device. Before a secondary storage device can be used in a computer sector | system it must be prepared by 2 process called disk . formatting. When the command to format a disk is given (@9. FORMAT A:), the disk drive's read/write head lays down 3 magnetic pattern on the disk surface. The pattern enables the disk drive to organise and store data properly. | Formatting first divides the surface of a disk into a number of torre concentric circles called tracks. As shown in the igure, the tracks are numbered consecutively from tsefesmost to the innermost. Large capacity disks may contain up to a thousand tracks. Each track is agai | ys anc cute isrided into smler sections called sectors. It's the smallest storage unit with which the disk can | ors {uth se ines are designed to read/write whole sectors at a time. Typically a sector contains 512 bytes. Mer ve tor of a sk has a unique number called the disk address. An OS like DOS again combines © to 64 cago to form a cluster. Each cluster forms the basic unit of memory read/write, The ‘command should be | typed as: FORMAT (Drive Name} Certain switches are used with this command. These include: | FORMAT tv Specifies the volume label Iq Performs a quick format ju Performs an unconditional format | tp Allocates space on the formatted disk for system fles 1s Copies system files to the formatted disk Ie Test clusters that are currently marked as bad | The following example quick formats the D: drive. omeeromto tk | P1-6-19 Part: Chapters £OIT/ EDUN * EDIT and EDLIN The EDIT oF the ED, le. LIN command in DOS Is used to crea ce : to ™mMand can al jecessary data in the te : ‘SO created, should be ype te 0 ‘ MEtent ana Save tee The Tle Dota ret 8 He re pove command, when the text 7, Pigain saved In the Same MANET tO incor Ty the EDLIN is a tine oriented text editor that can be used to create and edit 2 text fi creates a file called Rikayan.txt under the Personal folder in C: drive. The following exam, Pe ' 4:*Science Stream Zz “EXIT | When the command to create the text file is typed and the Enter key is pressed, then the message "New Fie, followed by a * will be displayed. Type "I” beside the * to insert new lines into the file. The Enter key rant Used to create new lines within the file. When finished typing, press the F6 key or Ctri+Z to come out from, the Insert mode. Type EXIT to save the file and exit. To edit the file to add more data to the file, type the same command again and follow the same set of steps. Ge * Wild Card characters * and ? » CARD | Two symbols, called wildcards, allow the user in DOS to specify a group of files. The wild card character ‘+ racters | is used to indicate any group of characters while each ‘?’ indicates a single character. The following COPY command can be used to copy all files with the file extension doc, irrespective of their name, from the C: drive to the Temp directory also located under the C: drive. Example: C:\> COPY *.doo C:Temph gr # The following DEL command can be used to delete all files with the file name Project, irrespective of their extensions, from the Temp directory located under the C: drive. The following DIR command can be used to display all files whose name starts with Prog (like Prog12, Program143 etc.) and which have a single letter extension name (ike .C) from the D: drive. P1-6-20 172 iments f COMPUREE Sclonon cperaino or ‘a eatin’ pend mes ume | C68 qo wat fora command to complete execution before you can give the next command can be Som geyate | Bat" an appcations where such Interaction 1s not required 2s in ‘applications, nto 2 fie | ane cae Processing wher = ral comm Sip tne extension ‘bat’ (for batch) ing whereby DOS allows to group seve mento run the ‘ater has the file enson ‘oa (fr batch). After saving thee, simply type the name of first cleat ‘me following example can be used to create a batch fle called batch.bat in DOS. The file is USEE Np the E using the CLS command and then set the DATE and TIME. Finally the directory ne o'r | Give is displayed in 2 page-wise manner using the DIRIp command. The batch file is created USN | Sotimand as shown below. = REM **** Example of Batch Program **** Output: ECHO OFF aan CLs DATE TIME ECHO Directory Listing of E: Dri PAUSE o DIRIp E:\ In the above batch program the REM command is used to ert 2 comment in the fle. Next ECHO OFF command is id to suppress the display of command names when these gre run. The “@’ symbol Is used to suppress the display of the EHO OFF command itself. The ECHO command is used to Geplay the text following it onto the screen, The PAUSE Gommand is used to pause for a key press. Important DOS commands at a glance ‘pr +a, MyData.doe =r MyData. doe It helps to set or reset the attribute for a file as read conly, archive, hidden or as a system file It i used to take backup copies of one or more files from one disk to another It is used to change from one directory to another in DOS. Along with the command, the path and name of the directory to move to isto be typed It is used to check a disk for errors and displays a \Personal\vetter jersonal\Letter> CD. Ca\> COPY filel-bet backup.dt C:\Personal> COPY file2.c D:\ Cz\> COPY file3.c C:\Personal €:\> COPY * \Personal It's used to copy a file from one location to a different or ‘or make a copy of a file with a different name at the same location. The copy command is to be followed by the source and the destination file names and file paths It Is used to display or modify the current date. After typing the command, type a new date in the format dd-mm-yy or press Enter to keep the same date :\> DATE WE used to delete a file, The del command is to be | CA? DET MR ome\Progs\y.c followed by the path and file name to delete 1 BRASE D:Templpie bmp It is used to list all the files or sub directories under a ‘given directory. Along with the file name, the date & time of file creation and the size of the file is also displayed It is used to copy the complete contents of one floppy disk to another C:\> DISKCOPY A: B: 173 P1-6-21 nory nent > corr EAD EDUN CAR yan ayn SN Sree Once eo Sree: mS Sona he ae dps we Contains the backup fles and then the target ve ome ae emove or delete a arecory of foe! iN | ES 0D rite Be nd to romano ee re nett | ©1> ROC Viale 2s, Ae try te revved #2 > RMDIR Ds Tenp mand ‘used to check the The SCANDISK command in DOS Is ree cick or floppy disks for logical and Physical ‘errors and repair the problems on the disk _ Tis used to display or modify the current time. Aer typing the commend type 2 new time In the format hour: rmin-sec or press Enter to keep the same time Tllows the user to view a listing of files and folders in 67 ‘easy to read graphical format, withthe main directory at the top, followed by the sub and sub-sub directories along Is brehes ae Its used to restore a deleted file, if possible Itis used to display the disk or drive space specified It Is used to copy files and directory trees from one ibcation t another’ The command will copy all the fles and J C:\> XCOPY C:\Temp D:\Home directories and sub-directories under it Two symbols, called wildcards, allow the user in DOS to specify @ groups of files, The wild card character '*’ | C:\> COPY *.doc C:\Temp| indicates any group of characters while ?’ indicates a single | C:\> DIR D:\Prog*.? character 4 ‘Along with the command, i ame of te new erect 4 Tt can be used to move a file from another econ aso be sed to rena y typing the command name, tyPe “in case ethan path. In case | CH\> empet absrea ye seme om [etree TEN | ¢ See — sae ame | CAS RENE ms ; rename a file or a directory: Te 1a > = | TEs used to roma 9 ihe pa a E/E TEN percol ‘cme med BY raed lezrectory name _} :\> REN Personal Hor § | get back the files, yd sub- It is used to ‘back the files, directories 2 ~~ ’ get es feeemmard. THe | > RESTORE B:\ Disp , 1 1 €:\> SCANDISK/all C:\> TREE C:\Personal cis OioaETE Deere €:\> VOL C: Wild Card characters * and? Crees | Microsoft Corporation, co-founded by Bill Gates (picture on the right) it J ight) introduced the first version of the Windows Operating System in 1985. Unlike MS-DOS, Windows used a | GUI and allowed users to run multiple applications at the same time using multitasking | features. It also allowed running of application programs that the available memory using the virtual memory concept. shat lca he P1-6-22 174 Ep eraescecici rusimenta of Computer Science a Brief History of the Windows 08 ‘pe first version was Windows 2.0 that was released in November 1985. This was, 20, 3.0, and 3.2 released in 1992, The next advancement was Windows 95 Foes hed 3 new user Interface and provided various new features, Meroe rel 98. In icrosoft released Windows-Me (Millennium Edition). The next in 2p combine the features of their consumer and business operating systems. This segindows XP, which was avalable in both home and professional versions around 2002 ‘me next release was Windows Vista in 2007. New features Tryndows Vist Included an updated graphical user interface ey visual style called Aero, and a new search called Windows Search. The main objective with congows Vista was to make improvements on the security eatures of the operating system. windows7 was released in 2009. It was basicaly an Wpgrade, designed to work with Vista-compatible ppications wPepardware. Some standard applications that have been anided with prior releases of Microsoft Windows, ke Calendar, Windows Movie Maker, Windows Photo Mery, etc. are not included in Windows7. These are instead Goriable separately free of cost, as part of the Windows Essentials suite. -rne latest operating system released by Microsoft for use with Taine, business desktops, and portable computers til date (as non0i3) is Windows8. It was released in the year 2012. Its shimarly designed for use with mobile devices such 2s Pines, smart phones etc. Windows® features a new touch rer interface with a new Start screen that replaces the Start menu of earlier Windows versions. Differences between DOS and Windows ‘Windows 7 with Start mens ‘Windows 8 with Sta co od ‘DOS has a Character User Interface (CUI) that some | 1. Windows has 2, Graphical ser Interface a | \ Patio find cficu to run as all commands need to be | making teaser oF 9 Tes rh to learn an \ « memorised peter as commands need not be memersee_—_-) |p |_memortsed___— ___|_system as commends neo | Foierent scieen modes used for oraphical and textual | 2. Graphical and text data ie represented under . ota tne sereen mode Sassen | were = _. bien | Wesdee Se ot 1 FI restis the user to eight character fle names with | 3. Tellows flenames 4p © 255 characters long inctuding | > three character extensions bank and certain punctuation marks ____|| | _thvee character extensions ___________}__ vation marks _ Tk can make use of the 32-bit CPUs that are faster In) | “4. OS was mainly designed for use with 16-bit CPUS Senn ‘| ————— = ee DOS was designed to handle programs whose | 5. Windows can run programs with size greater than 640 \| | maximum size was 640 Kb Ko = | TO a Snglewser, single task operating system Le. 2 | 6. Tks mutruser muttask oper system Le. 2 | | ‘ser can run only one program at a time User can run more than one program at atime 7, Programs operating under DOS usually have non- | 7. Windows programs, conten te standard way of Programs, operating, te same set of operations Ike | working. For example a MS Windows ware REOCESE \\ Copy and paste can be done in different ways, making program works similar to the way a MS Windows \| itaifcut for the user spreadsheet program vane mi \ | Use of mouse and drag an drop features are usually | 8. Drag and drop features make certain command | ‘absent. This makes the execution of certain ‘execution easier (like dragging @ file from one folder | | | windows 8 ‘commands lengthy or dificult ea ___to another to copy tt) \ 9. Plug and play options are not available 9. Features plug and play options (from Win-95) \| me ‘ | FOGHER Lniong and Embedding (OLE) feature not | 10. OLE helps to embed the output of an application Into available _| another application with automatic updates \ 175 P1-6-23 Pere: Chapter 8 * Taskbar: At the bottom of the desktop is an area in the form of 2 band, called the Taskbar. On leftmost part of the taskbar Is a button called the Start button (present in all versions Of Windows from Win95, up to Windows?. Not present in Windows8). After one clicks on the Start button, it displays different dropdown lists. One can click on the program icons that are displayed by the dropdown ists and run them. Whenever a program starts, an open window tab for it appears on the Taskbar. When multiple programs are running, one can shift from one program to another by clicking on these buttons on the taskbar. The taskbar also displays the system time and program icons for quick launch of programs by a single click on them. * Window: When a program icon is clicked and the program is loaded into memory, the program appears in a rectangular frame called a Window on the screen. By manipulating these windows on the screen one can work with multiple programs that have been loaded into the memory. = Title Bar: Each window contains a Title Bar across the top that indicates what the window contains. When a particular window is chosen, the title bar of that window gets highlighted. The entire window can be moved by clicking on the title bar and dragging it to any desired location. The title bar also contains three buttons for manipulating the windows. These are the Minimise, Maximise and Close buttons. On clicking the P1-6-24 176 Windows? Desktop Windows XP, My Computer window

You might also like