Q1
Q1
C. 1.Process: Process is an instance of a program that is being executed. It includes the program
code and it’s current activity.
2.Program : A program is a set of instruction written In a programming language that
specifies a task to be performed by the instruction.
E. Page Fault :
Page fault occurs when a program tries to access a portion of memory that is not currently
mapped to the physical memory by the operating system.
Segmentation:
Segmentation is a memory management technique where memory is divided into multiple
segments based on the logical division of the program.
Q2.
A. Dual modes of operation of an operating system are kernal mode and user mode.
i) User mode :
In user mode, applications run with limited storage. They can not directly access
hardware or critical memory area.
Certain meachine instructions are not allowed to execute in user mode.
Process in user mode are isolated from each other to prevent one process from
interfaring with other one.
ii) Kernal mode :
In kernal mode, the operating system has unrestricted access to all hardware and
memory.
The os can execute any machine instruction, including those that interact with
hardware.
All critical and sensitive operations, such as managing memory, process and
hardware, occur in kernal mode.
B. The essential activities done by operating system for protection and sharing are as
follows :
i) Protection:
a) Access control : The OS enforces rules such as who can access what
resources in what manner. It uses mechanism like user account, password
and permission.
b) Authentication : The OS identifies it’s user before granting access. It’s done
using password, account, and biometrics.
c) Authorization: Once authorized the OS insures process can only perform
actions they are authorized to do so.
d) Resource Isolation : The OS isolates processes and their resources from each
other to prevent unauthorized access or interference.
ii) Sharing:
a) File System Management : The OS manages files and directories, allowing
multiple users and processes to share data efficiently and securely.
b) Process Management : OS schedules and manages processes , allowing
multiple processes to run silmultaneously ensuring they do not interfere
with one another.
c) Memory Management: The OS allocates and manages memory
processes ,allowing multiple processes to share memory while ensuring they
do not connect each others data.
d) The OS manages hardware devices and allows multiple users and processes
to share these devices.
C. Interprocess Communication : Interprocess communication refers to a technique that
allows processes to synchronize and communicate with each other. IPC is essential in
multi tasking and multi user operating system where multiple processes may need to
share and collaborate data.
Advantages of Interprocess Communication
i) Data Sharing : Allows processes to exchange data effectively.
ii) Resource Sharing : Enables processors to share files, memory and devices,
optimizing resource use.
iii) Synchronization : Coordinates process activities to ensure orderly and consistent
execution.
iv) Concurrancy : Facilitates simultaneous execution of processes, improving
performance on multi-core system.
v) Fault Isolation : Keeps error in one process from affecting other, enhancing
system reliability.
vi) Distributed Computing: Enables process to communicate across computers.
Essential for scalable applications.
D. Scheduling Criteria : Scheduling criteria are used to evaluate and compare different
scheduling algorithms in operating system.
i) CPU Utilization: Measures the percentage of time the CPU is working. Higher
utilization means the CPU is effectively used.
ii) Throughput : The number of processes that complete their execution per time
unit. Higher is better.
iii) Turnaround time: The total time taken for a process to complete from
submission to finish. Lower is better.
iv) Waiting Time : The total time a process spends in ready queue waiting for CPU
allocation.
v) Response Time: The time from process submission until first response is
produced. Lower response is crucial for interactive systems.
vi) Fairness : Ensures that all processes get an equitable share of CPU time,
preventing starvation of any process.
Q3.
A. PCB : Process Control Box is a data structure used by OS to store all the
information about a process. The information contained in PCB typically
includes :
i) Process ID : Unique identifier for the process.
ii) Process State : Current state of the process.
iii) Program Counter : Address of the next instruction to execute.
iv) CPU Registers : Contents of all process specific registers.
v) Memory Management Information : Information about memory
allocation for the process.
vi) Accounting Information: CPU usage, execution time etc.
B. Deadlock : Deadlock is a condition In which a set of processors becomes
stuck because each process is waiting for resource that is held by another
process in the set, and none of the processes can proceed.
Q4.
A. The difference between Windows operating system and linux operating system is as follows :
B. System calls related to device management are as follows :
i) ‘Open()’ :
This sytem call is used to open a file or a device for reading, writing or both. It
returns a file descriptor that can be used for subsequent operation on the device.
ii) ‘close()’ :
This system call is used to close a