ADVANCE OPERATING SYSTEM Short Notes
ADVANCE OPERATING SYSTEM Short Notes
1. Client-Server Architecture:
Centralized server providing services to multiple clients.
Clients request services, and the server responds.
2. Peer-to-Peer (P2P) Architecture:
Decentralized architecture where peers both consume and provide resources
or services.
No central server; each node can act as both client and server.
3. Three-Tier Architecture:
Divides the system into three layers: presentation, application, and data.
Enhances scalability and flexibility.
4. Microservices Architecture:
Decomposes the system into independently deployable and scalable services.
Each service represents a specific business capability.
5. Service-Oriented Architecture (SOA):
Architecture based on the concept of services.
Services are loosely coupled, and communication occurs through standardized
protocols.
1. Centralized Architecture:
Single point of control.
Potential for bottlenecks and single points of failure.
2. Decentralized Architecture:
No single point of control.
Increased fault tolerance but requires coordination mechanisms.
3. Distributed Architecture:
Components work together across multiple locations.
Improved scalability and fault tolerance.
1. Concurrency Control:
Managing concurrent access to shared resources.
2. Fault Tolerance:
Ensuring system reliability in the face of failures.
3. Synchronization:
Coordinating actions of distributed components.
4. Communication:
Efficient communication between distributed nodes.
1. Message Passing:
Direct communication between processes.
2. Remote Procedure Call (RPC):
Invoking procedures on remote machines as if they were local.
3. Sockets:
Communication using sockets, allowing processes on different machines to
exchange data.
Vector Clocks:
Ensures that messages are delivered in an order consistent with the causal
relationships among events.
Lamport's logical clocks and vector clocks are commonly used to achieve
causal ordering.
Global State:
Captures the collective state of all processes in a distributed system.
Hard to determine due to the lack of a global clock.
Cuts:
Divides a distributed computation into consistent global states.
A cut is a snapshot of the distributed system at a specific point in
time.
Termination Detection:
1. Centralized Algorithms:
A central authority or server manages access to the critical section.
Processes send requests to the central authority, which grants access.
Algorithm:
Central Server Algorithm.
2. Distributed Algorithms:
Processes collectively make decisions on who can access the critical section
without a central authority.
Typically categorized into token-based, quorum-based, and voting-based
algorithms.
Algorithm Types:
Token-Based Algorithms:
Processes pass a token to grant access to the critical section.
Example: Ricart-Agrawala Algorithm, Suzuki-Kasami Algorithm.
Quorum-Based Algorithms:
Processes form quorums (subsets of the total processes) to decide
access.
Example: Maekawa's Algorithm, Chandy-Misra-Hass Algorithm.
Voting-Based Algorithms:
Processes vote for access, and a majority vote is required.
Example: Bully Algorithm, Ring-Based Algorithm.
Conclusion:
UNIT – II
Distributed Deadlock Detection, Introduction, deadlock handling strategies in
distributed systems, issues in deadlock detection and resolution, control
organizations for distributed deadlock detection, centralized and distributed
deadlock detection algorithms, hierarchical deadlock detection algorithms.
1. Prevention:
Structuring the system in a way that deadlocks cannot occur.
May involve careful resource allocation, ordering of resource requests, and
timeouts.
2. Avoidance:
Dynamically assesses whether a resource allocation will potentially lead to a
deadlock.
Ensures that the system remains in a safe state by denying resource requests
that may lead to deadlocks.
3. Detection and Recovery:
Identifying the occurrence of a deadlock and taking corrective actions.
Distributed Deadlock Detection is a part of this strategy.
1. Communication Overhead:
Exchange of information among distributed nodes to detect deadlocks.
Can lead to increased network traffic.
2. Consistency:
Ensuring consistency in the detection process across distributed nodes.
Achieving a common understanding of the global state.
3. Timeliness:
Detecting deadlocks promptly to minimize the impact on system performance.
Balancing between accuracy and responsiveness.
1. Centralized Control:
A single node or entity is responsible for coordinating deadlock detection.
Requires regular exchange of information with distributed nodes.
2. Distributed Control:
Responsibilities for deadlock detection are distributed among nodes.
Nodes collaborate to detect and resolve deadlocks.
1. Hierarchical Approaches:
Organizing the system into a hierarchy to simplify deadlock detection.
Each level of the hierarchy is responsible for detecting deadlocks within its
scope.
2. Multilevel Graph Algorithms:
Representing dependencies in a multilevel graph.
Examples: Multilevel Graph Algorithm.
Conclusion:
1. Consensus Problem:
Agreement among a set of nodes to decide on a single value.
2. Byzantine Agreement Problem:
Agreement in the presence of faulty or malicious nodes (Byzantine
failures).
3. Interactive Consistency:
Agreement on individual decisions made by each node.
4. Binary Byzantine Agreement:
A specific case where the decision is binary (e.g., true/false).
1. Client:
Initiates file operations and interacts with the DFS.
Requests file services and communicates with the servers.
2. Server:
Manages the storage and retrieval of files.
Maintains file metadata and handles client requests.
3. Metadata Server:
Manages file metadata, including information such as file names,
permissions, and locations.
Helps in resolving file-related queries from clients.
4. Communication Network:
Facilitates communication between clients and servers.
Ensures reliable data transfer and coordination.
1. Replication:
Multiple copies of files are stored on different servers for fault
tolerance and load balancing.
Enhances data availability and resilience.
2. Partitioning:
Large files or file systems are divided into partitions or shards.
Improves parallel access and reduces contention.
3. Caching:
Frequently accessed data is stored in local caches, reducing the need
to access remote servers.
Enhances performance by minimizing network traffic.
4. Consistency Mechanisms:
Ensures that multiple replicas of data remain consistent.
Techniques such as quorum-based consistency are employed.
Design Issues:
1. Consistency:
Balancing consistency and availability in the face of updates and
failures.
Choosing an appropriate consistency model based on application
requirements.
2. Scalability:
Supporting a growing number of users and data without
compromising performance.
Distributed systems should scale horizontally by adding more nodes.
3. Fault Tolerance:
Handling server failures, network partitions, and ensuring continuous
availability.
Replication and redundancy are common techniques for fault
tolerance.
4. Security:
Ensuring data integrity, access control, and protection against
unauthorized access.
Encryption and secure authentication mechanisms are essential.
1. Overview:
Organizes data as a sequence of logs or records.
Write operations are performed sequentially in the log.
2. Advantages:
Improved write performance due to sequential writes.
Simplifies garbage collection and reduces fragmentation.
3. Examples:
Log-Structured File System (LFS) and its variations.
Commonly used in distributed storage systems and some file
systems.
UNIT- 3:
Distributed shared memory, Architecture, algorithms for implementing DSM, memory
coherence and protocols, design issues. Distributed Scheduling, introduction, issues in
load distributing, components of a load distributing algorithm, stability, load distributing
algorithm, performance comparison, selecting a suitable load sharing algorithm,
requirements for load distributing, task migration and associated issues.
1. Nodes/Processors:
Individual computing units where processes execute.
2. Memory Modules:
Local memories associated with each node.
3. Interconnection Network:
Facilitates communication between nodes.
4. DSM Software:
Manages the coherence and consistency of the shared memory.
1. Page-Based DSM:
Divides the shared memory into pages.
Each node maintains a page table indicating the location of pages.
2. Invalidation-Based DSM:
Employs a scheme where a node invalidates its local copy of a page when
another node writes to it.
3. Update-Based DSM:
Allows nodes to update their local copies of a page independently.
1. Memory Coherence:
Ensures that all processors in the system observe a consistent view of the
shared memory.
2. Protocols:
Write-Once Protocol:
Allows a node to write to a page only once.
Invalidation-Based Protocol:
Invalidates local copies of a page when another node writes to it.
Update-Based Protocol:
Allows nodes to update their local copies independently.
Design Issues:
1. Consistency Models:
Defines the order in which memory operations are observed by different
nodes.
2. Access Granularity:
Determines the size of the shared memory segments (e.g., pages, objects).
3. Synchronization Mechanisms:
Ensures proper coordination between processes accessing shared memory.
4. Fault Tolerance:
Handling node failures and ensuring system stability.
Distributed Scheduling:
1. Imbalance:
Non-uniform distribution of tasks, leading to some nodes being overloaded
while others are underutilized.
2. Overhead:
The cost associated with task migration and coordination.
3. Scalability:
Ensuring the load distribution algorithm scales with the increasing number of
nodes.
1. Load Measurement:
Quantifying the current load on each node.
2. Load Balancing:
Determining how tasks should be distributed to balance the load.
1. Stability:
The ability of the system to maintain a balanced load over time.
2. Load Distributing Algorithm:
Examples include Centralized Load Distribution, Decentralized Load
Distribution, and Dynamic Load Distribution.
Performance Comparison:
1. Accuracy:
The algorithm should accurately assess the load on each node.
2. Efficiency:
Minimizing overhead and ensuring efficient task distribution.
Introduction: Failure recovery and fault tolerance are critical aspects of designing
and managing distributed systems. These concepts aim to ensure that a system can
continue its operation in the presence of faults or failures and recover from
unexpected events.
Basic Concepts:
1. Fault:
Any abnormal condition or defect that disrupts the normal operation of a
system.
2. Failure:
The inability of a system or component to perform its required functions.
3. Fault Tolerance:
The ability of a system to continue its normal operation despite the
occurrence of faults.
4. Recovery:
The process of restoring a system to a consistent state after a failure.
Classification of Failures:
1. Transient Failures:
Temporary failures that can be resolved by retrying the operation.
2. Intermittent Failures:
Failures that occur sporadically and may require special handling.
3. Permanent Failures:
Irreversible failures that typically require system reconfiguration or
replacement of faulty components.
Strategies for recovering from failures in distributed databases with replicated data.
Conclusion: Failure recovery and fault tolerance mechanisms are crucial for ensuring
the reliability and availability of distributed systems. Backward and forward error
recovery strategies, along with consistent checkpointing and recovery mechanisms,
play a key role in mitigating the impact of faults and failures. The choice of recovery
strategies depends on the characteristics of the distributed system, the nature of
failures, and the desired level of fault tolerance.
UNIT- 4:
Protection and security, preliminaries, the access matrix model and its
implementations.-safety in matrix model, advanced models of protection. Data
security,
Access Matrix Model and Its Implementations: The Access Matrix Model is a fundamental
concept in computer security, representing the rights or permissions of subjects to access objects
in a computer system. It is a crucial tool for access control.
1. Preliminaries:
Security Goals:
Confidentiality, Integrity, Availability.
Security Threats:
Unauthorized access, data breaches, denial of service attacks.
2. Access Matrix Model:
Elements:
Subjects (S) - entities that can perform actions.
Objects (O) - resources or data.
Rights or Permissions (R) - define what actions subjects can perform on objects.
Representation:
A matrix where rows represent subjects, columns represent objects, and entries
represent permissions.
Operations:
Grant:
Assigning a permission to a subject on an object.
Revoke:
Removing a permission from a subject on an object.
Safety in Matrix Model:
Ensuring that matrix operations do not violate security policies.
Principles like the "Principle of Complete Mediation" state that every access
attempt must be checked for permission.
3. Implementations:
Access Control Lists (ACLs):
A list associated with an object specifying which subjects have what permissions.
Capability Lists:
A list associated with a subject specifying which objects the subject can access
and what operations are allowed.
1. Bell-LaPadula Model:
Focuses on maintaining confidentiality.
Defines rules to prevent unauthorized subjects from reading classified information.
2. Biba Model:
Emphasizes integrity.
Prevents subjects from compromising the integrity of objects.
3. Clark-Wilson Model:
Ensures integrity of data through well-formed transactions.
Specifies rules for the transformation of data.
4. Role-Based Access Control (RBAC):
Assigns roles to subjects, and permissions are associated with roles.
Simplifies management by grouping users based on their roles.
Data Security: Data security involves protecting data from unauthorized access, disclosure,
alteration, and destruction. Key aspects of data security include:
1. Encryption:
Encoding data to make it unreadable without the appropriate decryption key.
2. Authentication:
Verifying the identity of users or systems before granting access.
3. Authorization:
Granting or denying access based on authenticated user roles or permissions.
4. Auditing and Monitoring:
Keeping track of access and changes to data for accountability.
5. Backup and Recovery:
Regularly backing up data to prevent data loss and facilitating recovery.
6. Secure Transmission:
Ensuring that data transmitted over networks is secure through protocols like SSL/TLS.
Conclusion: Effective protection and security involve understanding and implementing access
control models, advanced protection models, and comprehensive data security measures. The
combination of these strategies helps safeguard systems, networks, and sensitive data against a
variety of security threats.
1. Conventional Cryptography:
Also known as symmetric or private key cryptography.
Uses a single secret key for both encryption and decryption.
Examples include classical ciphers (Caesar cipher, substitution cipher).
2. Modern Cryptography:
Involves both symmetric (private key) and asymmetric (public key)
cryptography.
Uses mathematical algorithms for encryption and decryption.
Modern cryptographic protocols are widely used in securing communications
over the internet.
Multiple Encryptions:
Ensures that the communicating parties are who they claim to be.
Involves the use of cryptographic techniques to establish trust.
1. Digital Signatures:
A digital signature provides proof of the origin, identity, and status of an
electronic document, transaction, or message.
2. Public Key Infrastructure (PKI):
A framework that manages digital keys and certificates for secure
communication.
Involves a certificate authority (CA) that verifies the identity of entities and
issues digital certificates.
3. Challenge-Response Authentication:
Involves proving identity by responding correctly to a challenge.
Typically used in password-based authentication.
4. Biometric Authentication:
Using biological characteristics, such as fingerprints or iris patterns, for user
authentication.
UNIT- 5:
Multiprocessor operating systems, basic multiprocessor system architectures,
inter connection networks for multiprocessor systems, caching hypercube
architecture. Multiprocessor Operating System, structures of multiprocessor
operating system, operating system design issues, threads, process
synchronization and scheduling
1. Bus-Based Interconnection:
Processors share a common bus for communication.
Limited scalability due to contention for the bus.
2. Crossbar Switching:
Direct connections between processors and memory.
High bandwidth but can be complex and expensive.
3. Mesh Network:
Processors are connected in a grid-like structure.
Scalable and efficient for local communication.
4. Hypercube Architecture:
Processors are arranged in a hypercube topology.
Efficient for parallel processing and communication.
1. Master-Slave Structure:
One processor acts as the master and coordinates tasks.
Other processors (slaves) execute assigned tasks.
2. Shared Memory Structure:
All processors have access to a shared global memory.
Requires mechanisms for synchronization and data consistency.
3. Distributed Operating System:
Each processor has its own local memory.
Processors communicate through message passing.
1. Scheduling:
Efficient allocation of tasks to processors.
2. Process Synchronization:
Ensuring proper coordination between concurrent processes.
3. Memory Management:
Managing shared memory in SMP systems or distributed memory in
multicomputer systems.
4. Communication Mechanisms:
Establishing efficient communication channels between processors.
1. Synchronization:
Ensuring orderly execution of concurrent processes.
Techniques include semaphores, mutexes, and barriers.
2. Scheduling:
Assigning tasks to processors based on priority and load balancing.
Strategies include round-robin, priority-based, and real-time
scheduling.
1. Concurrency Control:
DBOS must support mechanisms to manage concurrent access to the
database by multiple users or applications. This involves ensuring that
transactions can execute simultaneously without compromising data
consistency.
2. Transaction Management:
The operating system should provide transaction management
features, including the ability to begin, commit, and rollback
transactions. It ensures the atomicity, consistency, isolation, and
durability (ACID properties) of transactions.
3. Data Security:
Security features are critical to protect sensitive data. DBOS should
include authentication and authorization mechanisms, encryption,
and access controls to restrict unauthorized access to the database.
4. Data Integrity:
Ensuring the accuracy and consistency of data is essential. DBOS
must enforce integrity constraints, such as unique key constraints and
referential integrity, to maintain data quality.
5. Query Optimization:
Efficient execution of database queries is crucial for performance.
DBOS should include query optimization techniques to enhance the
speed of data retrieval by selecting the most efficient execution plan.
6. Concurrency Recovery:
In the event of a system failure or crash, DBOS should provide
mechanisms for recovery to restore the database to a consistent
state. This involves techniques like logging and checkpoints.
7. Resource Management:
Efficient allocation and management of system resources, such as
memory, CPU, and disk space, are essential. DBOS must prioritize and
allocate resources effectively to ensure optimal database
performance.
8. Backup and Recovery:
DBOS should support regular backup and recovery procedures to
prevent data loss. This includes features for creating backup copies of
the database and recovering data in case of disasters.
9. Data Independence:
Database operating systems should provide a level of abstraction that
allows applications to interact with the database without being
affected by changes to the underlying data structures or
organization.
10. User Interface:
A user-friendly interface is important for administrators and database
users. It should provide tools for managing and monitoring the
database, as well as querying and reporting capabilities.
11. Scalability:
The ability of the DBOS to scale with growing data volumes and user
loads is crucial. It should be designed to handle increased demands
on performance and storage capacity.
12. Concurrency and Deadlock Handling:
DBOS should manage concurrent transactions efficiently and handle
situations where multiple transactions may compete for the same
resources, leading to potential deadlocks.
1. Lost Updates: When multiple transactions try to update the same data concurrently,
one update may be lost.
2. Inconsistent Retrievals: Concurrent reads and writes can result in inconsistent data
retrieval.
3. Uncommitted Data: Accessing data that is yet to be committed by another
transaction can lead to problems.
Lock-Based Algorithms:
Timestamp-Based Algorithms:
1. Timestamp Ordering:
Assigns a unique timestamp to each transaction and orders transactions based
on their timestamps.
2. Thomas Write Rule:
Ensures that a transaction can only write to a data item if its timestamp is the
most recent.
Optimistic Algorithms: