0% found this document useful (0 votes)
2K views23 pages

ADVANCE OPERATING SYSTEM Short Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views23 pages

ADVANCE OPERATING SYSTEM Short Notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Advanced Operating Systems

JNTUK MTECH CSE 1-1


UNIT- 1

Architectures of Distributed Systems:

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.

System Architecture Types:

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.

Issues in Distributed Operating Systems:

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.

Communication Networks and Primitives:

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.

Understanding the architecture types and addressing issues in distributed operating


systems is essential for designing scalable, reliable, and efficient distributed systems.
Communication networks and primitives play a crucial role in facilitating
communication between different components of a distributed system.

Theoretical Foundations of Distributed Systems:

1. Inherent Limitations of a Distributed System:


 CAP Theorem (Brewer's Theorem):
 Consistency, Availability, and Partition Tolerance cannot be
achieved simultaneously in a distributed system.
2. Lamport's Logical Clocks:
 Logical Clocks:
 Introduced by Leslie Lamport.
 Assigns a logical timestamp to events in a distributed system.
 Helps order events even in the absence of a global clock.
3. Vector Clocks:
 Vector Clocks:
 Extension of logical clocks.
 Used to capture causality among events in a distributed system.
 Each process maintains a vector representing its view of the
global time.
4. Causal Ordering of Messages:
 Ensures that events causally related are ordered.
 Achieved using Lamport's logical clocks or vector clocks.
5. Global State:
 Captures the state of a distributed system at a particular instant.
 Global state recording is challenging due to the absence of a global
clock.
6. Cuts of a Distributed Computation:
 Divides a distributed computation into consistent global states.
 Helps in understanding the system's progress and behavior.
7. Termination Detection:
 Identifying when a distributed computation has completed.
 Important for resource management and system cleanup.
8. Fischer-Lynch-Paterson Impossibility Result:
 Proves that achieving consensus in an asynchronous network with
even one faulty process is impossible.

Lamport's Logical Clocks:

 Introduced by Leslie Lamport in 1978.


 Assigns a unique timestamp to each event in a distributed system.
 Rules:
 If event a happens before event b, then timestamp(a) < timestamp(b).
 If two events have the same timestamp, they are concurrent.
 Not based on physical time but provides a partial ordering of events.

Vector Clocks:

 An extension of Lamport's logical clocks.


 Maintains a vector for each process, representing its knowledge of the
global time.
 Rules:
 For each process, if event a happens before event b, then vector(a) <
vector(b).
 Vector is updated during message exchanges to capture causal
relationships.

Causal Ordering of Messages:

 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 and Cuts:

 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:

 Identifying when a distributed computation has completed.


 Important for resource management and system cleanup.
 Challenges include asynchronous communication and the absence of a
global clock.

Understanding these theoretical foundations is crucial for designing and


analyzing distributed systems, especially in addressing challenges related to
coordination, consistency, and fault tolerance.

Distributed Mutual Exclusion, introduction, the classification of


mutual exclusion and associated algorithms, a comparative
performance analysis.

Introduction: Distributed Mutual Exclusion refers to the coordination mechanism in


distributed systems that ensures only one process or node can access a critical
section at a time. This is a fundamental problem in distributed computing where
multiple processes share resources and need to coordinate their access to prevent
conflicts and maintain consistency.

Classification of Mutual Exclusion Algorithms:

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.

Comparative Performance Analysis:


1. Message Complexity:
 Measure of the number of messages exchanged.
 Algorithms with lower message complexity are generally preferred.
2. Time Complexity:
 Measure of the time taken for the algorithm to complete.
 Lower time complexity is desirable for faster access to the critical section.
3. Fault Tolerance:
 Ability of the algorithm to handle process failures or network issues.
 Robust algorithms can continue to function in the presence of failures.
4. Scalability:
 How well the algorithm performs as the number of processes increases.
 Scalable algorithms can handle a growing number of processes efficiently.
5. Fairness:
 Ensures that processes have a fair chance of accessing the critical section.
 Fair algorithms prevent starvation and ensure equal opportunity for all
processes.
6. Implementation Overheads:
 Consideration of additional costs or complexities in implementing the
algorithm.
 Low implementation overhead is preferable.
7. Synchronization Overheads:
 Overheads related to synchronization mechanisms in the algorithm.
 Algorithms with low synchronization overheads are more efficient.

Conclusion:

The choice of a mutual exclusion algorithm depends on the specific requirements of


the distributed system, including the number of processes, fault-tolerance
requirements, and performance considerations. A comparative analysis helps in
selecting the most suitable algorithm based on the system's characteristics and
goals.

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.

Distributed Deadlock Detection:

Introduction: Distributed Deadlock Detection is a mechanism used in distributed


systems to identify and resolve deadlocks, which occur when processes are unable to
proceed because each is waiting for the other to release a resource. Deadlocks can
be especially challenging in distributed environments where resources are distributed
across multiple nodes.

Deadlock Handling Strategies in Distributed Systems:

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.

Issues in Deadlock Detection and Resolution:

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.

Control Organizations for Distributed Deadlock Detection:

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.

Centralized and Distributed Deadlock Detection Algorithms:

1. Centralized Deadlock Detection:


 A single coordinator collects information from all nodes.
 Examples: Wait-Die Algorithm, Wound-Wait Algorithm.
2. Distributed Deadlock Detection:
 Nodes collaborate to exchange information and collectively detect deadlocks.
 Examples: Distributed Resource Allocation Graph (DRAG) Algorithm, Edge
Chasing Algorithm.

Hierarchical Deadlock Detection Algorithms:

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:

Distributed Deadlock Detection is crucial for maintaining the reliability and


performance of distributed systems. The choice between centralized and distributed
approaches, as well as the selection of specific algorithms, depends on factors such
as system architecture, communication overhead, and the desired level of
consistency and timeliness in detecting and resolving deadlocks.

Agreement protocols, introduction-the system model, a classification


of agreement problems, solutions to the Byzantine agreement problem,
and applications of agreement algorithms.
Agreement Protocols:

Introduction - The System Model: Agreement protocols are fundamental


in distributed systems, where multiple entities need to reach a consensus or
agreement on a particular decision or value. The system model involves
multiple nodes (processes or entities) that communicate over a network to
achieve a common goal.

Classification of Agreement Problems:

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

Solutions to the Byzantine Agreement Problem:

1. Practical Byzantine Fault Tolerance (PBFT):


 Uses a voting mechanism to achieve agreement even in the presence
of malicious nodes.
 Tolerates up to one-third of nodes being faulty.
2. Byzantine Generals Problem:
 Addresses the challenge of reaching consensus when some nodes
may act maliciously or fail.
 Various algorithms, such as the Lamport, Shostak, and Pease
algorithm, provide solutions.
3. HoneyBadgerBFT:
 A modern asynchronous Byzantine agreement algorithm designed for
blockchain systems.

Applications of Agreement Algorithms:

1. Blockchain and Cryptocurrencies:


 Achieving consensus among nodes in a decentralized network.
2. Distributed Databases:
 Consensus on distributed transactions and database updates.
3. Cloud Computing:
 Coordination among distributed nodes for resource allocation and
task scheduling.
4. Fault-Tolerant Systems:
 Ensuring agreement even in the presence of faulty or malicious
components.

Conclusion: Agreement protocols are crucial in distributed systems to


enable coordination and consensus among multiple entities. They find
applications in various domains where reliability, fault tolerance, and
coordination are essential for the proper functioning of the system. The
choice of a specific agreement algorithm depends on the characteristics of
the system and the nature of potential failures or malicious behavior.
Introduction and architecture, mechanism for building distributed
file systems design issues, log structured file systems.

Introduction and Architecture of Distributed File Systems:

Introduction: A Distributed File System (DFS) is designed to manage and


provide access to files across multiple nodes in a network. It allows users
and applications to store, retrieve, and manage files as if they were stored
on a single, centralized file system. The primary goal is to achieve
transparency and efficient sharing of files in a distributed environment.

Architecture: The architecture of a Distributed File System typically


consists of the following components:

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.

Mechanism for Building Distributed File Systems:

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.

Log-Structured File Systems:

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.

Log-structured file systems optimize write performance and are well-suited


for scenarios where write-intensive workloads and fault tolerance are critical
considerations. They address some of the challenges associated with
traditional file systems in distributed environments.

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.

Distributed Shared Memory (DSM):

Architecture: Distributed Shared Memory (DSM) is a model that allows multiple


processes running on different nodes in a distributed system to access shared
memory as if it were a single, global address space. The architecture typically
includes the following components:

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.

Algorithms for Implementing DSM:

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.

Memory Coherence and Protocols:

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:

Introduction: Distributed Scheduling involves distributing tasks or processes across


multiple nodes in a distributed system for efficient resource utilization and load
balancing.

Issues in Load Distributing:

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.

Components of a Load Distributing Algorithm:

1. Load Measurement:
 Quantifying the current load on each node.
2. Load Balancing:
 Determining how tasks should be distributed to balance the load.

Stability, Load Distributing Algorithm:

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:

 Evaluating the efficiency and effectiveness of different load distributing algorithms


based on criteria like execution time, system throughput, and resource utilization.

Selecting a Suitable Load Sharing Algorithm:


 Choosing an algorithm based on system requirements, characteristics, and workload
patterns.

Requirements for Load Distributing:

1. Accuracy:
 The algorithm should accurately assess the load on each node.
2. Efficiency:
 Minimizing overhead and ensuring efficient task distribution.

Task Migration and Associated Issues:

 Transferring tasks between nodes to balance the load.


 Issues include data consistency, communication overhead, and task interruption.

Distributed Shared Memory and Distributed Scheduling are essential concepts in


distributed systems, providing mechanisms for efficient resource utilization, load
balancing, and shared memory access across multiple nodes. The choice of
algorithms and protocols depends on the specific requirements and characteristics of
the distributed system.
Failure Recovery and Fault tolerance: introduction, basic concepts,
classification of failures, backward and forward error recovery, backward
error recovery, recovery in concurrent systems, consistent set of check points,
synchronous and asynchronous check pointing and recovery, check pointing
for distributed database systems, recovery in replicated distributed
databases.
Failure Recovery and Fault Tolerance:

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.

Backward and Forward Error Recovery:

1. Backward Error Recovery:


 The system reverts to a previously known state before the occurrence of a
fault.
2. Forward Error Recovery:
 The system continues its operation despite the occurrence of a fault, using
mechanisms such as error correction codes or redundancy.

Recovery in Concurrent Systems:

1. Consistent Set of Checkpoints:


 Defining a consistent set of checkpoints to roll back to in the event of a
failure.
2. Synchronous and Asynchronous Checkpointing and Recovery:
 Synchronous Checkpointing:
 All processes or nodes checkpoint simultaneously.
 Asynchronous Checkpointing:
 Each process or node checkpoints independently.

Checkpointing for Distributed Database Systems:

 Ensuring data consistency and recoverability in distributed database systems through


checkpointing.

Recovery in Replicated Distributed Databases:

 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,

Protection and Security Preliminaries:

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.

Advanced Models of Protection:

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.

cryptography: Model of cryptography, conventional cryptography modern


cryptography, private key cryptography, data encryption standard public key
cryptography, multiple encryptions, authentication in distributed systems.
Cryptography:

Model of Cryptography: Cryptography is the practice and study of techniques for


secure communication in the presence of third parties, or adversaries. The primary
goal is to ensure the confidentiality, integrity, and authenticity of information.

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.

Private Key Cryptography:

 Uses a single secret key for both encryption and decryption.


 The same key must be shared securely between the communicating parties.

Data Encryption Standard (DES):


 A widely used symmetric key algorithm for data encryption.
 Operates on 64-bit blocks of data with a 56-bit key.

Public Key Cryptography:

 Uses a pair of keys: public key and private key.


 The public key is used for encryption, while the private key is used for decryption.
 RSA (Rivest-Shamir-Adleman) is a popular public key algorithm.

Multiple Encryptions:

 Using multiple encryption layers for added security.


 For example, encrypting data with one algorithm and then encrypting the result with
another.

Authentication in Distributed Systems:

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

Conclusion: Cryptography plays a crucial role in ensuring secure communication and


information protection. The evolution from conventional to modern cryptography,
the use of private and public key algorithms, and techniques for multiple encryptions
contribute to building secure systems. Authentication mechanisms, such as digital
signatures and biometrics, enhance the trustworthiness of distributed systems.

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

Multiprocessor Operating Systems:

Basic Multiprocessor System Architectures: Multiprocessor systems


involve multiple processors (or cores) working together on a common task.
The architecture of a multiprocessor system defines how these processors
are connected and how they communicate. Here are some basic
architectures:

1. Symmetric Multiprocessing (SMP):


 All processors share a common memory.
 Each processor has equal access to all resources.
 Common in desktop and server environments.
2. Asymmetric Multiprocessing (AMP):
 Each processor is assigned a specific task.
 Master processor controls the system, and others may be idle until
needed.
 Often used in embedded systems.
3. Multicomputer Architecture:
 Each processor has its own local memory.
 Processors communicate through a network.
 Can be categorized as tightly coupled or loosely coupled.

Interconnection Networks for Multiprocessor Systems: Interconnection


networks define how processors and memory modules are connected in a
multiprocessor system. Different network topologies impact
communication latency and bandwidth. Examples include:

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.

Caching Hypercube Architecture: Caching hypercube is a specific


implementation of hypercube architecture that incorporates cache
memories. Each processor has its cache, and efficient communication is
achieved through the hypercube network.

Multiprocessor Operating System:

Structures of Multiprocessor Operating System:

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.

Operating System Design Issues:

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.

Threads: Threads are lightweight processes within a process. They share


the same resources and can run concurrently. Multithreading is essential for
efficiently utilizing multiprocessor systems.

Process Synchronization and Scheduling:

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.

Conclusion: Multiprocessor operating systems play a crucial role in


harnessing the power of multiple processors for parallel processing. The
choice of system architecture, interconnection network, and operating
system structure influences the performance and efficiency of a
multiprocessor system. Designing an effective multiprocessor operating
system involves addressing issues such as synchronization, scheduling, and
memory management.
Database Operating systems: Introduction, requirements of a
database operating system
Database Operating Systems: Introduction

A Database Operating System (DBOS) is an operating system designed


specifically to manage and support database operations efficiently. It
integrates the capabilities of a traditional operating system with those of a
database management system (DBMS) to provide a comprehensive
environment for handling data storage, retrieval, and manipulation.

Requirements of a Database Operating System:

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.

In summary, a Database Operating System integrates the functionalities of


an operating system and a database management system to provide a
robust and efficient environment for managing data. It must address the
specific requirements related to data management, concurrency control,
security, and recovery to ensure the reliability and performance of database
operations.
Concurrency control :Theoretical aspects, introduction, database systems, a
concurrency control model of database systems, the problem of concurrency
control, serializability theory, distributed database systems, concurrency
control algorithms, introduction, basic synchronization primitives, lock based
algorithms, timestamp based algorithms, optimistic algorithms, concurrency
control algorithms, data replication.
Concurrency Control in Database Systems: Theoretical Aspects

Introduction: Concurrency control in database systems is a crucial aspect that deals


with managing simultaneous access to data by multiple transactions. The goal is to
ensure the consistency of the database despite concurrent execution of transactions.
Various theoretical aspects and models are employed to achieve this.

Concurrency Control Model in Database Systems: A concurrency control model


defines how transactions interact with each other and the database to ensure the
correctness of the final results. Key components include isolation levels, transaction
schedules, and conflict resolution mechanisms.

The Problem of Concurrency Control: Concurrency control addresses issues such


as:

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.

Serializability Theory: Serializability is a concept that ensures that the outcome of a


set of concurrent transactions is equivalent to some serial execution of those
transactions. It is crucial for maintaining the integrity of the database.

Distributed Database Systems: Concurrency control in distributed databases


introduces additional challenges due to the distributed nature of the system. Issues
such as communication delays, node failures, and data partitioning need to be
addressed.

Concurrency Control Algorithms:

Basic Synchronization Primitives:

1. Mutex (Mutual Exclusion):


 Ensures that only one transaction can access a resource at a time.
2. Semaphores:
 Used to control access to a shared resource by multiple transactions.

Lock-Based Algorithms:

1. Two-Phase Locking (2PL):


 Transactions acquire locks on data items and release them only after
completing the transaction.
2. Strict Two-Phase Locking:
 Adds the rule that no new locks can be acquired after releasing any lock.

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:

1. Optimistic Concurrency Control (OCC):


 Transactions are executed without locks, and conflicts are resolved at the end.
2. Multi-Version Concurrency Control (MVCC):
 Maintains multiple versions of a data item to allow concurrent access.

Data Replication: Concurrency control in replicated databases involves ensuring


consistency across multiple replicas. Techniques such as primary copy control and
update everywhere are used.

Conclusion: Concurrency control is a fundamental aspect of database systems,


ensuring that concurrent transactions do not compromise data consistency.
Theoretical aspects, models, and algorithms play a vital role in designing effective
concurrency control mechanisms, especially in distributed and replicated database
environments.

You might also like