SlideShare a Scribd company logo
2
Most read
4
Most read
7
Most read
Q1. What is an Operating System? Write its function.
(Oct. 2004, 2007 Mar. 2009; July 2019, March 2020)
Ans.:
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 execution of programs to prevent errors and improper use of computer systems.
4. To make provision for security of information to users.
5. To eliminate duplicate errors by a number of programmers in development of complicated routines.
6. It provides a facility to share the same hardware among the users.
7. Proper scheduling of resources among users.
computer System can be roughly divided into four components.
Q.2 Which are the three main areas in which the operating system divides its services? Give
examples. (March 2002, 06, 08, 09, 13, Oct. 2004, 07, 14, 15; March 2020
Ans.:
The O.S. divides its services in the following three main areas:
i) Information Management (IM)
ii) Process Management (PM)
iii) Memory Management (MM)
i) Information management :
1. Information management (IM) refers to a set of services used for storing. retrieving, modifying or
removing the information on various devices.
2. These system services manages the organization of information in terms of directories and files,
allocating and deallocating the sectors to various files, ensuring right people have access to the
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 read,
4. Close a file.write or both)
5. Read data from file to buffer.
6. Write data from buffer to file.
7. Move the file pointer.
8. Read and return file's status.
9. Create a link.
10.Change 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. A computer has only one CPU and it can execute only one instruction belonging
to any one of all these programs.
2. In such a case, the operating system has to keep track of all running programs, called as
processes.
3. Operating system has to schedule all processes and will have to dispatch them (i.e. run or execute)
one after the other.
4. While doing so, it gives an impression to user that he has the full control of the CPU.
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.
5.
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 an 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?
(March 2015, 2018; July 2018)
Ans. :
1. The collection of related information i.e. data or programs is called a file.
2. Each file has a specific name, which is used to refer to that file.
3. For convenient use of the computer system, the O.S. provides a uniform logical view of information
storage.
4. The operating system manages mass storage devices to implement the abstract concept of file.
5. The O.S. maps files on to physical devices such as tapes or disks.
6. Using various data structures, the file system in IM allows users to define files and directories and
allocate/deallocate the disk space to each file.
There are two types of file systems:
1. Tape-based systems
2. Disk - based systems.
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 tabe-base systesm are 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. Number of tracks and size of sectors is 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.
Hsc computer science chap 1 Operating System  (1).pdf
Q.19 Explain the following terms in case of magnetic disk:
(i) Tracks and Sectors (ii) Seek time
(iii) Transmission time (ii) Latency time/ Rotational delay
(Mar. 2006, 2009 Oct. 2003, 2006, July 2017)
Ans:
i) Tracks and Sectors:
1. Magnetic disk surface is made up of concentric circles called tracks.
2. The number of tracks varies depending on the disk type.
3. A track is further divided into smaller areas called sectors.
4. A sector is a smallest unit of information which can be read from or written to the disk.
5. 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. 20 Explain internal and external fragmentation.
(March 2020)
Ans.:
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.
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. 21 What are device drivers?
(March 2010; July 2018)
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.
5. For simply reading a character from a device involves a complex sequence of device specification
operations.
6. Rather than writing the code every time, the device driver was simply used from the library.
Q. 22 What is VDU? Explain the following terms:
a) Dumb terminal b) Intelligent terminal
(March 2002, Oct. 2007, March 2018; July 2018)
Ans:
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:
1. An intelligent terminal has powerful hardware and software than a dumb terminal.
2. It also has more memory.
3. 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. (Oct. 2002,04,05,12 Mar. 2012, 13, 14, March 2018; July 2019)
Ans. :
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 process, which is executed by 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:
1. 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.
2. 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.
Ans:
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
degree of multiprogramming, the efficiency of the hardware along with the O.S. and the
policy of 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 response time (d) Event response time
July 2019)
Ans:
(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 (iii) Internal priority
(ii) Purchased priority (iv) Time slice
Ans. :
(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.
(e) 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 center 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.
Ans.
1. In computing, time-sharing is the sharing of a computing resource among many user by means of
multiprogramming and multitasking
2. Time sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time.
3. Time-sharing or multitasking is a logical extension of multiprogramming.
4. Processor's time which is shared among multiple users simultaneously is termed as time-sharing.
5. 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.
6. 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.
7. For example, in transaction processing, processors execute each user program in a short burst or
quantum of computation.
8. That is if n users are present, each user can get time quantum.
9. When the user submits the command, the response time is in a few seconds at most.
10.Operating system uses CPU scheduling and multiprogramming to provide each user with a small
portion of the time.
11. 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.
Ans:
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.
when and where.
c) 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.
(March 2004, 2007, 2011, 2020)
Ans :
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.
0.44 What is partitioning? Explain fixed and variable partitioning.
(Mar. 2004, 07, 08, 09, 12; Oct. 2005, 14, July 2017, 18)
Ans.
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.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
Ans. 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:
Q.53 Explain the concept of virtual memory in brief.
(March 2004, 15, 16; July 2019)
Ans:
(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) Working set: The set of pages in physical memory which are actively referred to at any fault moment
is called a working set. Working set helps to decide page replacement policy.
(iv) 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.
(v) Dirty page: A page which is modified after it is loaded in main memory is called as
dirty page.
(vi) Demand paging: In demand paging, a page is loaded in memory, only when it is demanded.
Q.56 What is GUI? State any four advantages of GUI.
Ans:
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.
Ans: 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:
(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.
vi) 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.
Q.60 Explain the following with respect to GUI: (ii) Title bar.
Ans:
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?
(Oct. 2002, 2004, 2010, 2012, March 2018)
Ans:
1) Security is concerned with the ability of the operating system to enforce control over the storage and
transportation of data in and between the objects that the operating system supports.
(2)In multiuser operating systems, the concepts of security and protection are very important. User
programs should not interfere with one another or with the operating system.
3) In general, Secure Systems are those, which control, through the use of specific security features,
access to information that only properly authorized individuals or processes operating on their behalf will
have access to read, write, create or delete.
4) 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 the authorized users at right time
Q.67 What are attacks on security? Explain in short the ways in which a system can be attacked.
Ans. 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.
Ans:
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:
(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?
Ans: 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.
Ans:
(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.
Ans: 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 (iii) Process scheduling
(ii) Context switch (iv) Multiprogramming
Ans.: (ii) Context switch.

More Related Content

PDF
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdf
PPTX
Mass Storage Structure
PPTX
Operating system
PPTX
ppt of features of operating system.pptx
PPT
Operating systems for class 9th class
PPTX
Operating system components
DOC
OPERATING SYSTEM - SHORT NOTES
PPTX
Chapter 1 Introduction to Operating System Concepts
Hsc computer science paper 1 chap 1 OperatingSystem2024.pdf
Mass Storage Structure
Operating system
ppt of features of operating system.pptx
Operating systems for class 9th class
Operating system components
OPERATING SYSTEM - SHORT NOTES
Chapter 1 Introduction to Operating System Concepts

What's hot (20)

PDF
Hsc computer science chap 4.HTML2024.pdf
PDF
Lecture19 unionsin c.ppt
PPTX
Exception handling in java.pptx
PPTX
Data Structure ARRAY REPRESENTATION OF STACKS
PPTX
Data Structures - Lecture 3 [Arrays]
PPTX
Paging and Segmentation in Operating System
PPT
Memory Management in OS
PPTX
DATA STRUCTURE CLASS 12 .pptx
PPT
Arrays searching-sorting
PDF
CS6401 OPERATING SYSTEMS Unit 2
PPT
Process management in os
PPT
Chapter 8 - Main Memory
PPTX
Threads
PPT
Operatingsystems lecture2
DOCX
Cache memory
PDF
Queues
PPTX
Java Data Types
PPT
PPT
File access methods.54
PPTX
Queue
Hsc computer science chap 4.HTML2024.pdf
Lecture19 unionsin c.ppt
Exception handling in java.pptx
Data Structure ARRAY REPRESENTATION OF STACKS
Data Structures - Lecture 3 [Arrays]
Paging and Segmentation in Operating System
Memory Management in OS
DATA STRUCTURE CLASS 12 .pptx
Arrays searching-sorting
CS6401 OPERATING SYSTEMS Unit 2
Process management in os
Chapter 8 - Main Memory
Threads
Operatingsystems lecture2
Cache memory
Queues
Java Data Types
File access methods.54
Queue
Ad

Similar to Hsc computer science chap 1 Operating System (1).pdf (20)

PDF
Operating System and related questions
PPTX
Operating system interview question
PPT
Module-1.ppt operating system unit 1 notes
PPTX
Unit 1-Operating Systems Overview .pptx
PPT
operating system over view.ppt operating sysyems
PDF
Csc 2313 (lecture 2)
PDF
Csc 2313 (lecture 2)
DOC
Os question
PPTX
Operating system
PPTX
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
DOCX
operating system question bank
PPTX
PPTX
Operating Systems: Revision
PPTX
2 opreating system
DOCX
PPT
OSLec1&2.ppt
DOCX
Quiz 4 soution
PPTX
Os functions
Operating System and related questions
Operating system interview question
Module-1.ppt operating system unit 1 notes
Unit 1-Operating Systems Overview .pptx
operating system over view.ppt operating sysyems
Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
Os question
Operating system
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
operating system question bank
Operating Systems: Revision
2 opreating system
OSLec1&2.ppt
Quiz 4 soution
Os functions
Ad

More from AAFREEN SHAIKH (20)

PDF
3-inheritanc-and-variation.pdf HSC BIOLOGY 3-inheritanc-and-variation
PDF
1-reproduction-in-plants-assignment-notes.pdf
PDF
Rotational-Dynamics-ppt3.pdf HSC PHYSICS CHAPTER 1 ROTATIONAL DYNAMIC PART 3
PDF
Rotational-Dynamics-ppt2.pdf HSC PHYSICS CHAPTER 1 Rotational-Dynamics PART-2
PDF
Rotational-Dynamics-ppt1.pdf HSC PHYSICS CHAPTER 1 Rotational-Dynamics PART-1
PDF
assesment-12th BY AAFREEN SHAIKH.pdf HSC assesment
PDF
English-Paper-Pattern.pdf HSC ENGLISH PAPER PATTERN
PDF
Lesson-6-Ecommerce-&-EGovernance BY AAFREEN SHAIKH.pdf
PDF
Lesson-5-php BY AAFREEN SHAIKH.pdf HSC INFORMATION TECHNOLOGY CHAP 5 PHP
PDF
Lesson-4-Emerging-Technology BY AAFREEN SHAIKH.pdf
DOCX
Std.-XI-Unit-Test-No.-1-Third-Practice-Test-By-Prof.-Aafreen Shaikh.docx
PDF
Std.-XI-Unit-Test-2-By-Prof.-aafreen shaikh.pdf
PDF
Std.-XI-Unit-Test-No.1-For-First-Term-By-Prof.-Aafreen Shaikh.pdf
PDF
GEOGRAPHY QUESTION PAPER.pdf HSC GEOGRAPHY QUESTION PAPER
PDF
CHEMISTRY QUESTION PAPERS.pdf HSC CHEMISTRY QUESTION PAPERS
PDF
marathi question paper.pdf hsc marathi prelims sample question papers
PDF
Ls-No-1 Web Publishing Notes.pdf 12th information technology chapter 1
PDF
Solutions - formula sheet.pdf 12TH IMPORTANT FORMULA SHEET CHAP 3 CHEMISTRY
PDF
Some basic Concepts of Chemistry.pdf class 11th science chemistry chapter 1 s...
PPT
HTML NOTES.ppt BASIC HTML PROGRAMING NOTES
3-inheritanc-and-variation.pdf HSC BIOLOGY 3-inheritanc-and-variation
1-reproduction-in-plants-assignment-notes.pdf
Rotational-Dynamics-ppt3.pdf HSC PHYSICS CHAPTER 1 ROTATIONAL DYNAMIC PART 3
Rotational-Dynamics-ppt2.pdf HSC PHYSICS CHAPTER 1 Rotational-Dynamics PART-2
Rotational-Dynamics-ppt1.pdf HSC PHYSICS CHAPTER 1 Rotational-Dynamics PART-1
assesment-12th BY AAFREEN SHAIKH.pdf HSC assesment
English-Paper-Pattern.pdf HSC ENGLISH PAPER PATTERN
Lesson-6-Ecommerce-&-EGovernance BY AAFREEN SHAIKH.pdf
Lesson-5-php BY AAFREEN SHAIKH.pdf HSC INFORMATION TECHNOLOGY CHAP 5 PHP
Lesson-4-Emerging-Technology BY AAFREEN SHAIKH.pdf
Std.-XI-Unit-Test-No.-1-Third-Practice-Test-By-Prof.-Aafreen Shaikh.docx
Std.-XI-Unit-Test-2-By-Prof.-aafreen shaikh.pdf
Std.-XI-Unit-Test-No.1-For-First-Term-By-Prof.-Aafreen Shaikh.pdf
GEOGRAPHY QUESTION PAPER.pdf HSC GEOGRAPHY QUESTION PAPER
CHEMISTRY QUESTION PAPERS.pdf HSC CHEMISTRY QUESTION PAPERS
marathi question paper.pdf hsc marathi prelims sample question papers
Ls-No-1 Web Publishing Notes.pdf 12th information technology chapter 1
Solutions - formula sheet.pdf 12TH IMPORTANT FORMULA SHEET CHAP 3 CHEMISTRY
Some basic Concepts of Chemistry.pdf class 11th science chemistry chapter 1 s...
HTML NOTES.ppt BASIC HTML PROGRAMING NOTES

Recently uploaded (20)

PPTX
2. Earth - The Living Planet Module 2ELS
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PDF
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
PPTX
Cell Membrane: Structure, Composition & Functions
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PPTX
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
PPTX
Microbiology with diagram medical studies .pptx
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPTX
2Systematics of Living Organisms t-.pptx
DOCX
Viruses (History, structure and composition, classification, Bacteriophage Re...
PPTX
microscope-Lecturecjchchchchcuvuvhc.pptx
PPTX
2. Earth - The Living Planet earth and life
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PPTX
neck nodes and dissection types and lymph nodes levels
PDF
The scientific heritage No 166 (166) (2025)
PPTX
Introduction to Cardiovascular system_structure and functions-1
PPTX
famous lake in india and its disturibution and importance
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
2. Earth - The Living Planet Module 2ELS
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
Taita Taveta Laboratory Technician Workshop Presentation.pptx
Mastering Bioreactors and Media Sterilization: A Complete Guide to Sterile Fe...
Cell Membrane: Structure, Composition & Functions
TOTAL hIP ARTHROPLASTY Presentation.pptx
GEN. BIO 1 - CELL TYPES & CELL MODIFICATIONS
Microbiology with diagram medical studies .pptx
Derivatives of integument scales, beaks, horns,.pptx
2Systematics of Living Organisms t-.pptx
Viruses (History, structure and composition, classification, Bacteriophage Re...
microscope-Lecturecjchchchchcuvuvhc.pptx
2. Earth - The Living Planet earth and life
Biophysics 2.pdffffffffffffffffffffffffff
neck nodes and dissection types and lymph nodes levels
The scientific heritage No 166 (166) (2025)
Introduction to Cardiovascular system_structure and functions-1
famous lake in india and its disturibution and importance
AlphaEarth Foundations and the Satellite Embedding dataset

Hsc computer science chap 1 Operating System (1).pdf

  • 1. Q1. What is an Operating System? Write its function. (Oct. 2004, 2007 Mar. 2009; July 2019, March 2020) Ans.: 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 execution of programs to prevent errors and improper use of computer systems. 4. To make provision for security of information to users. 5. To eliminate duplicate errors by a number of programmers in development of complicated routines. 6. It provides a facility to share the same hardware among the users. 7. Proper scheduling of resources among users. computer System can be roughly divided into four components.
  • 2. Q.2 Which are the three main areas in which the operating system divides its services? Give examples. (March 2002, 06, 08, 09, 13, Oct. 2004, 07, 14, 15; March 2020 Ans.: The O.S. divides its services in the following three main areas: i) Information Management (IM) ii) Process Management (PM) iii) Memory Management (MM) i) Information management : 1. Information management (IM) refers to a set of services used for storing. retrieving, modifying or removing the information on various devices. 2. These system services manages the organization of information in terms of directories and files, allocating and deallocating the sectors to various files, ensuring right people have access to the 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 read, 4. Close a file.write or both) 5. Read data from file to buffer. 6. Write data from buffer to file. 7. Move the file pointer. 8. Read and return file's status. 9. Create a link. 10.Change 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. A computer has only one CPU and it can execute only one instruction belonging to any one of all these programs. 2. In such a case, the operating system has to keep track of all running programs, called as processes. 3. Operating system has to schedule all processes and will have to dispatch them (i.e. run or execute) one after the other. 4. While doing so, it gives an impression to user that he has the full control of the CPU.
  • 3. 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. 5. 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 an 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
  • 4. 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? (March 2015, 2018; July 2018) Ans. : 1. The collection of related information i.e. data or programs is called a file. 2. Each file has a specific name, which is used to refer to that file. 3. For convenient use of the computer system, the O.S. provides a uniform logical view of information storage. 4. The operating system manages mass storage devices to implement the abstract concept of file. 5. The O.S. maps files on to physical devices such as tapes or disks. 6. Using various data structures, the file system in IM allows users to define files and directories and allocate/deallocate the disk space to each file. There are two types of file systems: 1. Tape-based systems 2. Disk - based systems. 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 tabe-base systesm are 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. Number of tracks and size of sectors is 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.
  • 6. Q.19 Explain the following terms in case of magnetic disk: (i) Tracks and Sectors (ii) Seek time (iii) Transmission time (ii) Latency time/ Rotational delay (Mar. 2006, 2009 Oct. 2003, 2006, July 2017) Ans: i) Tracks and Sectors: 1. Magnetic disk surface is made up of concentric circles called tracks. 2. The number of tracks varies depending on the disk type. 3. A track is further divided into smaller areas called sectors. 4. A sector is a smallest unit of information which can be read from or written to the disk. 5. 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.
  • 7. 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. 20 Explain internal and external fragmentation. (March 2020) Ans.: 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. 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. 21 What are device drivers? (March 2010; July 2018) 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. 5. For simply reading a character from a device involves a complex sequence of device specification operations. 6. Rather than writing the code every time, the device driver was simply used from the library.
  • 8. Q. 22 What is VDU? Explain the following terms: a) Dumb terminal b) Intelligent terminal (March 2002, Oct. 2007, March 2018; July 2018) Ans: 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: 1. An intelligent terminal has powerful hardware and software than a dumb terminal. 2. It also has more memory. 3. It can carry out some process on input characters also it can process programs Independently.
  • 9. Q.29 Explain Running, Ready and Blocked process states in process management. OR Discuss various process states with examples. (Oct. 2002,04,05,12 Mar. 2012, 13, 14, March 2018; July 2019) Ans. : 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 process, which is executed by 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: 1. 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. 2. 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. Ans: 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.
  • 10. 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 degree of multiprogramming, the efficiency of the hardware along with the O.S. and the policy of 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 response time (d) Event response time July 2019) Ans: (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.
  • 11. Q. 35 With reference to process management explain the terms: (i) External priority (iii) Internal priority (ii) Purchased priority (iv) Time slice Ans. : (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. (e) 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 center 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.
  • 12. Q39 Explain multi user and time sharing operating systems. Ans. 1. In computing, time-sharing is the sharing of a computing resource among many user by means of multiprogramming and multitasking 2. Time sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. 3. Time-sharing or multitasking is a logical extension of multiprogramming. 4. Processor's time which is shared among multiple users simultaneously is termed as time-sharing. 5. 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. 6. 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. 7. For example, in transaction processing, processors execute each user program in a short burst or quantum of computation. 8. That is if n users are present, each user can get time quantum. 9. When the user submits the command, the response time is in a few seconds at most. 10.Operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of the time. 11. 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. Ans: 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.
  • 13. when and where. c) 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. (March 2004, 2007, 2011, 2020) Ans : 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.
  • 14. (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. 0.44 What is partitioning? Explain fixed and variable partitioning. (Mar. 2004, 07, 08, 09, 12; Oct. 2005, 14, July 2017, 18) Ans. 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).
  • 15. 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.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 Ans. 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.
  • 16. 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: Q.53 Explain the concept of virtual memory in brief. (March 2004, 15, 16; July 2019) Ans: (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.
  • 17. (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) Working set: The set of pages in physical memory which are actively referred to at any fault moment is called a working set. Working set helps to decide page replacement policy. (iv) 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. (v) Dirty page: A page which is modified after it is loaded in main memory is called as dirty page. (vi) Demand paging: In demand paging, a page is loaded in memory, only when it is demanded. Q.56 What is GUI? State any four advantages of GUI. Ans: 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.
  • 18. 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. Ans: 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: (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. vi) 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.
  • 19. Q.60 Explain the following with respect to GUI: (ii) Title bar. Ans: 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? (Oct. 2002, 2004, 2010, 2012, March 2018) Ans: 1) Security is concerned with the ability of the operating system to enforce control over the storage and transportation of data in and between the objects that the operating system supports. (2)In multiuser operating systems, the concepts of security and protection are very important. User programs should not interfere with one another or with the operating system. 3) In general, Secure Systems are those, which control, through the use of specific security features, access to information that only properly authorized individuals or processes operating on their behalf will have access to read, write, create or delete. 4) 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 the authorized users at right time Q.67 What are attacks on security? Explain in short the ways in which a system can be attacked. Ans. The security system can be attacked and penetrated in a number of ways as follows:
  • 20. 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.
  • 21. 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. Ans: 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: (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? Ans: 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.
  • 22. (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. Ans: (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. Ans: Computer worms: i) A computer worm is a complete program.
  • 23. 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
  • 24. 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 (iii) Process scheduling (ii) Context switch (iv) Multiprogramming Ans.: (ii) Context switch.