Professional Documents
Culture Documents
Operating System 2 Marks
Operating System 2 Marks
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.
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.
6. What is thrashing?
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.
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.
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.