You are on page 1of 4

OPERATING SYSTEMS TWO MARKS

1. What is Interrupt? Give example.

An interrupt is a signal sent to the processor that interrupts the current process. It
may be generated by a hardware device or a software program.

For example, if a program expects a variable to be a valid number, but the value is
null, an interrupt may be generated to prevent the program from crashing.

2. Differentiate system calls and system programs.

System calls allow user-level processes to request some services from the operating
system which process itself is not allowed to do.

System programs provide basic functioning to users so that they do not need to
write their own environment for program development (editors, compilers) and
program execution (shells).

3. Define Semaphore.
Semaphore is simply a variable that is non-negative and shared between threads. A
semaphore is a signaling mechanism, and a thread that is waiting on a semaphore
can be signaled by another thread. It uses two atomic operations, 1)wait, and 2)
signal for the process synchronization.

A semaphore either allows or disallows access to the resource, which depends on


how it is set up.

4. What is the difference between thread and process?


5. Define swapping.

Swapping refers to the exchange of two or more things. For example, in


programming data may be swapped between two variables, or things may be
swapped between two people. Swapping may specifically refer to: In computer
systems, an older form of memory management, similar to paging. Swapping
(barter)

6. What is thrashing?

Thrashing is a computer activity that makes little or no progress.Usually, this


happens either of limited resources or exhaustion of memory.
It arises when a page fault occurs.Page fault arises when memory access of virtual
memory space does not map to the content of RAM.
The effect of Thrashing is
1.CPU becomes idle.
2.Decreasing the utilization increases the degree of multiprogramming and hence
bringing more processes at a time which in fact

7. Name any three file attributes.

In operating systems like Linux, there are three main file attributes: read (r), write
(w), execute (x).

Read - Designated as an "r"; allows a file to be read, but nothing can be written to
or changed in the file.
Write - Designated as a "w"; allows a file to be written to and changed.
Execute - Designated as an "x"; allows a file to be executed by users or the
operating system.

8. What is file mounting?

Mounting is a process by which the operating system makes files and directories
on a storage device (such as hard drive, CD-ROM, or network share) available for
users to access via the computer's file system.

9. What is the use of fork() and exec() ?

fork() and exec() both are system calls that are used to create and start a new
processes. The main difference between fork and exec is, fork() creates a new
process by producing a duplicate of the current calling process, whereas, exec()
replace the entire current calling process with a new program altogether.

10. Name the four main object types of Virtual File System.

The four primary object types of the VFS are:

The superblock object, which represents a specific mounted filesystem.


The inode object, which represents a specific file.
The dentry object, which represents a directory entry, which is a single component
of a path.
The file object, which represents an open file as associated with a process.

You might also like