0% found this document useful (0 votes)
4 views

os

The document covers various concepts related to operating systems, including attributes of files, definitions of starvation, mobile OS features, access transparency, and deadlock. It discusses methods for deadlock handling, file allocation methods, and the architecture of distributed systems. Additionally, it outlines advantages and disadvantages of cluster computing, mobile OS, and tree-structured directories.

Uploaded by

pravinalte12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

os

The document covers various concepts related to operating systems, including attributes of files, definitions of starvation, mobile OS features, access transparency, and deadlock. It discusses methods for deadlock handling, file allocation methods, and the architecture of distributed systems. Additionally, it outlines advantages and disadvantages of cluster computing, mobile OS, and tree-structured directories.

Uploaded by

pravinalte12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

2 Marks

a) List any four attributes of files.

1. Name – The symbolic file name, usually a string of characters.


2. Identifier – A unique tag, usually a number that identifies the file within the file
system.
3. Type – Information needed for systems that support different types of files.
4. Location – A pointer to a device and location of the file on that device.

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.

c) List the features of iOS mobile OS.

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.

d) What is Access Transparency?


Access transparency refers to the ability to access both local and remote system objects in a
uniform way, hiding the physical separation from the user.

e) Define mobile OS.


A mobile OS is a software platform designed to run on mobile devices like smartphones,
PDAs, and tablets. It manages hardware, resources, memory, and optimizes application
efficiency.

f) Define rotational latency.


Rotational latency is the delay waiting for the desired disk sector to rotate under the read-
write head after seeking.

g) Define claim edge.


A claim edge in a resource allocation graph indicates that a process may request a resource in
the future but has not yet acquired it.

h) What is cloud computing?


Cloud computing is a technology that allows users to access and store data and applications
on remote servers instead of local devices, providing on-demand computing services.

i) Define P2P architecture.


Peer-to-peer (P2P) architecture is a network structure where nodes (computers) act as both
clients and servers, sharing resources directly without relying on a centralized server.
j) Define native-level programming.
Native-level programming refers to developing applications that run directly on an operating
system using platform-specific languages and APIs for optimal performance.

k) Wait-for graph is used for deadlock avoidance in a system. T/F


False. The wait-for graph is used for deadlock detection, not avoidance.

l) What is deadlock? List different methods to handle deadlock.


A deadlock occurs when a set of processes are blocked, each waiting for a resource held by
another process. Methods to handle deadlocks include:

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.

n) Define request & claim edge.

• Request Edge: A directed edge from a process to a resource, indicating a request.


• Claim Edge: A directed edge from a process to a resource indicating a potential
future request.

o) How is the system prevented from deadlock?


Deadlock prevention strategies ensure that at least one of the four necessary conditions for
deadlock (mutual exclusion, hold and wait, no pre-emption, circular wait) does not occur.

p) State necessary conditions for deadlock to occur.

1. Mutual Exclusion
2. Hold and Wait
3. No Pre-emption
4. Circular Wait.

q) List deadlock handling techniques.

1. Deadlock Prevention
2. Deadlock Avoidance
3. Deadlock Detection and Recovery
4. Ignoring Deadlocks.

r) List dynamic allocation memory management methods.

1. First-Fit
2. Best-Fit
3. Worst-Fit
4. Paging
5. Segmentation

s) What is a bit vector?


A bit vector is a series or collection of bits where each bit corresponds to a disk block,
representing allocated or free space.

t) Define acyclic graph directory.


An acyclic graph directory is a structure that allows directories to share subdirectories and
files without forming cycles.

u) Write the file access methods.

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:

1. "." (dot) – Represents the current directory.


2. ".." (dot dot) – Represents the parent directory.

w) Define rotational latency.


Rotational latency is the time it takes for the desired sector of a disk to rotate under the
read/write head.

4 Marks

a) Define cluster computing. State the advantages and disadvantages of the


cluster operating system.

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:

1. Cost-effectiveness – More cost-effective than mainframe systems.


2. Processing Speed – High computational power.
3. Scalability & Expandability – Additional nodes can be added as needed.
4. High Availability – Failure of one node does not disrupt the whole system.
5. Flexibility – New hardware and software can be integrated easily.
6. Reliability – Even in case of failures, the system continues to operate.

Disadvantages:

1. High Cost – Requires additional hardware and networking.


2. Complex Monitoring – Needs efficient monitoring tools.
3. Difficult to Manage – Requires skilled professionals for maintenance.

b) Differentiate mobile OS and desktop OS.

c) Explain disk formatting in disk management.

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:

1. Low-Level Formatting (Physical Formatting) – Divides the disk into sectors,


adding headers and ECC.
2. Partitioning – Dividing the disk into logical partitions.
3. High-Level Formatting (Logical Formatting) – Creates file systems like NTFS,
FAT, etc.
d) What is a distributed operating system? List its purpose.

A distributed operating system is a system where multiple computers communicate and


coordinate over a network, appearing as a single system to users.

Distributed systems with multiple computers connected through communication channels to


facilitate information sharing and cooperative work are commonplace.

Purpose:

1. Scalability: A distributed system running on a collection of a small number of


machines can be easily extended to a large number of machines to increase the
processing power.
2. Resource Sharing: In a distributed system, the resources - hardware, software and
data can be easily shared among users. For example, a printer can be shared among a
group of users.
3. Fault Tolerance – System can function even if one node fails.
4. Transparency – Hides system complexity from users.
5. Concurrency: The processing concurrency can be achieved by sending requests to
multiple machines connected by networks at the same time.

e) List advantages and disadvantages of Windows Mobile OS.

Advantages:

1. Built-in Microsoft Office support.


2. Multi-tasking support.
3. Available on multiple service providers.
4. Good development tools.
5. Direct updates from Microsoft.

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

In the layered architecture style of distributed systems, components are organized in


layers.

• 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.

g) What is deadlock? Explain different ways of deadlock recovery.

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.

Deadlock Recovery Methods:

1. Process Termination – Killing one or more processes.


1. Kill all Deadlocked Processes: This scheme/method is a very expensive way of
breaking a deadlock. This method will definitely ensure the recovery of a system from
the deadlock.

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.

2. Resource Pre-emption – Forcing processes to release resources.

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.

3. Rollback – Rolling back processes to a safe state.

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.

File Allocation Methods:

1. Contiguous Allocation – Files stored in adjacent blocks.


2. Linked Allocation – Files stored in scattered blocks linked together.
3. Indexed Allocation – Uses an index table to track file blocks.

Example – Linked Allocation:

• Linked allocation is essentially a disk-based version of the linked list. In this


allocation, each file is a linked list of disk blocks which need not be contiguous.
• In this method, a linked list of all blocks belonging to the file is maintained. These
blocks may be scattered through the disk.
• Directory entry contains the name of the file, address of starting block and the last
block. If we want to read a file, we simply follow the pointers.

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.

3. No need to know the size of the file in advance.


4. No disk compaction.

Disadvantages:

1. Only sequential access is possible.

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.

i) Compare cluster, grid & cloud computing.


j) Write a note on tree-structured directories with advantages &
disadvantages.

A tree-structured directory organizes files in a hierarchical structure.

The generalization of two-level directory structure is an arbitrary tree structure directory.

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.

Path names can be of two types i.e., absolute and relative.

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.

k) Write a short note on kernel architecture of mobile OS.

Mobile OS kernels manage system resources,

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

l) Explain deadlock prevention strategies.

1. Eliminating Mutual Exclusion Condition: –

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.

2. Eliminating Hold-and-Wait Condition –


o in order to prevent this condition to hold, we must guarantee that the process
holding some resource does not request for more resources.
o the hold-and-wait condition can be eliminated by not allowing any process to
request for a resource until it releases the resources held by it, which is impractical as
processes may require the resources simultaneously.

3. Eliminating No Pre-emption Condition: –


o the elimination of the no-pre-emption condition means a process can release the
resource held by it.
o If a process requests for a resource held by some other process then instead of
making it wait, all the resources currently held by this process can be preempted.
o the process will be restarted only when it is allocated the requested as well as the
preempted resources.
o Note that only those resources can be preempted whose current working state can be
saved and can be later restored.

4. Eliminating Circular Wait Condition: –

o This condition can be eliminated by assigning a priority number to each available


resource and a process can request system resources only in increasing order.

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.

m) Define deadlock and list necessary conditions for deadlock.

Deadlock Conditions:

1. Mutual Exclusion – Only one process can use a resource at a time.

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.

3. No Pre-emption – Resources cannot be forcibly taken.

Resources already allocated to a process cannot be preempted.

Resources cannot be removed from the processes until its completion or released
voluntarily by the process holding it.

4. Circular Wait – Circular dependency among processes.

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.

Selecting a Victim or Select a Process for Pre-emption: The choice/selection of processes


and resources may be based on following criteria:

(i) Priority: Resources of low priority processes will be preempted.


(ii) Own cost: Process that has completed very less of its execution will pre-
empt its resources.
(iii) Cost affecting other processes: How many maximum processes can restart
their execution if resources of a particular process P are pre-empted?

t) Explain Network File System (NFS) architecture.

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:

1. NFS Client – Requests files from the server.


2. NFS Server – Provides file access.
3. RPC Mechanism – Enables remote procedure calls.

You might also like