Introduction to Operating Systems: Unit I: Introduction

Two marks Questions with Answers

Introduction - Introduction to Operating Systems

An operating system is a program that manages the computer hardware.

Two Marks Questions with Answers

Q.1 Define operating systems.

Ans. : An operating system is a program that manages the computer hardware.

Q.2 What are the goals of OS?

Ans. :Operating system goals :

a. Execute user programs and make solving user problems easier.

b. Make the computer system convenient to use.

Q.3 List down the functions of operating systems.

Ans. : Functions of operating systems are convenience, efficiency and ability to evolve.

Q.4 What are the objective of operating systems ?   AU: [CSE]: May-17, Dec.-17

Ans. : The objective of operating systems are efficient use, user convenience, ability to evolve.

Q.5 Compare and contrast DMA and Cache memory.

Ans. :• DMA technology provides special channels for CPU and I/O devices to exchange I/O data, and the memory is used for buffering the I/O data. When the CPU wants to handle I/O data, it triggers the DMA write operations that transfer the I/O data from I/O devices to the memory.

• Caches are "automatically" managed in that the hardware, when the requested memory contents are not in the cache, fetches that data from main memory.

Q.6 How does an interrupt differ from trap?AU: [EIE]: May-18

Ans. : Trap is a software-generated interrupt caused either by an error or by a specific request from a user program that an operating-system service be performed. A trap usually results in a switch to kernel mode. Interrupt signals can cause a program to suspend itself temporarily to service the interrupt. An interrupt is a hardware-generated signal that changes the flow within the system.

Q.7 What are the three main purposes of an operating system ?

Ans. :

• To provide an environment for a computer user to execute programs on computer hardware in a convenient and efficient manner.

• To allocate the separate resources of the computer as needed to solve the problem given. The allocation process should be as fair and efficient as possible.

• As a control program it serves two major functions: 1) Supervision of the execution of user programs to prevent errors and improper use of the computer and 2) Management of the operation and control of I/O devices.

Q.8 Explain what is batch processing.

Ans. : Here jobs with similar requirements are batched together and run through the computer as a group. Thus a batch operating system reads a stream of separate jobs, each with its own control cards that predefine what the job does, feed the batches one after another and send the output of each job to the appropriate destination.

Q.9 What is spooling ?

Ans. : The use of secondary memory as buffer storage to reduce processing delays when transferring data between peripheral equipment and the processors of a computer.

Q.10 Define the degree of multiprogramming.

Ans. : Degree of multiprogramming is the number of processes in the memory.

Q.11 What is the main advantage of multiprogramming ?

Ans. : Multiprogramming makes efficient use of the CPU by overlapping the demands for the CPU and its I/O devices from various users. It attempts to increase CPU utilization by always having something for the CPU to execute.

Q.12 State the function of Printer Daemon.

Ans. : The Printer Daemon provides printer services for local and remote users. It manages the printer spool area and the print queues. Printer Daemon is started at boot time from a startup script. It is generally included in the startup of Linux and BSD systems by default so you might not need to add it to your startup script.

Q.13 What do you mean by multiprogramming?

Ans. : Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute.

Q.14 List the disadvantages of multiprogrammed batched systems.

Ans. :Disadvantages

1. Users cannot interact with their jobs, while executing. 

2. A programmer cannot modify a program as it executes to study its behavior

Q.15. Do time sharing differs from multiprogramming? If so, how?

Ans. : Time sharing is the sharing of resources among several processes at the same time. Multiprogramming is the allocation of more than one process on a computer system and its resources. Time sharing minimizes the response time and multiprogramming maximizes the processor use. Time sharing systems use the concept of multiprogramming to share the CPU time between multiple users at the same time.

Q.16 Write the difference between batch system and time sharing systems.

Ans. : A batch system executes jobs, whereas a time-shared system has user programs, or tasks.

• Batch systems are inconvenient for users because users cannot interact with their jobs to fix problems. User interacts with system in time sharing system.

Q.17 Describe the differences between symmetric and asymmetric multiprocessing.

Ans. :Symmetric multiprocessing treats all processors as equals and I/O can be processed on any CPU. Asymmetric multiprocessing has one master CPU and the remainder CPUs are slaves. The master distributes tasks among the slaves and I/O is usually done by the master only.

Q.18 What is tightly coupled system ?

Ans. : Processors share memory and a clock; communication usually takes place through the shared memory.

Q.19 What is graceful degradation ?

Ans. : In multiprocessor systems, failure of one processor will not halt the system, but only slow it down. If there are 15 processors and if one fails the remaining 14 processors pick up the work of the failed processor. This ability to continue providing service is proportional to the surviving hardware is called graceful degradation.

Q.20 What are the disadvantages of multiprocessor systems ?

Ans. : Multiprocessor systems are more complex in both hardware and software. Additional CPU cycles are required to manage the cooperation, so per-CPU efficiency goes down.

Q.21 Distinguish between tightly coupled system and loosely coupled system.

Ans. :

Q.22 What is difference between networked O.S. and distributed O.S. ?

Ans. : Difference between networked O.S. and distributed O.S. is an follows:

Q.23 Mention the advantages in the design of distributed operating systems. Ans. :Advantages are as follows:

 1. Resource sharing 2. Higher reliability 3. Better price performance ratio 

4. Shorter response times and higher throughput.

Q.24 What are the advantages of peer-to-peer systems over client server systems?Ans. : Peer-to-peer system is more reliable as central dependency is eliminated. All the resources and contents are shared by all the peers, unlike server-client architecture where server shares all the contents and resources.

Q.25 Define real time system.

Ans. : Real time system is one that must react to inputs and responds to them quickly. A real time system has well defined, fixed time constraints.

Q.26 What is meant by "hard real systems and soft real systems"?

Ans. Hard real systems guarantee that critical tasks complete on time. In soft real system a critical task get priority over other tasks and remains that priority until it completes.

Q.27 What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment ?

Ans. : The main difficulty is keeping the operating system within the fixed time constraints of a real-time system. If the system does not complete a task in a certain time frame, it may cause a breakdown of the entire system it is running. Therefore when writing an operating system for a real-time system, the writer must be sure that his scheduling schemes don't allow response time to exceed the time constraint.

Q.28 What are the main advantages of layered approach ?

Ans. : a. Each layer is implemented using those operations provided by lower-level layers.

b. A layer does not need to know how the low-level operations are implemented; it needs to know what these operations o.

c. Each layer hides the existence of data structures, operations and hardware from higher-level layer.

Q.29 Mention the purpose of system calls.  AU: May-18

Ans. : System calls allow user-level processes to request services of the operating system.

Q.30 What is the purpose of system programs ?  AU: May-16

Ans.:System program that provides an application programming environment on top of the hardware.

Q.31 What are the five major categories of system calls ?  AU CSE/IT: May-11

Ans. : Five main categories of system calls are File management, IPC, process management, I/O devices management, information management.

Q.32 What is the function of system programs? Write the name of the categories in which the system programs can be divided.

Ans. : programs provide a convenient environment for program development and execution. System programs are divided into these categories: File management, status management, file modification, programming language support, program loading and execution, communications.

Q.33 What is meant by a system call ?

Ans. : System calls provide the interface between a process and the OS.

Q.34 What does the CPU do when there are no user programs to run?

Ans. : The CPU will always do processing. Even though there are no application programs running, the OS is still running and the CPU will still have to process many system processes during the operation of computer.

Q.35 List general methods used to pass parameters in system call.

Ans. : Three general methods are used to pass parameters between a running programand the operating system.

a. Pass parameters in registers.

b. Store the parameters in a table in memory and the table address is passed as a

parameter in a register.

c. Push (store) the parameters onto the stack by the program and pop off the stack by operating system.

Q.36 Why APIs need to be used rather than system calls?

Ans. : An application programmer designing a program using an API can expect his program to compile and run on any system that supports the same API. Actual system calls can often be more detailed and difficult to work with the API available to an application programmer.

Q.37 List the advantages and disadvantages of writing an operating system in high level languages such as C.  AU: May-18

Ans. : Advantages:

• The code can be written faster and more compact.

• Easier to understand and debug

• Recompilation is simple.

Disadvantages :

• There could be a performance overhead introduced by the compiler and runtime system used for the high-level language.

• Certain operations and instructions that are available at the machine-level might not be accessible from the language level, thereby limiting some of the functionality available to the programmer.

Q.38 What is dual mode operation and what is the need of it?  AU [CSE] May-19 

Ans.:

• Two modes are provided by the hardware - user and kernel mode. Mode bit is added to computer hardware to indicate the current mode. The OS is loaded and then user process is started in user mode. When an interrupt occurs, hardware switches to kernel mode.

• In order to ensure the proper execution of the OS, user must be able to distinguish between the execution of OS code and user defined code.

Q.39 List out some system calls required to control the communication system.  AU [CSE]: May-19

Ans. :System calls for communication system: Open connection and close connection, read message and write message, get hosted and get processed.

Introduction to Operating Systems: Unit I: Introduction : Tag: : Introduction - Introduction to Operating Systems - Two marks Questions with Answers