os
os
b) What is starvation?
Starvation occurs when a process waits indefinitely because higher-priority processes keep
executing and preventing it from acquiring the necessary resources.
1. Multitasking
2. Social Media Integration
3. iCloud Storage
4. In-App Purchase
5. Game Center
6. Notification Center
7. Accelerometer & Gyroscope
8. Location Services.
1. Prevention
2. Avoidance (e.g., Banker's Algorithm)
3. Detection and Recovery
4. Ignoring the problem (Ostrich Algorithm).
m) What is rollback?
Rollback is a recovery mechanism where a process is returned to a previous safe state to
avoid deadlock.
1. Mutual Exclusion
2. Hold and Wait
3. No Pre-emption
4. Circular Wait.
1. Deadlock Prevention
2. Deadlock Avoidance
3. Deadlock Detection and Recovery
4. Ignoring Deadlocks.
1. First-Fit
2. Best-Fit
3. Worst-Fit
4. Paging
5. Segmentation
1. Sequential Access
2. Direct (Random) Access
3. Indexed Sequential Access.
v) Newly created directories will have two entries automatically in it. Comment.
True. A newly created directory usually contains two entries:
4 Marks
Cluster computing refers to a system where multiple computers (nodes) are connected and
work together to perform computationally intensive tasks. Each node in the cluster operates
independently but is managed by a single master node, allowing parallel processing and
resource sharing.
Advantages:
Disadvantages:
Disk formatting is the process of preparing a storage device (HDD, SSD) for use by an
operating system.
Before a disk can store data, it must be divided into sectors that the disk controller can read
and write and this process is called low-level formatting or physical formatting.
The header and trailer contain information used by the disk controller such as a sector
number and an ECC (Error Correcting Code).
Types of Formatting:
Purpose:
Advantages:
Disadvantages:
1. Closed architecture.
2. Limited number of applications.
3. Dated browser.
4. Strict application approval process.
f) List architectural styles in distributed operating systems & explain any one
in detail.
Architectural Styles:
1. Layered Architecture
2. Object-based Architecture
3. Resource-cantered Architecture
4. System Architecture
• Each layer in layered architecture style uses the previous layer to implement new
functionality that is exported to the layer above.
• The layered architecture separates layers of components from each other, giving it a
much more modular approach.
• In layered architecture each interaction is sequential where a layer will contact the
adjacent layer and this process continues, until the request is catered to.
• The layers on the bottom provide a service to the layers on the top. The request
flows from top to bottom, whereas the response is sent from bottom to top.
• The advantage of using a layered approach is that the calls always follow a
predefined path and that each layer can be easily replaced or modified without
affecting the entire architecture.
A deadlock is a situation where a group of processes are waiting indefinitely for resources
held by each other.
A deadlock happens in operating system when two or more processes need some resource to
complete their execution that is held by the other process.
2. Kill One Process at a Time Until the Deadlock is Eliminated: This scheme/
method involves a lot of overhead, since after killing each process; deadlock detection
algorithm must be invoked to determine whether any processes are still deadlocked.
Another method to recover the system from the state of deadlock is to pre-empt the
resources from the processes one by one and allocate them to other processes until the
circular wait condition is eliminated.
In this method successively, some resources are preempted and given to other
processes unless a deadlock is broken.
The process, from which resource or resources are preempted, will not be able to
continue execution, such process is roll backed partially or completely, to some safe
state.
h) List different file allocation methods and explain any one in detail.
Advantages:
1. No external fragmentation because any free block is used to satisfy the request.
2. Files can grow any time as the free blocks are available.
Disadvantages:
2. Memory is required for storing the pointers. Therefore, the file requires slightly
more space.
3. Reliability is a big problem. Since disk blocks are linked by pointers, a single
damaged pointer can make thousands of disk blocks inaccessible. So, we cannot
access any portion of the file or entire file.
A tree structure directory is the most common directory structure. The tree has a root
directory, and every file in the system has a unique path name.
1. An absolute path name begins at the root and follows the path down to the specified file,
giving the directory names on the path.
2. A relative path name defines a path from the current directory to that specified file.
The tree structured directory system doesn't allow the same file to exist in multiple directories
therefore sharing is a major concern in tree structured directory systems.
Advantages:
1. Users can create a directory as well as subdirectory.
2. Users can access the files of other users.
3. Very generalize, since full path names can be given.
Disadvantages:
1. The tree structure can create duplicate copies of the files.
2. The users could not share files or directories.
3. It is inefficient, because accessing a file may go under multiple directories.
The kernel is the core of an operating system. It is the software responsible for running
programs and providing secure access to the machine's hardware.
• The kernel relies upon software drivers that translate the generic command into instructions
specific to that device.
• The kernel provides and manages computer resources, allowing other programs to run and
use these resources.
• The core programs and data of an operating system together comprise the kernel. The kernel
consists of the code that runs the operating system on a CPU and the data - typically
organized in tables - that are used to keep track of how things are running on an operating
system.
• The kernel is where the access to hardware is done and the kernel implements the operating
system ‘s design model.
offering:
1. Process Scheduling
2. Memory Management
3. Power Management
4. Real-time Processing
o the mutual exclusion condition must hold for non-sharable resources. That is,
several processes cannot simultaneously share a single resource.
o This condition is difficult to eliminate because some resources, such as the tape
drive and printer, are inherently non-shareable.
o the printer can work for only one process at a time. It cannot print data being sent as
output from more than one process simultaneously. Hence, the condition of mutual
exclusion cannot be eliminated in case of all the resources.
o Whenever a process requests for a system resource, the priority number of the
required resource is compared with the priority numbers of the resources already held
by it.
Deadlock Conditions:
The resources involved are non-shareable. Only one process at a time can use a
resource.
At least one resource (thread) must be held in a non-shareable mode, that is, only one
process at a time claims exclusive control of the resource. If another process requests
that resource, the requesting process must be delayed until the resource has been
released.
2. Hold and Wait – Processes hold some resources while waiting for others.
A process holding at least one resource is waiting to acquire additional resources held
by other processes.
There must be a process that is holding a resource already allocated to it; while
waiting for additional resources that are currently being held by other processes.
Resources cannot be removed from the processes until its completion or released
voluntarily by the process holding it.
The processes in the system form a circular list or chain; where each process in the list
is waiting for a resource held by the next process in the list.
n) Explain "select a victim and rollback" in deadlock recovery.
This strategy involves selecting a process to terminate (victim) and rolling it back to a safe
state to resolve deadlock.
NFS is a client-server architecture that allows remote file access over a network.
The NFS is architecture of the client/server, which contains a client program, server program,
and a protocol that helps for communication between the client and server.
The basic idea behind NFS is that each file server provides a standardized view of its local
file system.
NFS comes with a communication protocol that allows clients to access the files stored on a
server, thus allowing a heterogeneous collection of processes, possibly running on different
operating systems and machines, to share a common file system.
Components: