0% found this document useful (0 votes)
37 views2 pages

Operating System: Unit - 1

i. Interrupts are important in operating systems because they allow external devices like keyboards to signal the CPU to stop current tasks and service requests, ensuring immediate response. ii. A trap is a software interrupt generated by invalid instructions or requests from programs for OS services, returning control to the OS. iii. Throughput measures the amount of data transferred or processed within a time period, typically measured in kbps, Mbps or Gbps, depending on factors like CPU and memory speed.

Uploaded by

Anubhav Swain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

Operating System: Unit - 1

i. Interrupts are important in operating systems because they allow external devices like keyboards to signal the CPU to stop current tasks and service requests, ensuring immediate response. ii. A trap is a software interrupt generated by invalid instructions or requests from programs for OS services, returning control to the OS. iii. Throughput measures the amount of data transferred or processed within a time period, typically measured in kbps, Mbps or Gbps, depending on factors like CPU and memory speed.

Uploaded by

Anubhav Swain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Unit – 1

Operating System
1. Why interrupt is important in operating system?
Ans: - Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the CPU to
stop its current activities and execute the appropriate part of the operating system.
Or
An “interrupt” is an event external to the CPU that causes a change in program control flow. Interrupts are
requested by external devices to notify the Operating System of something it must handle.
Diagram:

Interrupt driven diagram


There are two types of interrupts:
i. Hardware Interrupts are generated by hardware devices to signal that they need some attention from
the OS. They may have just received some data or they have just completed a task which the operating
system previous requested, such as transferring data between the hard drive and memory.
e.g., keystrokes on the keyboard or a data on the Ethernet card.
ii. Software Interrupts are generated by programs when they want to request a system call to be
performed by the operating system.
System Call: -
a. A system call is a mechanism that provides the interface between a process and the operating system.
It is a programmatic method in which a computer program requests a service from the kernel of the OS.
System calls are initiated with a software interrupt assembly language instruction.
b. System calls are the only entry points for the kernel system.
c. For example, if we need to write a program code to read data from one file, copy that data into another
file. The system call is handled much like an interrupt, which is why a system call is also called a
software generated interrupt.
Trap: -
a. Traps are generated by the CPU itself to indicate that some error or condition occurred for which
assistance from the operating system is needed.
b. An example of an invalid instruction is when a program is trying to access another program's memory
space without having a permission or division by zero.
 Interrupts are important because they give the user better control over the computer.
 Without interrupts, a user may have to wait for a given application to have a higher priority over the
CPU to be ran.
 This ensures that the CPU will deal with the process immediately.

2. What is Trap?
Ans: - The operating system is driven by interrupts.
This means that:
I. If there are no processes to execute, no I/O devices to service, and no users to whom to respond, an
operating system will sit quietly, waiting for something to happen.
II. Events are almost always signalled by the occurrence of an interrupt or a trap, a trap is a software
interrupt generated when an invalid instruction is given or by a specific request from a user program that
an operating system service is performed. Then it returns control to the OS.
III. An example of an invalid instruction is when a program is trying to access another program's memory
space without having a permission or division by zero.

3. What is Throughput?
Ans: -
i. The amount of data transferred from one place to another or processed in a specified amount of time. 
ii. It is used to measure the performance of hard drives and RAM, as well as Internet and network
connections.
iii. Typically, throughputs are measured in kbps, Mbps and Gbps.
iv. The throughput of a computer depends on such factors as the speed of the CPU (central processing
unit), the amount of memory, the performance of the operating system and the means of measurement.

4. Difference between single user operating system and Multiuser Operating System?
Ans: -
SINGLE-USER OPERATING SYSTEM MULTI-USER OPERATING SYSTEM
A Single-User Operating System is a system in A Multi-User Operating System is a system that
which only one user can access the computer allows more than one user to access a computer
system at a time. system at one time.
Single user Operating System has two types: It is of three types: time-sharing operating
Single user Single task Operating System and system, distributed operating system and
Single user Multi task Operating System. multiprocessor system.
This type of operating system is used for single This type of operating system is used for
user. multiple users.
Single-User Operating System is simple. Multi-User Operating System is complex
It supports standalone systems. It doesn’t support standalone systems.
In this, there is no need to take care of balance In this, we have to take care of balance between
between users. users so that if one problem arises with one user
does not affect other users also.
If another user wants to access the computer There is no need to wait for accessing the
resources, then he/she has to wait until the computer resources.
current process completes.
Examples: Windows, Apple Mac OS,MS DOS. Examples: UNIX, Linux and Mainframes.

You might also like