0% found this document useful (0 votes)
7 views28 pages

Module 6

Uploaded by

diyawatwani
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)
7 views28 pages

Module 6

Uploaded by

diyawatwani
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/ 28

Module 6: Advanced

Topics in Operating
Systems
By Prof.Rohini Sawant
Cloud-Native Applications,
● Cloud-native applications are designed to take full advantage of cloud computing models
and platforms.
● Cloud-native architecture means adapting to the many new possibilities—but very
different set of architectural constraints—offered by the cloud compared to traditional
on-premises infrastructure. Consider the high level elements that we as software architects
are trained to consider:
● The functional requirements of a system (what it should do, e.g 'process orders in this
format...')
● The non-functional requirements (how it should perform e.g. 'process at least 200
orders a minute')
● Constraints (what is out-of-scope to change e.g. 'orders must be updated on our
existing mainframe system').
● Cloud-native architecture focuses on achieving resilience and scale though horizontal
scaling, distributed processing, and automating the replacement of failed components.
Design principles of Cloud-Native Applications,
1. Design for automation: Automation has always been a best practice for software systems, but cloud makes it
easier than ever to automate the infrastructure as well as components that sit above it. Although the upfront
investment is often higher, favouring an automated solution will almost always pay off in the medium term in
terms of effort, but also in terms of the resilience and performance of your system. Automated processes can
repair, scale, deploy your system far faster than people can. As we discuss later on, architecture in the cloud is
not a one-shot deal, and automation is no exception—as you find new ways that your system needs to take
action, so you will find new things to automate. Some common areas for automating cloud-native systems are:
● Infrastructure: Automate the creation of the infrastructure, together with updates to it, using tools like
Google Cloud Deployment Manager or Terraform
● Continuous Integration/Continuous Delivery: Automate the build, testing, and deployment of the
packages that make up the system by using tools like Google Cloud Build, Jenkins and Spinnaker. Not
only should you automate the deployment, you should strive to automate processes like canary testing and
rollback.
● Scale up and scale down: Unless your system load almost never changes, you should automate the scale
up of the system in response to increases in load, and scale down in response to sustained drops in load.
By scaling up, you ensure your service remains available, and by scaling down you reduce costs.
Design principles of Cloud-Native Applications,
Principle 2: Be smart with state: Storing of 'state', be that user data (e.g., the items in the users shopping cart, or
their employee number) or system state (e.g., how many instances of a job are running, what version of code is
running in production), is the hardest aspect of architecting a distributed, cloud-native architecture. You should
therefore architect your system to be intentional about when, and how, you store state, and design components to be
stateless wherever you can. Stateless components are easy to:

● Scale: To scale up, just add more copies. To scale down, instruct instances to terminate once they have
completed their current task.
● Repair: To 'repair' a failed instance of a component, simply terminate it as gracefully as possible and spin
up a replacement.
● Roll-back: If you have a bad deployment, stateless components are much easier to roll back, since you
can terminate them and launch instances of the old version instead.
● Load-Balance across: When components are stateless, load balancing is much simpler since any instance
can handle any request. Load balancing across stateful components is much harder, since the state of the
user's session typically resides on the instance, forcing that instance to handle all requests from a given
user.
Design principles of Cloud-Native Applications,
Principle 3: Favor managed services: Cloud is more than just infrastructure. Most cloud providers offer a rich set of
managed services, providing all sorts of functionality that relieve you of the headache of managing the backend software
or infrastructure. Broadly speaking, the decision of whether or not to adopt managed services comes down to portability
vs. operational overhead, in terms of both money, but also skills. Crudely, the managed services that you might consider
today fall into three broad categories:

● Managed open source or open source-compatible services: Services that are managed open source (for
instance Cloud SQL) or offer an open-source compatible interface (for instance Cloud Bigtable). This should
be an easy choice since there are a lot of benefits in using the managed service, and little risk.
● Managed services with high operational savings: Some services are not immediately compatible with open
source, or have no immediate open source alternative, but are so much easier to consume than the alternatives,
they are worth the risk. For instance, BigQuery is often adopted by organizations because it is so easy to
operate.
● Everything else: Then there are the hard cases, where there is no easy migration path off of the service, and it
presents a less obvious operational benefit. You’ll need to examine these on a case-by-case basis, considering
things like the strategic significance of the service, the operational overhead of running it yourself, and the
effort required to migrate away.
Design principles of Cloud-Native Applications,
Principle 4: Practice defense in depth: Cloud-native architectures have their origins
in internet-facing services, and so have always needed to deal with external attacks.
Therefore they adopt an approach of defense-in-depth by applying authentication
between each component, and by minimizing the trust between those components
(even if they are 'internal'). As a result, there is no 'inside' and 'outside'.

Cloud-native architectures should extend this idea beyond authentication to include


things like rate limiting and script injection. Each component in a design should seek
to protect itself from the other components. This not only makes the architecture very
resilient, it also makes the resulting services easier to deploy in a cloud environment,
where there may not be a trusted network between the service and its users.
Design principles of Cloud-Native Applications,
Principle 5: Always be architecting

One of the core characteristics of a cloud-native system is that it’s always


evolving, and that's equally true of the architecture. As a cloud-native architect,
you should always seek to refine, simplify and improve the architecture of the
system, as the needs of the organization change, the landscape of your IT systems
change, and the capabilities of your cloud provider itself change. While this
undoubtedly requires constant investment, the lessons of the past are clear: to
evolve, grow, and respond, IT systems need to live and breathe and change. Dead,
ossifying IT systems rapidly bring the organization to a standstill, unable to
respond to new threats and opportunities
Microservices Architecture
Microservices Architecture is a design approach where a software application is structured as a collection of independently deployable,
small, modular services, each of which performs a specific business function and communicates with others through lightweight
mechanisms, typically HTTP APIs.Core Characteristics of Microservices Architecture
1. Single Responsibility Principle
Each microservice is designed to do one thing well.
For example, in an e-commerce app:Order service handles orders, Payment service handles payments
2. Independent Deployability
Services can be developed, tested, deployed, and scaled independently. Enables faster releases and continuous delivery.
3. Decentralized Data Management
Each microservice owns its own database.Promotes autonomy and prevents data coupling between services.
4. Lightweight Communication
Services interact using lightweight protocols like HTTP/REST, gRPC, or messaging queues (e.g., Kafka, RabbitMQ). Communication is
typically stateless.
5. Technology Polyglotism
Each microservice can be built using the best-suited language or framework. E.g., Java for one service, Python for another.
6. Fault Isolation:
Failure in one microservice does not crash the entire system.Services are isolated and resilient to errors in others.
7. Scalability:
Services can be scaled independently based on their demand. For example, a "search" service may need to handle more load than the
"user profile" service.
Microservices Architecture
Components of Microservices Architecture
1. Service Discovery
○ Allows services to find each other dynamically (e.g., using Eureka, Consul).

2. API Gateway
○ Entry point for clients.
○ Routes requests to appropriate services, handles load balancing, authentication, rate limiting (e.g.,
Netflix Zuul, Kong, NGINX).

3. Centralized Monitoring & Logging


○ Tracks service performance and issues (e.g., ELK stack, Prometheus + Grafana, Zipkin for tracing).

4. Service Registry
○ Maintains a registry of available services and their instances.

5. Containers & Orchestration


○ Services run in containers (like Docker), managed via orchestrators (like Kubernetes).
Microservices Architecture
Benefits of Microservices
● Agility: Faster development and deployment cycles.
● Scalability: Fine-grained control over scaling.
● Resilience: Failures are localized.
● Technological freedom: Teams can choose tech stacks independently.
● Better team autonomy: Small teams can own and manage individual services.

Challenges of Microservices
● Complexity: More services = more complexity in deployment and communication.
● Data consistency: Managing transactions across services is hard.
● Latency: Network overhead from inter-service communication.
● Testing: Requires sophisticated integration and contract testing.
Serverless Computing
Serverless computing is a method of providing backend services on an as-used basis. A serverless
provider allows users to write and deploy code without the hassle of worrying about the underlying
infrastructure. A company that gets backend services from a serverless vendor is charged based on
their computation and do not have to reserve and pay for a fixed amount of bandwidth or number of
servers, as the service is auto-scaling. Note that despite the name serverless, physical servers are still
used but developers do not need to be aware of them.

Serverless computing allows developers to purchase backend services on a flexible ‘pay-as-you-go’


basis, meaning that developers only have to pay for the services they use. This is like switching from a
cell phone data plan with a monthly fixed limit, to one that only charges for each byte of data that
actually gets used.

The term ‘serverless’ is somewhat misleading, as there are still servers providing these backend
services, but all of the server space and infrastructure concerns are handled by the vendor. Serverless
means that the developers can do their work without having to worry about servers at all.
Serverless Computing
Key Concepts of Serverless Computing
1. Function-as-a-Service (FaaS)
Developers write functions, not full applications or services.Each function performs a
specific task and is triggered by an event (like an HTTP request, file upload, or timer).
Popular examples:AWS Lambda, Azure Functions, Google Cloud Functions

2. Event-Driven Execution
Functions are invoked in response to events like API calls, Database changes, File uploads

3. Automatic Scaling
Functions scale automatically with demand.Thousands of function instances can run in
parallel, with no manual intervention.

4. Pay-per-Use Pricing
You only pay for the execution time (e.g., milliseconds) and number of invocations. No
cost when the function is idle.
Serverless Computing
Advantages of Serverless Computing
Lower costs - Serverless computing is generally very cost-effective, as traditional cloud
providers of backend services (server allocation) often result in the user paying for unused space
or idle CPU time.

Simplified scalability - Developers using serverless architecture don’t have to worry about
policies to scale up their code. The serverless vendor handles all of the scaling on demand.

Simplified backend code - With FaaS, developers can create simple functions that independently
perform a single purpose, like making an API call.

Quicker turnaround - Serverless architecture can significantly cut time to market. Instead of
needing a complicated deploy process to roll out bug fixes and new features, developers can add
and modify code on a piecemeal basis.
Serverless Computing
Disadvantages of Serverless Computing
● Cold starts
→ Initial function invocations may be slower after idle time.

● Vendor lock-in
→ Functions may be tightly coupled to a specific provider’s ecosystem.

● Limited execution time


→ Functions often have time limits (e.g., 15 minutes on AWS Lambda).

● Debugging and testing complexity


→ Harder to simulate cloud events and environment locally.

● Statelessness
→ Externalize all session or state data.
Infrastructure Automation
● Infrastructure automation is the use of technology that performs tasks with reduced human assistance in order to
control the hardware, software, networking components, operating system (OS), and data storage components used to
deliver information technology services and solutions.
● Infrastructure automation is the process of reducing human interaction with IT systems by creating scripts or functions
that are repeatable and can be used either by other software or on command.
● IT infrastructure automation tools can control IT elements including servers, storage, network elements, and operating
systems (OS), with the goal of improving efficiency of IT operations and staff, with the goal of hands-off operation in
most environments including both cloud and on-premises elements of hybrid IT environments.
Infrastructure automation offers many benefits including:
● Cost reductions from eliminating manual processes. Organizations will save labor costs without reducing quality of IT
operations.
● Improved efficiency and accuracy of workflow deployment based on a central policy repository.
● Increased agility and visibility into business processes even as the organization scales to meet growth Faster time to
value for software updates and new releases.
● Consistent and dynamic adjustment to infrastructure changes while maintaining consistent automation and service
delivery.Consistent security policy, control, and compliance across your multi-cloud environment.
● Future-proof infrastructure by managing traditional and cloud-native workloads across private, hybrid and multi-cloud
environments.
Infrastructure Automation
What IT Infrastructure Processes Can Be Automated?

● Self-Service Cloud: Evolve your VMware data center into a private or hybrid cloud infrastructure
based on VMware Cloud Foundation and VMware Cloud on AWS.
● Kubernetes Automation: Automate Kubernetes cluster and namespace management and support
vSphere with Kubernetes.
● Multi-Cloud Automation: Extend self-service automation to multiple public clouds, including Amazon
Web Services, Microsoft Azure and Google Cloud Platform.
● Network Automation: Automate VMware NSX to enable faster deployment and complete lifecycle
automation of traditional and modern applications with networking and security services.
● DevOps for Infrastructure: Enable powerful Infrastructure as Code (IaC) platform with support for
infrastructure pipelining and iterative development.
Encryption in Operating system
Encryption in an Operating System (OS) refers to the process of converting data into a coded format to prevent
unauthorized access. It plays a vital role in ensuring data confidentiality, integrity, and security both while data is at rest
(stored) and in transit (being sent over a network). Types of Encryption in an Operating System
File System Encryption:
● Encrypts files or entire directories.
● Example: Windows: Encrypting File System (EFS), Linux: eCryptfs, fscrypt, or encrypted volumes using LUKS

Disk Encryption
Encrypts the entire storage device. Ensures data remains protected even if the physical device is stolen. Examples: BitLocker
(Windows), LUKS/dm-crypt (Linux), FileVault (macOS)

Network Encryption: Ensures secure communication over networks. Protocols: SSL/TLS (HTTPS), SSH, IPsec
Application-level Encryption Handled by applications but often supported by OS libraries. Examples: Web browsers using
encryption APIs, email clients with PGP/GPG

Process and Memory Encryption


Some modern OSes and CPUs support encrypting memory to protect against certain types of attacks. Example: AMD SEV,
Intel SGX
Identity Management in Operating system
Identity Management in an Operating System refers to the processes and tools used to identify, authenticate,
authorize, and manage users and their access rights within the system. It is a core component of OS-level security and
helps enforce policies related to user access and privileges.

Key Components of Identity Management


● User Identification: Each user is uniquely identified using a username or user ID (UID). Example: john, UID:
1001
● Authentication: Verifies that a user is who they claim to be. Common methods: Passwords, Biometrics,
Multi-factor authentication (MFA), SSH keys.
● Authorization: Determines what a user is allowed to do after successful authentication. Uses access control
mechanisms like: File permissions (read/write/execute), Access Control Lists (ACLs), Role-Based Access Control
(RBAC).
● Account Management: Creation, modification, and deletion of user accounts. Managing password policies, user
roles, login times, and group memberships. Auditing and Logging Keeps track of user activities to detect
unauthorized access or policy violations.
● Group Management: Groups simplify permission management by grouping users with similar access rights.
Each group has a Group ID (GID).
Resilience techniques (redundancy, fault tolerance),
● Resilience in operating systems refers to the system's ability to continue functioning correctly and
reliably even when facing hardware failures, software errors, or unexpected disruptions.
● To achieve resilience, several techniques are employed. Among the most important are redundancy,
fault tolerance, failover, and error detection and correction.
● Resilience refers to the capability of a system, whether it's engineered, organizational, or
software-based, to handle disruptions and keep functioning.
● Resilience refers to the ability of a system be it a software application, a network, or an entire
computing infrastructure to withstand and rapidly recover from failures, disruptions, or any form of
stress without significant downtime or loss of functionality.
● Operating system resilience techniques aim to ensure system stability and continued functionality
despite failures or disruptions. Key approaches include redundancy, fault tolerance, and graceful
degradation.
● Redundancy involves maintaining multiple copies of critical data and components, while fault
tolerance enables systems to continue operating even with some components failing.
● Graceful degradation allows the system to maintain essential functionality at a reduced capacity when
faced with resource limitations or failures.
Resilience techniques (redundancy, fault tolerance),
1. Redundancy: It is the duplication of critical components or functions of a system with the intention of
increasing reliability and availability.

Types of Redundancy:
● Hardware Redundancy: Multiple hardware components (like power supplies, CPUs, or hard drives) are
used. If one fails, another can take over.
Example: RAID (Redundant Array of Independent Disks) uses multiple hard drives to store data with
redundancy.

● Software Redundancy: Multiple versions or copies of software modules are used to detect or recover from
faults.
Example: Running backup instances of a service or microservice.

● Data Redundancy: Extra copies of data are kept, often in different physical locations.
Example: Cloud backups or distributed file systems (e.g., HDFS, Amazon S3 replication).

Benefits:
● Ensures system continues operating in case of partial failure.
● Minimizes downtime.
● Critical for high-availability systems.
Resilience techniques (redundancy, fault tolerance),
2. Fault Tolerance: It is the ability of a system to continue functioning correctly even in the presence
of faults or failures. Fault-tolerant systems detect failures and isolate faulty components to prevent them from
affecting the overall system.
These systems often include mechanisms for:
● Error detection and correction
● Component isolation
● Automatic reconfiguration

Techniques:
1. Replication: Running multiple copies of a process or service so that if one fails, others can take over.
2. Checkpointing and Rollback: Periodically saving the state of a system so it can roll back to a stable
state in case of failure.
3. Graceful Degradation: The system continues to function at a reduced level instead of completely
failing.

Examples:
● Tandem Systems (now HPE NonStop): Used in financial services and telecom, designed to handle
hardware failures without interrupting operations.
● Virtual machines: Can migrate running applications to a different host on hardware failure.
AI-Driven operating System
AI operating systems integrate AI hardware and AI capabilities at their core so they can learn, adapt, and
improve over time based on user interactions and data inputs.
The aim is to provide a more intuitive, personalized, and efficient computing experience by using advanced
AI algorithms, large language models, and machine learning techniques.
Imagine if all of your devices were linked together by an AI operating system. That OS would collect data
from each device, learn from it, and actively improve your day to day experience.
Here are some examples of data types it might use and what it could do with that data:
● Sleep Data (from devices like the Oura Ring): This would include details about sleep duration, quality,
and patterns.
● Calendar Data (from services like Google Calendar): Information about scheduled appointments, daily
routines, and important events.
● Health and Fitness Data (from wearables and health apps): Steps, heart rate, exercise sessions, and
dietary habits.
● Communication Data (from emails, social media, and messaging apps): Patterns in communication
frequency, the sentiment of messages, and networking habits.
● Environmental Data (from smart home devices): Preferences for lighting, temperature, and even the
AI-Driven operating System
Key Features of AI-Driven Operating Systems:
1. Intelligent Resource Management:
● Predicts and allocates CPU, memory, and power based on usage patterns.
● Enhances battery life and performance efficiency.

2. Predictive Maintenance & Security:


● Detects potential system failures before they happen.
● Uses AI to identify suspicious behavior and security threats in real time.

3. Personalized User Experience:


● Learns from user interactions to customize UI, notifications, and suggestions.
● Provides voice/gesture-based intelligent assistance (like Siri or Google Assistant, but OS-integrated).

4. Automated Process Management:


● Dynamically adjusts background processes based on AI predictions to improve responsiveness

5. Context-Aware Computing:
● Understands location, time, and user habits to offer contextually relevant services.

6. Natural Language Interfaces:


● Allows users to interact with the OS using natural language for commands, configuration, and help.
AI-Driven operating System
Advantages of AI-driven operating systems:
1. Enhanced Performance Optimization
2. Improved User Experience
3. Predictive Maintenance
4. Smart Security
5. Energy Efficiency
6. Intelligent Automation
7. Adaptive Learning
8. Better Multitasking and Scheduling

Disadvantages of AI-driven operating systems:


1. Privacy and data security due to the need for behavioral data.
2. Complexity in managing and debugging AI-driven decisions.
3. Ensuring predictability and reliability in mission-critical systems.
Quantum Computing
● Quantum Computing in Operating Systems refers to the adaptation or creation of operating systems that can
manage, schedule, and interact with quantum hardware—a completely different paradigm from classical
computers.
● Quantum computing uses quantum bits (qubits), which unlike binary bits, can exist in superposition and exhibit
entanglement.
● This enables quantum computers to process certain types of problems exponentially faster than classical
computers.
● A quantum computer operating system (QCOS) is a specialized software layer designed to manage quantum
hardware, coordinate quantum resources, and facilitate the execution of quantum algorithms.
● While classical operating systems, like Windows or Linux, manage memory, CPU processes, and I/O tasks,
QCOS needs to handle the unique challenges of quantum computing, such as quantum entanglement, coherence,
and error correction.
● The field of quantum computing contains a range of disciplines, including quantum hardware and quantum
algorithms.
● While still in development, quantum technology will soon be able to solve complex problems that
supercomputers can’t solve, or can’t solve fast enough.
● By taking advantage of quantum physics, fully realized quantum computers would be able to process massively
complicated problems at orders of magnitude faster than modern machines.
Quantum Computing
Role of an OS in Quantum Computing:
● A traditional OS handles process management, memory, file systems, and device I/O. A quantum
OS must:
● Translate high-level quantum algorithms into low-level machine instructions for quantum
processors.
● Manage quantum resources like qubits and quantum gates.
● Coordinate classical-quantum interactions (since most systems are hybrid).
● Handle quantum error correction and decoherence management.
● Enable multi-user access and job scheduling on quantum systems.

Features of a Quantum OS:


● Quantum Job Scheduling – Allocating quantum processors to tasks.
● Hybrid Architecture Management – Bridging classical (CPU) and quantum (QPU) operations.
● Qubit Resource Tracking – Managing limited, fragile quantum resources.
● Quantum Circuit Execution Control – Running and timing quantum operations precisely.
Quantum Computing
Advantages of Quantum Computing:
1. Exponential Speedup: Solves complex problems faster than classical computers
2. Massive Parallelism (Superposition)
Qubits hold multiple states at once
Enables evaluation of many outcomes in one step
3. Superior Optimization: Ideal for logistics, finance, and scheduling and Solves NP-hard problems more efficiently
4. Quantum Simulation: Models atomic and molecular systems precisely
5. Quantum Machine Learning: Accelerates model training and Handles large, complex data sets effectively
6. Unbreakable Security: Quantum key distribution (QKD) ensures secure communication and Immune to
conventional hacking methods
7. Potential Energy Efficiency: Solves some tasks with fewer operations and May reduce power needs for heavy
computations

Challenges in Quantum Computing:


● No standard architecture – Hardware varies widely (ion trap, superconducting, etc.).
● Error correction overhead – Quantum systems need massive overhead for stable execution.
● Scalability – Today’s quantum systems are small, but OS design must anticipate future scaling.
● Real-time precision – Quantum operations must be timed with extreme precision.

You might also like