OperatingSystem2024 (1).pdf
Document Details
Uploaded by SuperiorPointOfView
Full Transcript
Chapter 1 - (Paper I) Operating System 12th Computer Science Maharashtra Board.......... "'-.. Distribution of Marks~ Questiol1wise and Topicwise -1 Mark :3Mark - 4·Mark...
Chapter 1 - (Paper I) Operating System 12th Computer Science Maharashtra Board.......... "'-.. Distribution of Marks~ Questiol1wise and Topicwise -1 Mark :3Mark - 4·Mark i - 5-Mark. Total 1. -. Question_.- _· Questi.on.- -_--:Question.. -_ Question _ Marks. Sr. Nam:e of.Topic. - :.. No... Nos. -Total -Nos. Total ' _-· No's~ - Total Nos. Tot~ ". ·-1.·. 1. ; 4: ' 2 - - ·s - - - · 21~.. '. 1- ·Oper~ting Systems.. ·12. - -. - -.. 2 Data.Structures.1.. -1- 3·._.9.· ·2 8 18-. - - '.. 3·· C++ Progranunirtg ·_ · _..- 1.. 1... ·4 12 2.... 8.. 4.... I.. -.20. 41.. _· 3. 4 HTML - -. -.. 2 10 14 - 1- - ·- _ l -.-. 1.. -.. -.. - 5 Total -. ,. 4.. 4 12 36 -.-6 ,. 24 - -.-6 -.30.. 94 C. - -. Q1. What is an Operating System? Write its function. 1. An Operating System is a program, which acts as an interface between the user of a computer and the computer hardware. 2. The purpose of an operating system is to provide an environment in which a user may execute programs. 3. The primary goal of an operating system is thus to make the computer system convenient to use. 4. A secondary goal is to use the computer hardware in an efficient manner. 5. 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: 1. The primary aim of the operating system is to make the hardware convenient to use. 2. To help users to execute programs 3. To control the execution of programs to prevent errors and improper use of computer systems 4. To make provisions for users to eliminate duplicate errors by several programmers in developing complicated routines. 5. It provides a facility to share the same hardware among the users. 6. Proper scheduling of resources among users. Computer System can be roughly divided into four components. Q.8 What are the features of Windows 98 ? The main features of Windows98 are as listed below: I) Easier to use : 1) Windows 98 is a single-user multitasking operating system. 2) Navigating the computer is easier in Windows 98. 3) A file can be opened with a single click. 4) Windows 98 allows us to use multiple monitors with a single computer. 5) New hardware can be easily installed and used without restarting the computer. 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 the internet. 2) Web pages can be viewed in any window. 3) Using Microsoft Outlook Express, E-mails and messages can be sent to internet newsgroups. 4) Internet conferences can also be arranged. IV) More entertaining: 1) Windows 98 supports DVD and digital audio. Users can play high- quality digital movies and audio on the computer. 2) The television broadcast can also be seen. Q.9 What are the features of Windows NT? OR Explain any four features of the Windows NT operating system. The features of Windows NT are listed below: 1) Windows NT is a multitasking, multiuser and multithreading operating system. 2) A user will get a faster response even though multiple applications are running. 3) Windows NT supports a virtual memory management system to allow multiprogramming 4) In Windows NT, symmetric multiprocessing means that the system can manage different tasks by using any of the CPUs available in a computer that has more than one processor. 5) Windows NT is a 32-bit operating system. 6) Windows NT uses New Technology File Systems (NTFS), which implement fault tolerance, security and has support for very large files Q.10 What are the features of Linux? Some of the features of Linux are as given below: Multiuser Support: Many people can use Linux at the same time, each with their own settings and files. Runs on Many Devices: Linux is very flexible and can work on a broad range of machines, from PCs to other types of hardware. Efficient: Linux is designed to do a lot with a little, meaning it doesn't need much power or memory to run well. It can even work on older computers with as little as 4MB of RAM. User and Programmer Friendly: Linux offers a consistent way for both users and developers to interact with the system, making it easier to use and program. Q.10 What are the features of Linux? Wide Range of Applications: There's a large variety of software available for Linux, covering almost any task you might want to do. Open and Free: Linux is completely free to use, share, and modify. You can tweak content or use it as is, without worrying about licensing fees. Unix-Like File System: The way files and directories are organized and managed in Linux follows the rules and structure familiar to Unix systems, which is efficient and well-understood by many users. Q.2 Which are the three main areas in which the operating system divides its services? Give examples The O.S. divides its services in the following three main areas: i. Information Management (IM) ii. Process Management (PM) iii. Memory Management (MM) 1. Information management (IM): 1. Information management (IM) refers to a set of services used for storing, retrieving, modifying or removing information on various devices. 2. This system services the organization of information in terms of the sectors to various files, information and driving various devices. Some of the system calls in IM are listed below: 1. Create a file. 2. Create a directory. 3. Open a file (for reading, write or both), 4. Close a file. 5. Read data from file to buffer. 6. Write data from buffer to file. 7. Move the file pointer. 8. Read and return the file’s status. 9. Create a link. 10. Change the working directory. ii) Process management (PM): 1. In multi user operating system, a number of users located at different terminals run the same or different programs. 2. A computer has only one CPU and it can execute only one instruction belonging to any one of all these programs. 3. In such a case, the operating system has to keep track of all running programs, called as processes. 4. Operating system has to schedule all processes and will have to dispatch them (i.e. run or execute) one after the other. 5. While doing so, it gives an impression to user that he has the full control of the CPU. ii) Process management (PM): Some of the system calls in PM are listed below: 1. Create a child process identical to the parent. 2. Wait for a child process to terminate. 3. Terminate a process. 4. Change the priority of a process. 5. Block a process. 6. Ready a process. 6. Dispatch a process. 7. Suspend a process. 8. Resume a process. 9. Delay a process. iii) Memory management (MM): 1. The services provided under memory management are directed to keeping track of memory and allocating/deallocating it to various processes. 2. The operating system keeps a list of free memory locations. 3. Before a program is loaded in the memory from the disk, the MM consults this free list, allocates the memory to the process and updates the list of free memory. 4. The memory allocated to process depends on the program size. System calls in Memory Management - a) To allocate a chunk of memory to a process b) free chunk of memory from a process Q.13 What is a system Call ? List any two system calls for memory management. Process management and information management. System Call - System calls provide the interface between a process and the operating system. These calls are generally available as assembly language instruction. 1. System calls in Information Management - a) Create a file b) Create a directory c) Open a file d) Close a file e) Create a link f) Move file pointer 2. System calls in Process Management - a) Read a process b) Block a process c) Resume a process d) Suspend a process e) Delay a process 3. System calls in Memory Management - a) To allocate a chunk of memory to a process b) free chunk of memory from a process Q. 12 What is a file system? A file system is a way that computers organize and keep track of files and folders. Think of it like a filing cabinet where each drawer can hold many folders, and each folder can hold many files. 1. A file is just a bunch of information or a program that has a name so you can find it easily. 2. The operating system (OS) is like a librarian that helps you find and organize your files in a way that makes sense, so you don't have to worry about where they actually sit on your computer's hard drive or a USB stic. 3. The O.S. maps files on to physical devices such as tapes or disks. 4. The file system comes with tools that let you make new files and folders, and decide how much space on your hard drive you want to give them. It's like having a set of drawers and labels to help keep your files organized. Q. 12 What is a file system? There are two types of file systems: 1. Tape-based systems 2. Disk - based systems. Q. 12 What is a file system? 1. Tape-based systems: a) Tape-based systems are simple but inefficient. b) In these systems, files are stored onto reels of physical tapes. c) Generally one or more files are stored on to one tape. d) Tapes are used for transport of data from one computer to another. 2. Disk-based systems: a) The problem with the table-based systems is resolved with disk-based systems. b) In disk-based systems, a disk is used. c) Each disk is divided into tracks and each track is further divided into a number of sectors. d) The number of tracks and the size of sectors are variable. It varies from one drive to another. e) A disk has a device directory, indicating which files are on the disk. f) The directory lists the file name, starting address, file length, type of file, time of creation, and time of last update etc. Q.19 Explain the following terms in case of magnetic disk: i. Tracks and Sectors ii. Seek time iii. Transmission time iv. Latency time/ Rotational delay i) Tracks and Sectors: Magnetic disk surface is made up of concentric circles called tracks. 1. The number of tracks varies depending on the disk type. 2. A track is further divided into smaller areas called sectors. 3. A sector is a smallest unit of information which can be read from or written to the disk. 4. Sector varies from 32 bytes to 4096 bytes and track contains 4 to 32 sectors per track and from 75 to 500 tracks per disk surface. ii) Seek time: 1. The time required for read/write heads to move to the correct track is called seek time. iii) Transmission time: 1. The time required to activate Read/Write head for appropriate surface and read data is called transmission time. iv) Latency time/Rotational delay: 1. The time required for a requested sector on track to rotation below the head is called latency time or rotational delay. Q. 21 What are device drivers? Device drivers are like special helpers that allow your computer to communicate with the hardware devices it's connected to, such as printers, keyboards, and webcams. Each device needs its own specific driver because each one works differently. Think of a device driver as a translator between your computer and a device. It knows exactly how to send and receive messages to and from the device, making sure the computer understands what the device is saying and vice versa. Q. 21 What are device drivers? Some device drivers also help change the data from one form to another so the computer and the device can understand each other better. Instead of having to write new code every time you want to talk to a device, you can just use the right driver, kind of like picking the right app to do a job on your phone. This makes using all sorts of devices with your computer much easier. Q. 22 What is VDU? Explain the following terms: a) Dumb terminal b) Intelligent terminal 1. A visual display unit (VDU) or terminal is nothing but a common I/O medium. 2. There are generally two parts of terminal I/O hardware: i. Input unit e.g. keyboard ii. Output unit e.g. screen 3) There are two types of terminals: I) Dumb terminal II) Intelligent terminal. i) Dumb terminal: 1. A dumb terminal consists of a microprocessor on which small programs can run and a limited amount of memory. 2. It is responsible for basic I/O operations. 3. A dumb terminal does no processing on input characters. ii) Intelligent terminal: An intelligent terminal has powerful hardware and software than a dumb terminal. 1. It also has more memory. 2. It can carry out some process on input characters also it can process programs Independently. Q.29 Explain Running, Ready and Blocked process states in process management. OR Discuss various process states with examples. In order to manage switching between processes, the operating system defines three basic process states, which are as given below. i) Running state: 1. There is only one one process, which is executed C.P.U at any given moment. 2. This process is called a running process. 3. In multiprocessor systems, with multiple C.P.Us, there are many running processes at a given moment. The operating system keeps track of all of them. ii)Ready state: 1. The process, which is not waiting for an external event such as an I/O operation, but which is not running, is said to be in ready state. 2. Actually, a process in ready state could have been running. 3. But the fact that there is only one C.P.U., which is executing some other process, while this process is waiting for C.P.Us attention towards it. iii) Blocked state: When a process is waiting for an external event such as an I/O operation, the process is said to be in a blocked state. 1. The major difference between blocked and ready process is that blocked process can not be directly scheduled even if CPU is free, whereas a ready process can be scheduled if the C.P.U. is free. Q.30 What is process scheduling? Explain scheduling objectives. 1. In a Multiuser Operating System, a number of programs are running simultaneously. and these are called processes. 2. In this case the O.S. has to keep track of all these processes and will have to dispatch them one after another. This is known as process scheduling. 3. While scheduling various processes, there are many objectives for the operating system. 4. Some of these objectives conflict with each other. Therefore, the O.S. designers have to choose a set of objectives to be achieved. Some of these objectives are as listed below: i. Fairness ii. Good throughput iii. Good CPU utilization iv. Low turnaround time v. Low waiting time vi. Good response time. i. Fairness refers to being fair to every user in terms of C.P.U. time ii. Throughput refers to the total productive work done by all the users put together. iii. CPU utilization is the fraction of the time that the CPU is busy. iv. Turnaround time is the elapsed time between the time a program or job is submitted and the time when it is completed. v. Waiting time is the time a job spends waiting in the queue of the newly admitted processes for the operating system to allocate resources to it before commencing its execution. vi. Response time is the time slice for responding to a question or an event. It depends on the degree of multiprogramming, the efficiency of the hardware along with the O.S. and the policy of the O.S. to allocate the resources. Q.31 Explain the following terms in case of process scheduling : (a) Turnaround time (b) Waiting time (b) Terminal time (d) Event resresponseponse time 1) Turnaround time: Turnaround time is the elapsed time between the time a program or a job is submitted and the time when it is completed. 2) Waiting time: Waiting time is the time a job spends waiting in the queue of the newly admitted processes for the operating system to allocate resources to it before commencing its execution. (3) Terminal response time: In the Time-sharing system, Terminal response time is the time to respond with an answer or result to a question and it depends on degree of multiprogramming, the efficiency of hardware with OS and policy of OS to allocate resources. (4) Event response time: In the real-time system, event response time is the time to respond with an event. Q. 35 With reference to process management explain the terms: I. External priority II. Internal priority III. Purchased priority IV. Time slice (i) External Priority: a) An external priority is specified by the user externally generally at the time of initiating the process. b) In many cases, the operating system allows the user to change its priority externally even during its execution. c) If the user does not specify any external priority at all, the operating system assumes a certain priority, called the default priority. d) But when an urgent job needs to be done, the system manager permits the process to be created with a higher priority. (ii) Purchase priority: a) This priority is used in some data centre situations where each user pays for the time used. b) Higher priority processes are charged at a higher rate to prevent each user from firing his job at the highest priority. This is known as scheme of purchased priority c) Operating system keeps track of the time used by each process and the priority at which it was used. (iii) Internal priority: 1. The concept of internal priority is used by scheduling algorithms. 2. They base their calculations on the current state of the process e.g. each user, while firing a process, can be forced to specify the expected time that the process is likely to take for completion. 3. The operating system can then set internal priority, which is highest for the shortest job (SJF Le shortest job first algorithm), so that at only a little extra cost to a large job, many short jobs will complete. (3) This has two advantages: a) If short jobs are finished faster, the number of processes competing for C.P.U. will be decreased. b) The number of satisfied users will increase. (4) However if a stream of short jobs keeps coming on, an important large job may suffer from indefinite postponement. To avoid this, set higher external priority to important large jobs. (iv) Time slice: a) Each process is normally given a certain time to run irrespective of its importance. This is known as Time slice. b) Time slice given to each process so that a process does not use the CPU indefinitely. Q39 Explain multi user and time sharing operating systems. In computing, time-sharing is the sharing of a computing resource among many users by means of multiprogramming and multitasking Time-sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor’s time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is that in case of multiprogrammed batch systems the objective is to maximize processor use, whereas in Time-Sharing Systems the objective is to minimize response time. Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in transaction processing, processors execute each user program in a short burst or quantum of computation. That is if n users are present, each user can get time quantum. When the user submits the command, the response time is in a few seconds at most. The operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of the time. Computer systems that were designed primarily as batch systems have been modified to time-sharing systems. Advantages of Time Sharing operating systems are following i. Provide advantage of quick response. ii. Avoids duplication of software. iii. Reduces CPU idle time. Disadvantages of Time Sharing operating systems are as follows. i. Problem of reliability. ii. Question of security and integrity of user programs and data. iii. Problem of data communication. Q.42 What functions are performed by memory management of operating systems ? State any four memory management systems. 1) In general, the memory management modules performs following functions: a) To keep track of all memory locations free or allocated and if allocated, to which process and how much. b) To decide memory allocation policy i.e. which process should get how much memory. c) when and where. d) To use various techniques and algorithms to allocate or deallocate memory locations. Normally, this is achieved with the help of some special hardware. 2) The following are the memory management systems: A) Contiguous, Real Memory Management System: a) Single contiguous b) Fixed partitioned c) Variable partitioned B) Non-contiguous, Real Memory Management System: a) Paging b) Segmentation c) Combined C) Non-contiguous, Virtual Memory Management System: a) Virtual memory Q. 43 Explain memory map of single user operating system. Free memory Process Command interpreter Kernel Memory map of single user OS 1) The operating system like MS-DOS is single user O.S. 2) The memory map of such operating systems consists of program to be executed i.e. process, free memory available, command interpreter and kernel. (3) The command interpreter of the single user operating system is invoked when the computer is started. (4) This O.S. loads a program to be executed in main memory and assigns as much memory as possible to it. It then sets the instruction pointer and executes the program. (5) If the program is terminated, then it is removed from memory. (6) The kernel of such O.S. provides basic operating systems services, while the command interpreter interprets the commands. Q.44 What is partitioning? Explain fixed and variable partitioning. 1. Certain operating systems use partitioned memory management to allow multiprogramming. 2. Partitioning means dividing main memory into various sections. 3. These sections are called partitions. There are two types of partitions : I) Fixed partitions II) Variable partitions I) Fixed partitions (Static Partition): 1) In fixed partitioning, partitions could be of different sizes. But once decided, their size can not be changed. 2) In this method partitions are fixed at the time of system generation. At this time, system manager has to declare the partition time. 3) Fixed partitions are also called static partitions. On declaring fixed partitions, the operating system creates Partition Description Table (PDT). II) Variable partitioning: 1) In variable partitioning, the number of partitions and their sizes are variable. 2) They are not defined at the time of system generation. 3) These partitions are created by the operating system at run time they differ in size. 4) The procedure to be followed for memory allocation is nearly same as that in case of fixed partitions. 5) At any time, any partition may be free or allocated to some process. Also, in variable partitioning, the starting address of the partition is not fixed. Q. 20 Explain internal and external fragmentation. Internal fragmentation: 1. Wastage of memory space within partitions is called internal fragmentation. 2. A file consists of a number of blocks. Consider the block size of a O. S is 1024 bytes and a file is 3499 bytes. 3. Then, when it is loaded in memory for execution it would have allocated 4 blocks. 4. Thus the last 597 bytes would be wasted. 5. This is called internal fragmentation. 6. Larger block size causes more internal fragmentation. 1024 1024 1024 427 597 1024 1024 1024 1024 External fragmentation : 1. Variable partitions suffer from external fragmentation. 2. Suppose a job of 512 bytes is terminated and a new job of 256 bytes is loaded in the partition, then 256 bytes of memory is wasted. This is called external fragmentation. Q.47 State the various steps involved in the allocation of a partition in case of fixed partition memory management. (March 2002, 2005, 2006, 2007, 2017/Oct. 2003,10,12 When a process is to be allocated a partition, following take place : i. The long term process scheduler of the PM decides which process to be brought into the memory. ii. It then finds out the size of the program to be loaded by consulting the IM portion of the O.S. The compiler keeps the size of the program in the header of the executable file. iii. Then makes a request to the partition allocation routine of the MM to allocate a free partition, with the appropriate size. The partition description table (PDT) is useful for this procedure. iv) With the help of the IM module it now loads the binary program in the allocated partition. v) It then makes an entry of the partition ID in the PCB (process control block) before the PCB is linked to the chain of ready processes by using the PM module of the operating system. vi) The routine in the MM now redefines the partition description table and marks the status of that partition as allocated. (ALLC) vii) The PM eventually schedules this process. A partition description table (PDT) is shown in Fig. below: What is paging? Explain Page Map Table (PMT)..' Fraine number 0 i ' PageO I 1-.,-r Page 0...I. 1 1· I o I. 2 Page 1 I. 11 4 I. 3. ;.. ,.. Page2 , I~. Page2 I 21 3 I 4 Page 1-. I 3 ·-71 5 Page3 I Page table 6 ,,. Logical Ill.en1.ory 7 Page3. ,,. Physicalmemory --_Fig. 1.16··: P~ging Model. What is paging ? Explain Page Map Table (PMT). Partitions suffer from external fragmentation because available memory is not contiguous. Paging permits a program's memory to be non-contiguous allowing a program to be allocated physical memory wherever it is available. Physical memory is broken into fixed-size blocks called Page Frames. Logical memory is also broken into blocks of the same size called Pages. When a program is to be executed its pages are loaded into any available frames and the page map tables are defined to translate from user pages to memory frames: The page size is defined by hardware. It is typically the power of 2. Q.53 Explain the concept of virtual memory in brief. 1) Virtual memory is an attempt, which makes the execution of the processes possible, which may be completely not in the main memory. Some part of the process may be on disk. 2) The MM techniques are simple to implement but the major drawback is that if the physical memory is limited then the number of processes it can hold at any time i.e. degree of multiprogramming reduces. This concept of virtual memory is introduced. 3) The main advantage of virtual memory is that the user can execute programs, whose size may be greater than the physical memory. (4) Virtual memory is difficult to implement. It can be implemented by paging, segmentation or combined schemes. Most virtual memory systems are implemented by using paging. (5) A program consists of a number of logical or virtual pages. (6) To start execution of a program, some of the pages are loaded into specific page frames. (7) If a page is not loaded into memory and a location from that page is referenced, at that time a page fault arises. When a page fault arises the O.S. loads the referenced page in memory from disk. (8) Generally virtual memory is related to following concepts: (i) Locality of reference: In locality of reference it is forecast whether a page is likely to be referenced in near future or not depending on its behavior in past and hence may be removed from memory. (ii) Page fault: When a page, which is not in main memory is referenced, then a page arises. At this time the O.S loads that page in main memory. (iii) Demand paging: In demand paging, a page is loaded in memory, only when it is demanded. (iv) Working set: The set of pages in physical memory which are actively referred to at any fault moment is called a working set. The working set helps to decide page replacement policy. (v) Page replacement policy: If there is no page frame in main memory to accommodate a new page, the O.S. overwrites some existing pages. These pages are determined by page replacement policy. (vi) Dirty page: A page which is modified after it is loaded in main memory is called as dirty page. Q.56 What is GUI? State any four advantages of GUI. GUI: The interface which replaces cryptic commands by their graphical representation are called Graphical User Interface (GUI). Windows operating system is GUI based operating system. Advantages of GUI: 1) With GUI, commands are replaced by graphics. Hence it is not necessary to remember the command and its meaning. 2) With GUI, users can run several programs simultaneously. 3) Users can communicate and exchange data between programs without transferring or copying files. 4) Easy to use, consistent GUI for virtually all programs. Q.58 What is meant by GUI? What are the essential components of GUI? Explain any three. GUI: The interface which replace cryptic commands by their graphical representation are called Graphical User Interface (GUI). Windows operating system is GUI based operating system. Essential components of GUI are: 1) Menu bar 2) Scroll bar 3) Controls push button, option button, radio button, check box, list box, Entry box, Combo box) 4) Dialogue boxes 5) Feedback pointer Menu bar: ·Minimize button / /. \ ' -, Title bar· Menu bar C:\My-·ooooments Close button File Edit. View '- Tools ·.Help·: M·aximize/ t~- restore button ,-,-- ,·..,. Scro.II. bar \.. Wor·k area -=::~is----~. -.,b~-~:~_;:~-~;:~~~~-~~~ 1)Menu bar i. Menu bar normally appears at the top of the window under the window title. ii. Some commonly used menu bar options are File, Edit, View, Help etc. iii. When one of these menus is selected, a pulldown menu appears on the screen. 2) Scroll bar: i. Scroll bars allow the user to scroll the window horizontally and vertically. ii. Scroll bars are generally used to look at information, which is not currently visible on screen, by scrolling the window horizontally or vertically. iii. A scroll bar consists of a horizontal or vertical scroll area with a slider box and an arrow in a box at each end. iv. Slider box gives a hint on size and position of the visible part of the object. 3) Dialogue boxes: i. Dialogue box is a window, used by the application to interact with the user. ii. A dialogue box can also be used to display information or to get user input and also for a combination of these two functions. iii. Dialogue boxes are of two types: (i) Modal dialogue box (ii) Modeless dialogue box. iv. A dialogue box where an application can continue only after the user has responded to the dialogue is called a modal dialogue box. v. A dialogue box, which allows the user to continue without responding to it, is called a modeless dialogue box. (3) Title bar. I. Title bar appears at the top of the window. II. Title bar shows the title of each window. III. The title helps to identify each window separately. (ii) Title bar. 1) Title bar appears at the top of the window. 2) Title bar shows the title of each window. 3) The title helps to identify each window separately. Q65 Define "security with respect to an operating system. Explain the different elements of security? 1) Security in an operating system is about making sure that data is kept safe when it's stored or when it's being sent from one part of the system to another. 2) In multiuser operating systems, the concepts of security and protection are very important. 3) User programs should not interfere with one another or with the operating system. 4) When we talk about secure systems, we're referring to systems that have special security features in place. These features make sure that only people or computer programs that are allowed to can see, change, create, or remove information. 5) There are three main elements of security viz. Confidentiality, integrity and availability. (i) Confidentiality: Confidentiality ensures that information is not accessed in an unauthorized manner. It is generally related to the Read operations. (ii) Integrity; Integrity ensures that the information is not amended or deleted by an unauthorized manner. It is generally related to Write operations. (iii) Availability: It ensures that information is available to authorized users at right time Q.67 What are attacks on security? Explain in short the ways in which a system can be attacked. The security system can be attacked and penetrated in a number of ways as follows: 1.Authentication : Authentication means verification of access to the system resources. Following are some of the ways in which authentication may take place: i. By stealing and using somebody else's password and then using it. ii. Use of vendor supplied password which can be used by only system administrators. iii. Finding password by trial and error (i.e. guess) method. iv. If a user logs on and then goes off, an intruder can use that terminal. v. Writing dummy login programs to fool the user. 2.Browsing: i. In some systems, there exist files with access controls, which are very permissive. ii. One can browse through the system file to get this information, after which, unprotected files/databases could be easily accessed. iii. Confidential information could be read or even modified. 3.Trap doors: i. Sometimes, software engineers leave some secret entry point to modify programs. These are called trap doors. ii. They can be misused by others. 4.Electric data capture: Use of active or passive wire traps, or mechanism to pick up the screen radiation and to recognize what is displayed on screen is called electronic data capture. 5.Invalid parameters: Passing invalid parameters may cause serious security violations. 6. Line trapping: A special terminal is used to tap into a communication line. It causes access to confidential data. 7. Waste recovery: By using some technique, deleted files can be recovered, passwords may be recollected. 8.Rouge software: Certain programs like worms, viruses attack systems. Q. 69 What is a computer virus ? State various types of viruses and the basis on which they are classified. 1. A computer virus is a part of a program, which is written with clear intention of infecting other programs. 2. A computer virus is not a complete program by itself. It can not act independently. 3. A computer virus causes direct harm to the system. It can corrupt code as well data. 4. The classification of a virus is based on what it affects or where the virus resides. 5. There are five types of viruses given below: Q. 69 What is a computer virus ? State various types of viruses and the basis on which they are classified. i. Boot sector virus ii. Memory resident virus iii. File specific virus iv. Command processor virus: v. General purpose virus Q70 What are the different methods by which viruses can infect other programs? There are five well known methods by which a virus can infect other programs: (i) Append: In this method the viral code appends itself to the unaffected programs. (ii) Replace: In this case, the viral code replaces the original executable program completely or partially to carry out some funny actions. (iii) Insert: In this case, the viral code is inserted in the body of an executable code to carry out some funny or undesirable actions. (iv) Delete: In this case, the viral code deletes some code from the executable program. (v) Redirect: This is an advanced approach employed by the authors of sophisticated viruses. The normal control flow of a program is changed to execute some other code, which could exist as an appended portion of a normal program. Q. 72 Discuss virus detection, removal and prevention philosophies. (i) Virus detection: 1. Normally, a virus detection program checks the integrity of the binary files. 2. The program maintains a check sum on each file. A mismatch in it indicates a virus. 3. Some programs reside in the memory and continuously monitor certain memory. and I/O operations for guarding against any suspicious behavior. (ii) Virus removal: 1. A generalized virus removal program is very difficult to imagine due to the multiplicity of the viruses and the creativity with which they are constructed. 2. However, for some viruses, bit patterns in code can be predicted. 3. In this case a virus removal program scans the disk for the patterns of known viruses. On detection, it removes them. But, if the virus has already damaged data, then recovery of data is almost impossible. (iii) Virus prevention : 1. Users cannot cure the data (recover) after viral infection. Hence the best way is to prevent viruses. 2. For this user must buy official, legal copies of software from reliable stores or sources. 3. One should be extremely careful about picking up free, unreliable or illegal software. 4. Frequent back-ups and running of monitoring programs also help in detection, and thus subsequent prevention of different viruses. Q.73 Differentiate between computer worms and computer viruses. Computer worms: i. A computer worm is a complete program. ii. A computer worm can act independently.. iii. Generally it does not cause direct harm to the computer system. iv. It just goes on spreading on to the network and consumes network resources to a large extent. Computer viruses: i. A computer virus is not a complete program, but a part of the program. ii. A computer virus can not act independently. iii. It causes direct harm to the computer system. It has been written with the clear intention of infecting others. iv. A computer virus corrupts code and data. 4.Linux is a_______ software. 1) public domain 2) free 3) paid 4) private. Ans.: (2) free 8. The time lost in turning the attention of processor from one process to other is called as 1) Circuit switching 2) Band width 3) Context switching 4) None of these Ans: (3) Context switching 9._________is a function of memory management. 1) Creation of file 2) Halting process 3) Paging 4) None of these Ans: (3) Paging 10.If the page size for 2 MB memory is 2 kB, then the number of higher order bits on address bus, used to denote page number is 1) 11 2) 10 3) 9 4) 8 Ans: (2) 10 32.______ is free software. (i) UNIX (ii) DOS (iii) LINUX (iv) WINDOWS Ans.: (iii) LINUX 38.Turning attention of CPU from one process to another is called. (i) reference (ii) Context switch (iii) Process scheduling (iv) Multiprogramming Ans.: (ii) Context switch.