AptDC 9-10
AptDC 9-10
Experiment No: 9
Aim: Case Study of Distributed File Systems: AFS (Andrew File System) and CODA
Distributed File Systems (DFS) are designed to allow multiple users to access and share files
across a network in a way that looks and feels like a local file system. AFS (Andrew File
System) and CODA are two prominent DFS that have been widely discussed and studied for
their design and impact on distributed computing. Below is a detailed case study of both
systems, exploring their architectures, design principles, strengths, weaknesses, and use
cases.
Overview
The Andrew File System (AFS) was developed at Carnegie Mellon University in the 1980s
and is one of the most well-known examples of a distributed file system. AFS was designed
with the aim of providing high performance, scalability, and transparency for users accessing
files across a wide-area network.
Components of AFS
1. File Servers: These servers store the actual file data. They handle file requests, such as
reading, writing, and modifying files.
2. AFS Clients: Clients use the AFS file system as though it is a local file system. They
can access, create, and modify files just as they would with a traditional file system.
AFS clients employ local caching to enhance performance.
Atharva Thakur 221042007 72
3. Volume Management: Files are divided into volumes in AFS. A volume is a collection
of directories and files stored on a single server. Volumes allow easier management of
data by creating logical partitions for data storage.
4. File and Directory Structure: AFS provides a hierarchical directory structure that is
globally accessible. The global namespace means that any file can be accessed by any
client, regardless of its physical location on the network.
5. Authentication: AFS uses Kerberos authentication to ensure secure and authenticated
access to the file system.
6. Cache Manager: Each AFS client has a Cache Manager that is responsible for caching
files locally, thereby improving performance and reducing load on the server.
Advantages of AFS
• Transparency: AFS provides a transparent user experience, where users do not need to
know the physical location of the files.
• Performance: The use of client-side caching reduces network load and improves
access times for frequently used files.
• Scalability: The system was designed to scale well across large numbers of clients and
geographically distributed locations.
• Security: AFS's use of Kerberos for authentication provides a robust security
mechanism.
Disadvantages of AFS
Overview
The CODA file system was developed as an extension of AFS and is designed to provide
high availability and fault tolerance in the face of network partitions or server crashes. CODA
was developed by Carnegie Mellon University as well, with an emphasis on mobile
computing and improving AFS's handling of network partitions.
Components of CODA
1. Coda Server: These are the central servers that store files and maintain file metadata.
A server in CODA is responsible for ensuring data consistency and managing
replication.
2. Coda Client: The client caches files locally for offline use and ensures data is
synchronized when the client reconnects to the network.
3. Cache Manager: Like AFS, CODA clients have a Cache Manager that is responsible
for caching data, ensuring that files are available even when the client is disconnected.
4. Volume Management: CODA uses a volume-based storage model, similar to AFS, to
manage the storage of files.
5. Replication Manager: CODA has a Replication Manager that ensures files are
replicated across multiple servers, enhancing fault tolerance and reducing server load.
6. Authentication: CODA relies on Kerberos authentication for access control and secure
file access.
Atharva Thakur 221042007 72
Advantages of CODA
Disadvantages of CODA
Fault Tolerance Provides basic file replication Provides automatic recovery from
and Availability across servers for fault tolerance, network partitions and supports
but lacks automatic recovery from client disconnection, allowing
network partitions or client clients to work offline and replicate
disconnections. changes when reconnected. It uses
more advanced file replication and
fault tolerance.
Conclusion
Both AFS and CODA were groundbreaking in their time and continue to influence distributed
file systems today. AFS was designed for scalability and transparency in a research and
academic environment, whereas CODA extended AFS's design to handle issues like network
partitions, disconnected operation, and enhanced fault tolerance.
• AFS is a great choice for centralized environments where clients are generally always
connected, such as large university campuses or enterprise intranets.
• CODA, with its focus on disconnected operation and fault tolerance, is ideal for
environments with mobile or intermittent network access, such as for remote
fieldwork or mobile computing.
While both systems have been largely superseded by more modern DFS solutions (e.g., Ceph,
Google File System, HDFS), they remain important historical examples that laid the
groundwork for many of the features and capabilities in today's distributed systems.
Atharva Thakur 221042007 72
Experiment No: 10
The Android Stack is a comprehensive software architecture that powers Android devices,
providing the framework for building and running mobile applications. Android, developed
by Google, is an open-source operating system for mobile devices, with over 70% market
share globally. This case study provides a detailed analysis of the Android Stack, breaking
down its key components and how they contribute to the overall system.
The Android Stack is built on a multi-layered architecture that includes the Linux kernel, the
hardware abstraction layer (HAL), the Android runtime, libraries, and the application
framework. On top of this stack, you have the applications (including both system apps and
user apps).
The stack can be divided into five major layers, each with a specific responsibility in the
system:
1. Linux Kernel
The Linux Kernel forms the foundation of the Android operating system. It provides the
essential services needed for device hardware abstraction, memory management, and process
scheduling. The kernel is responsible for managing the system’s hardware resources and
ensuring that the operating system runs efficiently.
The Hardware Abstraction Layer acts as a bridge between the hardware and the software
running on Android. The HAL defines standard interfaces that the system can use to access
hardware without needing to understand the underlying specifics of the hardware. This
separation allows Android to run on different hardware platforms.
• Hardware Interface: Provides an abstraction for the device’s hardware like sensors,
camera, Bluetooth, etc.
• Interfacing with Drivers: Communicates with drivers in the kernel to interact with the
actual hardware.
• Modularity: HAL makes it easier to implement platform-specific features by keeping
the core system independent of hardware.
Android apps are primarily written in Java (or Kotlin), but to run on Android devices, they
need to be compiled into an intermediate format. The Android Runtime (ART) executes these
compiled applications. ART is the successor of the Dalvik Virtual Machine (DVM) and was
introduced to improve performance and reduce power consumption.
4. Application Framework
The Application Framework is the layer that provides the essential tools and APIs for
developers to build Android applications. It contains all the necessary components that help
developers access the underlying system services.
5. Applications
At the top of the Android stack, the Applications Layer is where end-users interact with the
system. Android devices come pre-installed with system apps (such as Phone, Messaging,
Contacts, Camera, etc.), and users can install additional third-party apps from the Google
Play Store.
• User Interface: Apps are designed using XML layout files and the Android
framework’s View class, which manages UI elements.
• Activity: The fundamental unit of user interaction in an Android app. An activity
represents a single screen with which users can interact.
• Services: Apps can run background processes using services, such as playing music or
performing network operations.
• Broadcast Receivers: These components listen for system-wide events (e.g., when a
phone is charging or when Wi-Fi is connected) and can trigger actions in apps.
• Content Providers: Enable sharing of data between different apps in a secure manner.
Atharva Thakur 221042007 72
Conclusion
The Android Stack is a powerful and flexible system that has enabled Android to become the
most widely used mobile OS globally. Its layered architecture ensures that the system is
highly adaptable to various hardware configurations while providing developers with robust
tools and APIs to build feature-rich applications. However, challenges like fragmentation,
security, and battery management remain significant areas for improvement. Despite these
challenges, Android's open-source nature, extensive libraries, and massive app ecosystem
continue to make it a popular choice for both developers and consumers worldwide.