Download as pdf
Download as pdf
You are on page 1of 42
[ Chapter OPERATING SYSTEM * Whatis an Operating System ? + Services inO.S. . Overview of Windows 98, Windows NT and LINUX . Concepts related to Information Management (only definition) : . File systems, Device drivers and Terminal 1/O . Concepts related to Process Management (only definition) : . Process, concepts of multiprogramming, context switching, process states, priority, multitasking. Concepts related to memory management (only definition) : Memory map of single user computer system, partitions, fixed and variable partitions, paging, segmentation and virtual memory. . GULL Gasic of G.U): . GUI features such as windows, task list, drag, resize, minimize, maximize, close. Access and security aspects of O.S. : . Security threats, attacks on security, computer worms, computer viruses OPERATING SYSTEM. Q.1 — Whatis an Operating System ? Write its function. Cera We Ce vet ‘Ans. : An Operating System is a program, which acts as an interface between the user of computer and the computer hardware. The operating system can be viewed as a set of software programs, normally supplied along with hardware for the effective and easy use of the machine. The main functions of an operating system are : i) The primary aim of the operating’system is to make the hardware convenient to use. ii) To help users to execute programs. iii) To control execution of program to prevent errors and improper use of computer system. iv) To make provision for security of information to users . v) To eliminate duplicate errors by number of programmers in development of complicated routines. vi) "It provides facility to share the same iatdware among the users. vii) Proper scheduling of resources among users. @ scanned with OKEN Scanner -aum v ye surexord yuaraytp 10 aures ayndaxa Aew omy au quasoygrp 4 payeDoI ‘s39sn JO Joquinu e ‘ways4s Bunerado rasnyMu uy ( " L 2 jo seu} Hsuy SE, seven gsavoag uy syTe> wa3sXs ayy ISI] { JUsUIEBEUEYY ssaD0Iq SIUM “faopanp Bupfrom adueyD = (x Hue aw—ID (x crayurod ayy aA0y (TA 8TY 09 raYING Wo BP aT (HA -roygnq 03 apy Woy eIEP PRAY (14 TBR ASTD (A -fropanp eB arojdxq (AT -sasodind aytum/pear soy ayy euadg (tt sfropamp vara — (It ‘ayeaway == (t } awe yyy s9pun papraoad (s1pe2 worsds) s2>1198 uweayshs atp Jo auiog (F "sao1Aap snowea guunup pue aneds Axowiaut pardn200 Savy “loneuHIOFU 0} $52922 200 sunbsBOid {591709 ety Int "y WOR PULIOFUT 0} yey sure SATUS Oe I] (E "WeYR 0} aeds AroUFSUL Supesorfe Aq souopanp pur sary o7uT WOReULOFUT jo vomeZTTesioTay-oSeueUr SAOTATES waysks SsaYY, (Z ‘SoPOPeLIP/Sa[y YO UOHEULIOFUT oA aaouras Jo Aprpour ‘aaatsyer ‘21038 07 ARPOLY Ou sapraoad yuawaSeueyy uoeWosUT (T+ “SUV qr ur syyeo wraysAs au} ISTT quawaseury] uoHeUOsUT SHIeUM 0 Eo 0) sunpuogfe pur sanbruyoay snorrea asn pue Aovjod uoRedore Arowaur aun} Au, ‘suopenop Aowaurype jo ay) yoeN daay juowazeueW Lowa, UF saPa70S OL :WwA —— ~STeyoue raaye oud way) saysyedsip pue way sanpayps 3 “sassaosd ][e JO >Pe sdaay wiaysks Suneiado ase2_yons uy ‘awy v ye surexZord_ yuoIEysIP_2yND9xo ‘Avur speurwszay, WareyIP 72 Pee20]- siasn Jo saquunu ‘swiajshs Suyeredo Jasnyjnur uy “s98s9903d popes Suswasoad Bays Tre Jo speny daay 0} parsamp axe yuawie8eueur ssa20xd apun papraoid so2}795 OuLL :Wa (i -Azopanp Supjiom a8uey> (P) “sayy asop 10 Adod ‘2}212P (2) -saus0}an1p azojdxa 10 sayy uado (@) -sarroparrp 10 sary yva>_(®) __saopaup 30 219 ou Ajy 228 WI sep. paptaosd saaqasas ay], *S9214ap anowea aaron! HIPOU ‘OAdIHDI “a10ys Oy sane} seplaosd quswaseueW, uoReUoyuy + Wi (jan) ro wsasieueyy A20u2IN (a (a) wourasieuryy 850001 « __ (Na) waueseurN F (AD quawadeurn vopeuoyt Ut 1 uy saoqAses SIF SOPIAIP °S'O UL ssapdurexa aatD yy are ytYM = Z 0 (CE) + seore uyeus d0mu SuLMOTIOS 2Uf eu ETE OMT AD ESOD1ATDs o CORT Aaee) 1AI96 S}1 SOPLAIP W9]SAS SUNEIOGO Oy YDIYM Us Sease UTLUE 297) > (Ssonrsaoiaws J ~~ — warshs Sunexodo Teapuapg soyndiuoD Se Cater @ scanned with OKEN Scanner {uonnaxa Supmp sjfeo asamp asn (qv) fe ue sop MOH ¢ pasn stay MOY z [feo wa}sAs e Aq uRIUISTIEUM LO roqutod apy aaoyy - HUT] B aIvAID “2 AY B aSOID “P ATH vuadg > A1opanp areas “q ay & avai} v - juaUESeURYY UOMPUIOYT UT sTTeI WIAIShg —*¢ ssaooid v £vjaq ‘a ssavoid v puadsng « p ssaoo1d v aumsay “9 ssavoid v sp01g “q ssaoord v pray -e - jUoUTABeURYY ssar0Iq UI SIR Wasks -Z ssavord e wioxy £10uraU Jo UMYD B91 o1 ssaooid v 0} Azouraur yo yumyp & ayedoyfe oy, “e - JuAUIEBEURYY ArOWDYA UT seo Wa}SKG — “T -uoponaysuy aSenBuey Aiquiosse u se aiqerrear Aqjeraus8 axe syje> asoy “waysks Sunerado ayy pur ssavoid e waamyag aovyzajur ap saptaoad syje> urayshg - |e) wraishs ureggord UAE ‘suy uaweSeueur uopeunosur pur juaueSeueut ssavoig ‘Juauaseueu Arouraut Joy s{je> wiaysXs omy Aue 4ST] Z [JED waysds siqeyM = 9 -ssanoad e woxy Azowaut jo uMYP 994 OL ssaooid v 0} Arowraut jo YUNYD v aeIoTOL, (1 rome yur seo waysds ayy, (9 “snp aaarype 0} sunpHo$ye pue sanbruypay snouea sasn pur saioijod uoneso|feap /uonesoyfe A1owaw soutwayap “S'O aM ‘SI 40 (G 381] ayy Ajrpow urese pue Aroweur ureur wosy sureZord saaourar yt ‘a}9[duro> paynsaxe st urezBord ayy uy —(F 1 at Sayrpour pue Arouraut ‘ojut wreiord arp speo 3] 381] st YRLM syNsUOD Wyss SuBeiado ayy AZOWUE UF papLo| st urex8ord v azojag ‘uoed0] Azowaw aay 112 jo 1st] sdaay wiajshs Bunerado ayy ‘sip 104 —(E “gol ay 07 payesorre aq pmnoys Azowrow jo your moy pur ayqeprear. st Azowraur ary jo yonur moy yey}, MOU PINoYs at ‘Axourur ut BuIpeo] aroyaq ing —(Z systp wo Azowaur ureur ut gol ay spLo ‘S’O ayp ‘painsaxa aq o7 stole uaymM — (L 2 yf20pun papraoad sastaias ay axe qeym z uoUraBeury Lowey s1eYM sO ssaooid e aye1UaD (MHA ssed0Id v yo Ajoud ay afueYD (4 “ssavoid v Avjaq -ssanoid v puadsng (a -ssavoid e ayeunuz9y, -ssapoud vawinsay ( ssarord e Spo (1 pod v pray 12> wayshs) are juoWaSeULYY ss9I0Iq JUN poplAoid saD1A108 9y, ‘0 zosngjnur pou juaueseuryy ssororg ay_ (fF ‘M'a’D Jo fox}UOD ny ay} Sey a! WeU A9SN YoLD OF uOYSs1duUy UL sOAIR 310s Surop aTryM ~wYIOUL ax AY auo WIL Yrredsip pue UDY) a[npayog ‘sassos0ad pares surez8ord Suruuns je jo yen sdooy "g “OQ ypns Jo uoweseuLyy ew payeorduso> ssaj ase -gQ aasn ayu1s Jo uwiayskg Bunesado @ scanned with OKEN Scanner 14 Operating System face between a process and the operating assembly language instructions, em call provides the inter syst IIy available as System call: eee calls are g system. These Is are used in diff ferent ways aS alls to be made directly from a higher level 2) System call predefined function oF subroutine (a) Some s Janguage progr (b) Some languages (FORTRAN system provides set 0 am uses sequence of s |AP uses system call. Next, re tarly for each and every task, program uses Various sj am may allow system ¢ am. In this, calls are C, PERL ~ allow system ¢ {library routines stem calls during execution. To prompt a fad from the terminal AP uses alls to be made directly 3) An application progr message on the terminal another system call. Simi calls, Q.8 What are the features of Windows 98? Ans. The main features of Windows 98 are as listed below: i) Easier to use : 3) Windows 98 is a single user multitasking ope suter is easier in Windows 98. rating system. 2) Navigating around the comp 3) _Afile can be opened by a single click 4) Windows 98 allows us to use multiple monitors with single computer. 5) New hardware can be easily installed and used without restarting computer. 6) With Windows 98 we can use digital cameras and other digital imaging devices ii) Faster: 1) Windows and programs open faster than in Windows 95. 2) The computer speed and efficiency can be easily improved by simple maintenance. iii) ‘True web integration : 1) Windows 98 can be easily connected to internet, 2) “Web pages can be viewed in any window 3) Using, Microsoft Or E ash ee utlook Express, E-mails and message can be send to internet 4) The internet conferences can also be arranged. iv) More entertaining : 1) Windows 98 su i $98 supports DVD 5 io. Us it 2) ¢ televi 7 am broadcast can also be seen, at are the features of Windows NT70R Bolu *xplain any four features of Windows NT operatin, Ans. : The i (Oct.2002, 2006, 2012, 2013, July 2017) w features of Windows NT are as listed below EUS ENTE @ scanned with OKEN Scanner TPS Computer Science - 1 Ls Operating System i) Windows NT is multitasking, multiuser and multithreading operating system. ii) A user will get faster response eventhough multiple applications are running, iii) Windows NT supports virtual memory management system to allow multiprogramming. iv) Symmetric multiprocessing in windows NT allows it to schedule various tasks on ~ any C.P.U. ina multiprocessor system. v) Windows NT isa 32-bit operating system. vi) Windows NT uses New Technology File Systems (NTFS), which implements fault tolerance, security and has support for very large files. Q.10 What are the features of Linux ? (March 2004,2014, 2019, July 2017, 2018) Ans.: Some of the features of Linux are as given below : (REE i) Linux is a multiuser, operating system with a full set of unix compatible tools. ii) Linux runs on a wide variety of platforms. It was developed exclusively .on PC architecture. iii) It provides as much as functionality from limited resources. It can run on machine having 4MB of RAM. iv) Linux presents standard interfaces to both the programmer and user. v) _ Linux supports a wide base of applications. vi) Linux is free software. Free in the sense that people can copy it, modify it, use it in any manner they want. vii) The file system in LINUX obeys UNIX semantics. Q.11 What are the components of Linux system ? Ans. : The Linux is composed of three main bodies : 1. Kernel : Kernel maintains all important abstractions of the operating system, such as processes and virtual memory. : 2. System libraries : System ‘libraries define a standard set of functions through which applications can interact with the kernel, and which implements much of the OS. functionality. 3. System utilities : These are programs that perform individual, specialised management tasks. Some system utilities may be invoked just once to initialize and configure some aspects of system. Following figure shows various components of Linux system : System User User Compilers Management Processes utility programs programs @ scanned with OKEN Scanner TPS Computer Science «1 ATED TO INFORMATION MANAGEM ted information ie, data or programs is called as file. ch is used to refer that file. [concerts Q.12 What isa file system ? Ans. : 1) 2 ‘ach file has a specific name, wh e ; / 7 ean nient i » of the computer system, the O.S. provides a uniform logical view of information storags / 4) The operating system manages mass storage devices to implement the abstract concept of file. ; 5) The OS. maps files on to physical devices such as tapes or disks. data structures, file system in IM allows user to define files and 6) Using various : directories and allocate /deallocate the disk space to each file. There are two types of file systems : i) Tape - based systems ii) Disk - based systems. i) Tape-based systems : (a) Tape-based systems are simple but inefficient. In these systems, files are stored on to reels of physical tapes. Generally one or (b) more files are stored on to one tape. Tapes are used for transport of data from one computer to another. () ii) Disk - based systems : (a) Each disk is divided into tracks and each track is further divided into number of sectors. ‘Number of tracks and size of sectors is variable. It varies from one drive to another. A disk has a device directory, indicating, which files are on the disk. The directory lists the file name, starting address, file length, type of file, time of creation, and time of last update etc. Q.13 Whata function of file system and device management system? (b) © Ans.: Function of file system are: 1. It allows the user to define files and directories and allocated /deallocate the disk space to each file. 2 It stores data or information. 3. Arrange various file of same type under one directory. 4. Opena file; create a file, delete a directory and set certain access controls on a file. Function of device management or device driver are : 1. Written special subroutine for each I/O device such subroutine is called device driver. 2. It moves data from driver to terminal. 3.__ Block numbers are converted into sector number. 14 is ei : What are the advantages of disk-based systems over tape-based systems ? Advanta; isk-1 ' of disk-based systems over tape - based systems are : )) Finding a file on t e lape-based systems is diffi 5. 3 ile a file can ¢asily be found on a disk-based bi ifficult and time consuming, while a @ scanned with OKEN Scanner TPS Computer Science -I 17 Operating System | ii) In tape-based systems, if a file is to be modified, it requires to copy entire tape whereas in a disk based systems a file can be modified casily, without copying the entire disk. iii) Store large-information in disk-based systems as compared to tape-based systems. iv) Disk-based systems are easier and convenient to use instead of tape-based systems, v) _ Each disk consists of number of blocks, which can be rewritten easily, while we require entire tape to copy, if we have to rewrite something. Q.15 Explain three stages of I/O operations related to disk? OR Explain why user is not allowed to directly interact with the hard disk. Ans.: 1/O operations required to read data from disk. These operations are as follows : To move R/W heads from the current address to the target address three stages are : 1. The time taken to move R/W head in or out to position on the correct track is called seek time. The time taken to wait until the desired sector comes under R/W head as the disk rotates is called latency or rotational delay. 3, The time taken to activate R/W head for appropriate surface and read data is known as transmission data. R/W Head Relational delay Fig. Q.15 Q.16 Explain the file system related to Information Monet with file ine: ns only. Ans. : The file system related to IM allows the user to define files and directories and 1) allocate/deallocate the disk space to each file. 2) A file is a collection of related information. It can be program or data. 3) File operations : The file concept is implemented by the operating system are provided to create, read, write, rewind and delete files. ; (a). Create a file : For creating a file, first whether sufficient space is available for that file is checked. Ifitis available, entry for new file mustbe made in directory. (b) Write to a file : For writing to a file, in which name of Bs Bie is given. Then operating system search for that : . System calls there is command ‘ file in directory entry and writ 4 @ scanned with OKEN Scanner Tl ah PS Computer Science -1 18 Gpsture oe fading @ file, there is a system call in which file name ig g system searches for that file in directory entry and read it earched for appropriate entry and file is reset to (c) Reading a file : For re specified. Then oper n (d) Rewind a file : The directory 6 $ the beginning of file. ) Delete file oo delete a file, directory entry is searched and if file is found, it i d that directory entry now become invalid releases the memory space a ian Q.17 Define a block with reference to Operating System. What are the parameters of a Define a ryata that are concerned with an Operating System. Explain in by ‘Ans.: Definition of block : / ‘a that operating system defines for its convenience. Thus A block is a logical unit of dat system ; block is a contiguous set of bits or bytes that forms an identifiable unit of data. Operating system has following parameters of a block File ID ; ‘The starting position in the file The number of bytes to be ‘read The starting address of memory Where data. is to be read. File ID - It is a letter code.given to each type of data file to make it easier for the operating system to identify the files. 2. The starting position in the file - It is the address of memory location from where file will start. 3, The number of bytes to be read - It is total size of file in bytes. 4, Thestarting address of memory ~ Itis starting address of block. Whenever program read any data the file system translates request into reading one or more sector from disk and instruct device driver to read these sector O.S. keeps all its data structure in terms of block OS. translates a block number into sector number. File system request to read desired blocks. It uses disk space allocation ie. linked list to carry out translation. File system then request device driver to read desired block. DD issues instruction to the controller for the disk to read required blocks. Controller reads data sector by sector and stores it in its own memory until desired block are read in. Q.18 Define a Block of data. State necessary parameters to be provided to O: block of data. ‘Ans. :A block is a physical unit of data on the disk. Block consist of one or more contiguous sector. Parameters to be provided to O.S. to access block of data 1, Sector Number (SN) - Entire disk view as a series of sector from 0 to n as sector number. 2. Relative Byte Number (RBN) - OS. calculate RBN for each record. This is starting byte no. of each record. 3. _ Relative Record. Number (RRN) - OS maintains a field called Cursor to keep track of < one RRN which is incremented after each record is read / written. 7 sical Block Number (PBN) - OS. translate logical block number into Physical Block 5. Physi 5] ane sical Sector Address - While reading a record, if the physical address is maintained in the index. DMS itself 2 . level oP adavees erent access the final address without going to go through various Peers to access a (March 2014) @ scanned with OKEN Scanner TPS Computer Science -1 19 Operating System 6. Logical Block Number (LBN) - File system of OS calculate the Logical Block Number as integer value of RBN /512 7. Logical Address - File System of OS translate logical address into Physical address. 8. FAT (File Allocation Table ) - Before any file is written or read, OS brings the blocks containing FAT entries in memory for future operation. Q.19 Explain the following terms in case of magnetic disk ( Tracks and Sectors (ii) Seek time (ii) Transmission time (ii) Latency time/ Rotational dela ENTE KS re Ans. : i) Tracks and Sectors : Magnetic disk surface is made up of concentric circles called tracks. The number of tracks varies depending on the disk type. A track is further divided into smaller areas called sectors., A sector is a smallest unit of information which can be read from or written to the disk. Sector varies from 32 bytes to 409% bytes and track contains 4 to 32 sectors per track and from 75 to 500 tracks per disk surface. ii) Seek time : The time required for read /write heads to move to the correct track is called as seek time. iii) Transmission time : The time required for activate Read/Write head for appropriate surface and read data is called as transmission time. iv) Latency time/Rotational delay : The time required for requested sector on track to rotate below the head is called as latency time or rotational delay. Q.20 Explain internal and external fragmentation. ‘Ans. : Internal fragmentation : 3 Wastage of memory space within partition is called as internal fragmentation. A file consists of number of blocks. Consider the block size of a O. S is 1024 bytes and a file is of 3499 bytes. ‘Then, when it is loaded in memory for execution it would have allocated 4 blocks. Thus last 597 bytes would be wasted. This is called as internal fragmentation. Larger block size causes more internal fragmentation. External fragmentation : Variable partition suffers from external fragmentation. Suppose a job of 512 bytes is terminated and new job is of 256 bytes is loaded in the partition, then 256 bytes of memory is wasted. This is called as external fragmentation. Q.21 Whatare device drivers? Qemieoone) ‘Ans.: 1) Device drivers are software programs required for each device 2) Each device will require different drivers as per functionality. . 3) A device driver knows how the buffers, flags, register control and status bits should be used for a particular device. : 4) Some device drivers are useful for data conversion. @ scanned with OKEN Scanner Operating System TPS Computer Science - 1 4 device involves complex sequence of device 5) For simply reading a character from was simply used from library bi cat eccetea otek device driver Q.22 What is VDU? Explain t a) Dumb terminal b) Int 7, March 2018; July 2018) Ans. : vy 2 (VDU) or terminal is nothing but a common 1/O medium. terminal I/O hardware + There are generally two parts of i) Input unit eg. keyboard ii) 3) There are two types of terminals : ) Dumb terminal Intelligent terminal. i) Dumb terminal : {@) A dumb terminal consists of a microprocessor on which small programs can run and limited amount of memory. () _Itis responsible for basic I/O operations. (0A dumb terminal does no processing on input characters. ii) Intelligent terminal : (a) Anintelligent termina (©) Italso has more amount of memory. (0 It can carry out some process on input characters also it can process programs independently. Q.23 Explain the use of video RAM. Explain data bytes and attribute oH 2 The video RAM is basically the memory that the terminal hardware itself has. ii) Anytime all characters stored in the video RAM are displayed , i controller using display electronics. pte eee eh ae All particular informations (attributes) are stored in video RAM. Video RAM consists of 2000 databytes (0 to : le 1999) i attribute bytes (0 to 1999) as shown et figure. LSS en omer Attribute Byte 0 | Data Byte 0 | Attribute Byte 1 | Data Byte 1 I has powerful hardware and software than a dumb terminal. Attribute | Data Byte Byte 1999 1999 @ scanned with OKEN Scanner ‘TPS Computer Science - I 1 Operating System ing of 80 characters Attribute Byte ler how the cl vii) underlined, blinking or in reverse video etc. ‘Types of Memory Mapped 1/0 Terminals. Q.24 Explain in briel Ans. : ‘Types of Memory Mapped 1/0 Terminals: ‘Two types of Memory Mapped I/O Terminals; i) Alphanumeric (Character oriented) : Please refer ch1/Q-23/p-1.-10) ii) Graphics (Bit oriented) : 1) For bit oriented color graphics terminals require 24 or 32 for each byte or bit. 2) This increases Video RAM capacity requirement. Q.25 Why keyboard is referred as memory map terminal? Explain the multiple memory location involved in the input-output operations between the keyboard and screen. CEE e Oe) (a) Terminals have a video RAM generally with 2000 data bytes preceded by 2000 corresponding attribute bytes. (b) Anytime, the 2000 characters (25 lines x 80 columns on screen) stored in video RAM are displayed on the screen by the video controller. (c) The video RAM is treated as part of the main memory only. (@) Therefore, for moving any data in, or out of the video RAM, ordinary load or store instructions are sufficient. (c) So, keyboard is referred as memory map terminal. ‘The following multiple memory locations are involved in the input-output operations between the keyboard and screen : Small memory within the keyboard itself : When a character is keyed in, the 8-bit 'ASCII EBCDIC code is generated which is stored temporarily in the memory of the terminal itself. (b) The video-RAM (data and attribute byte) : The ASCII or EBCDIC cod is to move to the video RAM at the corresponding position with appropriate co- ordinates. (The operating system buffers : The operating system has one buffer for and two separate buffers for input and output operations. (a) The V/O area of the application program : When the user data stored in operating system buffer for that terminal is flushed out to the the application program which wants that data. le for the character each terminal hes keying in the data, the I/O area of @ scanned with OKEN Scanner TPS Computer Science -1 ae Operating System CONCEPT RELATED TO PROCESS MANAGEMENT ( Q.26 Whatis a process ? Ans. : Process : EET) rogram under execution, which competes for CPU time and progra i) A process is defined as 2 other resources. compete for computing resources such as CP.U, t " rogram does no! ii) In simple am 7 Pe fas a process does. A program may be present on paper or reside time or memory, : be compiled or tested but it still does not compete for computing on disk. It may ee it is located on the disk and loaded in the main my, ‘a user wants to execute a program, : ed in onary at that time, it becomes a process, because it then compete for C.P.U. time and other resources. i ©27 Define the terms : 1) Context switching 2) Degree of multi iii) programming. Ans. 1) Context switching : / In multiprogramming system, multiple processes are run at the same time such that when process 1 wait for an 1/O, process 2 executes and vice versa. The lost in time, in turning the attention of CPU from one process to another is called as context switching, 2) Degree of multiprogramming : The number of processes running simultaneously and hence competing for CPU is known as degree of multiprogramming. Q.28 Explain context switching at_a example. Ans. Ff i) Multiprogramming is the concept of increasing utilisation of C.P.U. by always having something for C.P.U. to execute. ii) iii), When CPU. switches from one In multiprogramming, C.P.U. can execute two or more processes simultaneously. When Process 1 waits for an external event such as an I/O operation, C.P.U. executes process 2 and vice versa. Process to another the time required fc itching is called as context switching. i ge Context switching Let A and B be the two proces See Processes ready for execution and requires C.P.U, time for @ scanned with OKEN Scanner Operating System ‘TPS Computer Science - 1 1413 Let CPU time be given to proc A, which is having some instructions depending on Process B or on some external event such as an I/O operation. Then, it is the job of operating system to halt the ion of process A and give C.P.U. time for process B. time in turning the attention of C.P.U. from process A to process B is known vitching, ntext switching the status of C.P.U, registers and flags of the old process are ed in memory // A. CPP # include # include “Bh” void main () int a= 10, b = 20; cout << add (a,b); } //B.h 5 # include int add (int x, int y) return (x+y); } Here A and B are the two processes, where process A is depending on B. When process A is being executed, CPU executes instructions one by one. When it comes to the instruction cout < [Data area ° Up T]), 700 Segment 2) 297 aS MMMM 5) Segments ae / Segment # Limit Base il 1400 o ine 3200 £ 400 3400 2 300 2900, 3400 3 200) ae 3800 ‘Segment map table Q.52 Differentiate between Paging and Segmentation. Paging Segmentation __ _| : aaa a jhysical in nature. Segments are logical. divisio 1. __ | Pages are physi Semen a8 . ize. - Segments are of variable s! 2, _ | Pages are of fixed. size. -. @ scanned with OKEN Scanner Operating Sg, 1-26 ‘TPS Computer Science -1 Segmentation The segment table has a separate gy for each segment in physical iment it ength of that segments, "°Y aging, logical memory is In segmentation main progam : anes ae ke Tea atp poupeu sna UI :puaddy (1) powjour umoUuy [om a4 are EU, # “SUV -gureaBoid payoyye' expr 4q 5 Trae Derjow uasaysyp ayn ave yeu 0 °O. “gnara asodand yesousy (4) snata oypads apd (M2) snqA 103238 3004, @ - gurexBoxd rojo 359su Ue SI snata sossasoxd pueuntoD (42) grata yuapisar row ( woqoq waa sasnata yo sad any 278 279K $ -soptsax snata ay az04oe 30 S197 HOP 12H NO paseq srsnuraso woReouisseD> ULF -ejep se fom se apo9 ydns109 We? IL “uraysAs axp 0} WITeY{ }AzTP SOsTe STHIA yanduooy _Auepuadapur 328 70u Te AT FIRST {aq vseaSoud ajopdusoo © Ou St STHE8 yandwooy 7 -surei8oid 10170 rama st yi “ureatond 30 Hed © SSA yandwooy : :suy go vonUayUT swap AEM UH! Sunoayut -pagyssep axe Kay 4 snaya soyndunoo © st eum _ 6970 r SnOHEA ES ~uraysAs WORRDTUNUTOD zea pue Aynoes Suons 44 poqusnard 2q wes WHOM W guzom yourede spren ayes 6 198 G pry uo St aip uo syuod »payp SnoH a gt wou Syz0aNau ut s02eId TRO suzom aug jo sa¥do> rez2808 24H PINS yp sy ssouppe §,9POU auO JF “05, SPOR reo sat satdo> zsn{ a “quun wom ap jl’ oF go azoul 340 248019 30U SOP 1! SHEED ITN 30 aza4p 1S uasepowul suo MNT “L Apeaaye s1251! J° doo v s04yaya SYP Tt apou e Sunpea Ye -sagsauppe aso Te 0} yjasyt yo Adoo & spuas ‘SMD utsn pur 3 fo} $5098 193 WHOM ayy, HOMIE aU ‘) sassappe pur soweu aul guyequo> PRIM Sueur, do. dqyenst waos zaydwo V9 uo sourypeur ajqeyoeay ut J ® surejureus ysoayou wo apoy WPA syromjau © UO oe jan ayes 01 S22}208 SWAP 31 ‘OSEICTS suvn sv ypns saosnosa 40] Suns Agosouy ‘speazds ysnlay_—“S yop xo suressoud x04r0 sek YOU S20P wiom zoynduro e TENS. : woperedo Jo apow. stp 40 Ayoedeo uo! ‘ua, ss Superodo 9e-1 ]- asuapg 1indwod sdb @ scanned with OKEN Scanner : -sasnuta quazaytp Jo uoqueasad yuanbasqns sniy pure ‘uonooiap ut djay ose surexBoxd Sutroyuows yo Buruuny pue sdn-yoeq wonbasy ‘aremyos eBay 20. ajqerjanum ‘eax5 dn Buppid’ mmoge jryese> AfouTaNXe 2q PHRoys BUD “~¢ “soomos 0 soi0ys alqefax Wosy axemyos Jo sardoo yeSaq ‘TeDyjo Ang ysnur sasn snp 10g 7 ssosnata quaaard oy st Kem 359q au) au ‘UoRDaRe [eIIA Jaye (saA0DaI) BJEP ayy amd youu Jas) “T :uonuanard snza (111) -ajqissodun ysourye st eyep Jo Azaaozar uayy veep paSeurep Apearye sey snuza ayy 31 “Ng “WY SBAOUTAT JI ‘UOHDA}p UO “sasnatA umowy jo suayed ayy 105 ysxp ayy sueds urexBord JeaourOr sMAIA ase sn UT *¢ -paporpaid aq ueo apoo uy wiayed 31q ‘SOSMITA DUIOS 10y JOABMOH] - "Z “pajongysuoo aze Aaup yorya wim Aqanvasd aug pue sosnata aup jo Ayor|dnynut ap oy anp aureun 0} yInsysIp AGA st wresBord jeaourar stina pazyeseues YT +yeaouray snatA (11) -xoreyeq snoroidsns Aue ysure8e Surpren8 305 suoqerado Q/] pue Axouraut ureyi90 souOUT AjsnonuquOD pue ArouUt ayy UT apIsax surexBoid owOog —*E “snara sayeOIpuL aT UT YPIeUISHIN Y “apy Yea UO ums ypayp e suTEUTeUT WeIBOId YLT “sary Areurg aup jo AsSayut ayp syseup ures8oxd uou>aqap sara e ‘ATPUON —“T . FuonPayap smatA (1) :suy PROS VT) “sarydosopryd uoqueaaid pur [exouray ‘woHDa}ap snatA ssn2siq 72 °O @ scanned with OKEN Scanner ‘Waly pay] ue SuTPeUT ay uO sureIBxd ayo 0} peaids 0} 31 smorye yoryM ‘SamMDaxa ose snuta axp ‘urexBord ysoy ayy ‘aT GYM ayy 20 aure ayy SugNDaxa JOY “ayes UADseU v UI aq O} pres aq UeD sua axp ‘ABeIS SMP IW 9 -aurypew ayy oyuo 71 SutAdo> saye 3 Sujsn syejs vay pue 7 sazmboe sasn ayy ‘aoud ap pu spuayuoo sit Aq padway : -aBxeyp Jo ary adoad 0} panquystp $131 10 ways4s p1vog upazing ayqnd ayy uo paysyqnd uayp st wesBord sm, “8 ayp Uo zydod AraA are sasnata se ‘SOC-SW JpuN padojaaap stat ‘AqTeIHGKL—*E FUT pappuaquia apoo [esta autos sey wesBord sm “19ABMOH -“Aqygn 10 aureB poo8 e se yons wreBord jnyasn 10 Sunsazojur ssonposd uosiad sty] TZ “yy 4va1q 01 Japs0 Ut [fam As9A Wasks SuNeIado ain smowy oy osiad 1yStIq Azan v aq 01 sey snata v Jo adojaaap ayy ‘AqpeutoNy “sAem jo zaquinu v UI SYIOM SMULA YT -suy _soyerodo snuta e Ayjexouad MoH LO ‘ureaBoid feusiou jo uoniod papuodde uv se 9 pIno> ypryM ‘apoo 1940 aos ayndaxa oy paueyD s| LIBoId v Jo MOY JONUOD [eULIOL aU, “sosnata payeoystydos jo s1opne ayy 4q paXojdwo yoeoudde paoueape we st st w9}shg Sunesdo “et 1-38 ‘TPS Computer Science -I Operating System Q.73 Differentiate between computer worms and computer viruses Ans.: Computer worms : i) computer worm is a complete program. ii) A computer worm can act independently. iii) _ Generally it do not cause direct harm to the computer system. iv) _ It just goes on spreading on to network and consumes network resources to a large extent. : Computer viruses : i) Acomputer virus is not a complete program, but a part of program. ii) A computer virus can not act independently. iii) It causes direct harm to the computer system. It has been written with clear intention 9 infecting others. iv) A computer virus corrupts code and data. Q.74 What is the difference between a Worm and a Virus ? Explain how these can by prevented. Ans.: Difference between a Worm and a Virus : Refer Q. No. 73. 1) — Worm Prevention : A worm can be prevented by strong and various check points or communication system. 2) Virus Prevention : (a) Users cannot cure the data after viral affection. Hence the best way is to preven viruses. (b) For this user must buy official, legal copies of software from reliable stores 0 sources. (©) One should be extremely careful about picking up free unreliable or illega software. (@) Frequent back-ups and running of monitoring programs also help in detection, an. thus subsequent prevention of different viruses. Q.75 Select the correct alternative and rewrite the following. 1 Operating system is —— 1) hardware 2) _ software 3) inputdevice 4) output device Ans.: (2) Software PROnme 2, ——~is service in operating system. 1) Information management _ 2) Process 3) GUL 4) None of these Ans.: (1) Information management 3. Windows NT is — operating system. 1) Single user multitasking 2) Multiuser multitasking 3) Time sharing 4) None of these Ans. : (2) Multiuser multitasking @ scanned with OKEN Scanner

You might also like