Module 6
Module 6
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'.
2. API Gateway
○ Entry point for clients.
○ Routes requests to appropriate services, handles load balancing, authentication, rate limiting (e.g.,
Netflix Zuul, Kong, NGINX).
4. Service Registry
○ Maintains a registry of available services and their instances.
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.
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.
● 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
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.
5. Context-Aware Computing:
● Understands location, time, and user habits to offer contextually relevant services.