Cloud Computing exam preparation.
Practice questions for every unit in the style of the R23 end exam, a model answer for each, and a one-page revision summary. Built on the official syllabus units.
- Practice questions in the exam's style
- Drafted with AI and checked by a second AI pass. Doubtful points were verified against public sources. Report a mistake
- Units
- 5
- Questions
- 60
- 2-mark
- 30
- 10-mark
- 30
- Done
- Checked on
Exam guide
Paper pattern
Semester-end theory paper, 70 marks, from the JNTUK B.Tech R23 Regulations, end-examination pattern for theory subjects.
- Question 1 · 20 marksTen compulsory short-answer questions of 2 marks each (two from every unit).
- Questions 2 to 6 · 50 marksFive either/or questions of 10 marks each, one per unit. You answer one of the two in each.
- The semester-end examination carries 70 marks; internal assessment carries 30.
- Mid-semester examinations are separate: a 20-minute objective paper (10 marks) and a 90-minute subjective paper with three either/or questions of 10 marks (condensed to 15 marks).
- The regulations text does not state the length of the end examination. Use the duration printed on your hall ticket or question paper.
How to split your time
This plan assumes a 3-hour paper. If yours is different, keep the same proportions. Marks per minute stay roughly even across Question 1 and the 10-mark answers.
- 10 minRead the paper and choose one option in each either/or question
- 30 minQuestion 1: ten short answers (about 3 minutes each)
- 130 minQuestions 2 to 6: one 10-mark answer per unit (about 26 minutes each)
- 10 minFinal check of numbering, calculations and diagrams
Study tips for Cloud Computing
- Learn the main figures by drawing them from memory: the cloud reference model, the IaaS, PaaS and SaaS stack, the two hypervisor types and a virtual machine beside a container, labelling every layer.
- Make comparison tables as you revise, such as public, private and hybrid clouds, virtual machines and containers, or edge, fog and cloud, because many answers ask you to compare two or three ideas.
- Practise the small calculations: speedup with Amdahl's law, availability and yearly downtime, and a simple cost comparison between buying servers and paying per use.
- For each named service or tool, such as EC2, Lambda, Docker or Kubernetes, write one line on what it does and one example of when you would use it.
Cloud Computing Fundamentals
Syllabus: Cloud computing at a glance; Defining a cloud; The cloud computing reference model; Types of services: IaaS, PaaS and SaaS; Deployment models: public, private and hybrid; Utility computing; Characteristics and benefits of cloud computing; Cloud service providers: Amazon Web Services, Microsoft Azure and Google App Engine
One-page revision summary
- Cloud computing delivers servers, storage, platforms and applications as services over a network, obtained on demand and paid for by use.
- Its vision is computing as a utility: users draw on computing as a household draws electricity from the grid, without owning the equipment.
- The name comes from the cloud symbol used for the Internet in network diagrams; a cloud is a shared pool of virtualised resources that is self-service, elastic and metered.
- Cloud computing grew out of distributed systems (clusters and grids), virtualisation, Web 2.0, service orientation and utility computing.
- The NIST definition gives five essential characteristics, three service models (IaaS, PaaS, SaaS) and four deployment models (private, community, public, hybrid).
- The reference model is a stack of physical infrastructure, virtualisation, IaaS, PaaS and SaaS, with SLA management, metering, billing and security across all layers.
- The NIST reference architecture names five actors: cloud consumer, cloud provider, cloud carrier, cloud broker and cloud auditor.
- IaaS gives virtual machines, storage and networks (Amazon EC2); PaaS gives a managed runtime for uploaded code (Google App Engine); SaaS gives finished applications (Gmail, Salesforce).
- Moving up from IaaS to SaaS, the customer manages less but also controls less of the stack.
- A public cloud is owned by a provider and shared over the Internet; a private cloud serves one organisation; a hybrid cloud joins the two; a community cloud is shared by organisations with common needs.
- In cloud bursting, the private cloud runs the normal load and sends overflow load to a public cloud when its own capacity runs out.
- Utility computing is the pay-per-use business model of metered resources; cloud computing is the technology that delivers it at scale.
- Benefits of the cloud: lower up-front cost, elasticity, servers in minutes, less maintenance, reliability through replication, access from anywhere and better energy efficiency.
- Challenges of the cloud: security and privacy, laws on where data may be stored, dependence on the network, vendor lock-in and bills that grow without monitoring.
- AWS offers EC2 (virtual servers), S3 (object storage), EBS (block volumes), RDS and DynamoDB (databases), Elastic Load Balancing, Auto Scaling, CloudWatch and Lambda.
- Microsoft Azure offers Virtual Machines, App Service, Azure Functions, Blob storage and Azure SQL Database, and works closely with Microsoft tools and hybrid set-ups.
- Google App Engine is a PaaS that runs uploaded code with automatic scaling, in a standard environment (managed language runtimes) or a flexible environment (Docker containers).
Learn these by heart
- Five essential characteristics: on-demand self-service, broad network access, resource pooling, rapid elasticity and measured service.
- Service models: IaaS, PaaS and SaaS; deployment models: public, private, hybrid and community.
- Allowed downtime = (1 − availability) × period; 99.9% over a 30-day month (720 hours) allows 0.72 hours = 43.2 minutes.
- Break-even hours = fixed monthly cost of owning ÷ hourly rental rate; rent below this usage, own above it.
- Cloud bursting = private cloud for the normal load + public cloud for the overflow at peaks (a hybrid cloud pattern).
- NIST actors: consumer, provider, carrier, broker and auditor.
2-mark questions
1 Define cloud computing and state its key idea. 2 marks
Cloud computing is a model for delivering computing resources, such as servers, storage, databases, development platforms and applications, as services over a network. Users obtain them on demand through self-service, scale them up or down quickly and pay only for what they use, while the provider owns and manages the shared, virtualised infrastructure.
2 What is utility computing? 2 marks
Utility computing is a service model in which a provider supplies computing resources, such as processing power, storage and network bandwidth, on demand and meters their use. Customers pay only for what they consume, as with electricity or water, and need not buy and maintain capacity for their peak demand.
3 Distinguish between IaaS, PaaS and SaaS with one example each. 2 marks
IaaS provides virtual machines, storage and networks; the user manages the operating system and applications (Amazon EC2). PaaS provides a ready platform with runtime, middleware and tools; the user only writes and deploys code (Google App Engine). SaaS provides a complete application used through a browser; the user only uses and configures it (Gmail).
4 What is a hybrid cloud? What is cloud bursting? 2 marks
A hybrid cloud combines a private cloud (or an on-premises data centre) with one or more public clouds, joined so that data and applications can move between them. In cloud bursting, an application normally runs in the private cloud and, when demand exceeds its capacity, the extra load is sent to a public cloud.
5 A cloud provider's service level agreement promises 99.9% availability. What is the maximum downtime this allows in a 30-day month? 2 marks
Allowed unavailability = 100% − 99.9% = 0.1% = 0.001. Hours in a 30-day month = 30 × 24 = 720. Maximum downtime = 0.001 × 720 = 0.72 hours = 0.72 × 60 = 43.2 minutes. So the service may be unavailable for at most about 43 minutes in that month.
6 What are Amazon EC2 and Amazon S3? 2 marks
Amazon EC2 (Elastic Compute Cloud) provides resizable virtual servers, called instances, that are started from machine images and paid for while they run; it is the main IaaS compute service of AWS. Amazon S3 (Simple Storage Service) is object storage: files are kept as objects inside buckets and are read or written over the web through an API.
10-mark questions
1 Explain cloud computing at a glance: describe the vision of cloud computing, define a cloud, and explain the technologies that led to cloud computing. 10 marks
Cloud computing is the delivery of computing resources, such as servers, storage, development platforms and complete applications, as services over the Internet. The user rents what is needed, when it is needed, instead of buying and running the hardware.
1. The vision: computing as a utility. A household takes electricity from the grid without owning a power station; in the same way, a user should be able to obtain processing power, storage or software from a provider, use it for as long as needed and pay only for that use. A student opens an online office suite, a startup rents ten servers for a product launch and releases them a week later, and a researcher runs a simulation on hundreds of rented virtual machines for a few hours. None of them buys or maintains hardware.
2. Defining a cloud. The word comes from the cloud symbol that network diagrams use for the Internet: a part of the network whose inside the user need not know. In practice, a cloud is a large, shared pool of virtualised resources, reached over a network, that can be acquired and released on demand, grows or shrinks with the load and is billed by actual use under an agreed service level. The NIST definition of cloud computing lists five essential characteristics (on-demand self-service, broad network access, resource pooling, rapid elasticity and measured service), three service models (IaaS, PaaS and SaaS) and four deployment models (private, community, public and hybrid).
3. Technologies that led to cloud computing:
- Distributed systems: clusters and grids showed how many computers can work together and share resources; clouds use the same ideas at a much larger scale.
- Virtualisation: one physical server can run many isolated virtual machines, so a provider can share hardware safely among customers and create or remove machines in minutes.
- Web 2.0: rich, interactive web applications made the browser a capable client, so complete applications can be delivered over the web.
- Service orientation: building software from loosely coupled services with standard interfaces led to the idea of offering everything as a service.
- Utility computing: metering of resource use and pay-per-use pricing supplied the business model.
Conclusion: cloud computing realises the long-standing vision of computing as a utility by combining distributed systems, virtualisation, Web 2.0, service orientation and utility pricing, so that users treat computing as a service and not as equipment they must own.
2 Explain the essential characteristics of cloud computing. What benefits does cloud computing offer an organisation compared with owning its own servers, and what challenges remain? 10 marks
Cloud computing provides computing resources as services over a network. A system is called a cloud not just because it is remote, but because it shows a set of characteristics that together let users treat computing as a service.
1. Essential characteristics:
- On-demand self-service: a user creates a virtual machine, a database or storage space through a web console or an API, without contacting the provider's staff.
- Broad network access: services are reached over the network through standard protocols, from laptops, phones, tablets and servers alike.
- Resource pooling: the provider's physical servers, storage and networks serve many customers (multi-tenancy) and are assigned and reassigned as demand changes. The customer usually does not know which machine serves it, though it may choose a region.
- Rapid elasticity: capacity can be added or released quickly, often automatically, so that it follows the load; to the user it appears almost unlimited.
- Measured service: use is metered, for example in machine-hours, gigabytes stored or requests served, so both sides can see consumption, and billing follows it.
Clouds are also usually offered with no up-front commitment, with pay-per-use pricing and with service level agreements (SLAs) that promise availability and performance.
2. Benefits compared with owning servers:
Aspect Own servers Cloud
Cost Up-front buy Pay per use
Capacity Fixed, peak Elastic
New server Weeks Minutes
Upkeep Own staff Provider
Access Mostly local Anywhere- Lower and variable cost: capital expenditure on hardware turns into operating expenditure, and the organisation stops paying for machines that sit idle outside peak periods.
- Scalability and agility: a new service can be tried on a few machines and scaled out if it succeeds; a failed experiment is simply switched off.
- Less maintenance: the provider replaces failed hardware and, for platforms and applications, also patches the software.
- Reliability: data can be replicated across several data centres, which helps backup and disaster recovery.
- Access and collaboration: staff can work on shared documents and applications from any place with network access.
- Energy efficiency: consolidating many customers on shared, well-utilised servers usually uses less power than many half-idle server rooms.
3. Challenges: security and privacy of data held by another party, legal rules on where data may be stored, dependence on the network, vendor lock-in when services do not interoperate, and bills that grow if usage is not watched.
Conclusion: the five characteristics make computing available on demand and measurable, and they bring an organisation lower up-front cost, elasticity and less maintenance, provided security, compliance and cost are managed well.
3 Explain the cloud computing reference model with a neat diagram. Show where IaaS, PaaS and SaaS sit in it, with an example of each. 10 marks
A reference model organises cloud computing into layers. Each layer offers services to the one above it and hides the details of the one below, and a customer can enter the stack at whichever layer suits it.
1. Physical infrastructure: the provider's data centres, with racks of servers, storage arrays, network switches, power and cooling. They are usually large clusters of commodity machines.
2. Virtualisation layer: hypervisors divide each physical server into many isolated virtual machines, and storage and networks are virtualised in the same way. This layer lets the provider pool resources, give each customer a separate share (multi-tenancy) and move workloads between machines.
3. Infrastructure as a Service (IaaS): virtual machines, block and object storage and virtual networks are offered on demand. The customer chooses the operating system and installs its own software; the provider looks after the hardware and the virtualisation layer. Example: Amazon EC2 with Amazon S3. Typical users are system administrators and IT architects.
4. Platform as a Service (PaaS): a ready runtime with middleware, databases, programming interfaces and development tools runs on top of the infrastructure. The customer uploads code, and the platform handles servers, operating systems, load balancing and scaling. Example: Google App Engine. Typical users are application developers.
5. Software as a Service (SaaS): complete applications, such as email, office suites and customer relationship management, are used through a browser or a mobile app. The customer only configures and uses them, and one application instance serves many tenants. Examples: Gmail and Salesforce. Typical users are end users.
6. Management across all layers: service level agreement (SLA) management, admission control, monitoring, metering, accounting and billing, and security apply to every layer.
The NIST cloud computing reference architecture adds a view of the actors: the cloud consumer, who uses services; the cloud provider, who offers them; the cloud carrier, which provides network connectivity between them; the cloud broker, who combines or manages services for consumers; and the cloud auditor, who independently checks security, privacy and performance.
Conclusion: moving up the stack from IaaS to SaaS, the customer gets more ready-made service and has less to manage, but also less control over the layers below.
4 Describe the cloud services offered by Amazon Web Services, Microsoft Azure and Google App Engine. Draw how a simple web application can be hosted on AWS. 10 marks
Amazon Web Services (AWS), Microsoft Azure and Google App Engine are three well-known cloud offerings. AWS and Azure each offer a very wide range of infrastructure and platform services, while App Engine is a platform for running web applications.
1. Amazon Web Services:
- Amazon EC2 (Elastic Compute Cloud) provides virtual servers, called instances, started from machine images (AMIs) in a choice of sizes and paid for while they run.
- Amazon S3 (Simple Storage Service) stores files as objects in buckets, reached over the web through an API; Amazon EBS gives block volumes that attach to EC2 instances like disks.
- Amazon RDS runs managed relational databases, and Amazon DynamoDB is a managed NoSQL database.
- Elastic Load Balancing spreads requests over instances, Auto Scaling adds or removes instances as load changes, and Amazon CloudWatch monitors them.
- AWS Lambda runs small functions in response to events without the user managing any server.
A simple web application on AWS:
Users reach a load balancer (Elastic Load Balancing), which spreads requests across EC2 instances in an Auto Scaling group. The instances keep data in an Amazon RDS database and images and other static files in Amazon S3.
2. Microsoft Azure:
- Azure Virtual Machines give Windows and Linux virtual machines (IaaS).
- Azure App Service hosts web applications and APIs without the user managing servers (PaaS), and Azure Functions runs event-driven code.
- Azure Storage offers Blob storage for objects, plus queues, tables and file shares; Azure SQL Database is a managed relational database.
- Azure works closely with Microsoft tools such as Visual Studio and .NET and supports hybrid set-ups that join a company's own data centre to the cloud.
3. Google App Engine:
- A PaaS in which the developer writes an application in a supported language, such as Python, Java or Go, and uploads the code; Google runs it.
- App Engine handles servers, load balancing and automatic scaling, adding instances as requests grow and removing them when traffic falls.
- The standard environment runs code in language runtimes managed by Google, while the flexible environment runs applications in Docker containers.
- Applications use managed services such as a NoSQL datastore, Cloud Storage, task queues and scheduled (cron) jobs.
Provider Compute Storage
AWS EC2 S3, EBS
Azure VMs Blob storage
GAE Instances Cloud StorageConclusion: AWS and Azure suit customers who want control over virtual machines as well as managed services, while Google App Engine suits developers who want to deploy code and let the platform handle servers and scaling.
5 Explain the public, private and hybrid cloud deployment models with their merits and demerits. An online retailer's private cloud has 60 servers; normal demand needs 40 servers, and a 10-day festival sale needs 2.5 times the normal demand. Suggest a deployment model and work out the capacity it must obtain from outside. 10 marks
A deployment model says who owns the cloud infrastructure, who may use it and where it runs. The main models are public, private and hybrid; a community cloud is a fourth, shared variety.
1. Public cloud: the infrastructure is owned and run by a provider and shared by many organisations and individuals over the Internet, as with AWS, Microsoft Azure and Google Cloud.
- Merits: no capital cost, pay per use, very large capacity, fast elasticity and no hardware to maintain.
- Demerits: less control, data kept on shared hardware outside the organisation, dependence on the Internet and possible vendor lock-in.
2. Private cloud: the infrastructure serves one organisation only. It may sit in the organisation's own data centre or be hosted by a third party, and it is built with virtualisation and cloud management software, such as OpenStack, that give users self-service and elasticity inside the organisation.
- Merits: full control, strong security and easier compliance for sensitive data, and freedom to customise.
- Demerits: high capital and staff cost, capacity limited to the hardware owned, and slower growth.
3. Hybrid cloud: a private cloud and a public cloud are joined so that data and applications can move between them. Sensitive data and the steady load stay private, while extra or less sensitive work goes to the public cloud. When the private cloud runs out of capacity and sends overflow load to the public cloud, this is called cloud bursting.
- Merits: control where it matters, public elasticity at peaks, and lower cost than building for the peak.
- Demerits: more complex networking, security and management across two environments.
A community cloud is shared by several organisations with common needs, such as government departments or hospitals.
4. Worked example: the retailer.
- Normal demand: 40 servers, within the 60 owned (utilisation 40/60 = 66.7%).
- Sale demand: 2.5 × 40 = 100 servers.
- Shortfall: 100 − 60 = 40 servers for 10 days, that is 40 × 10 = 400 server-days.
- Building privately for the peak would mean owning 100 servers, so normal utilisation would fall to 40/100 = 40% and the 40 extra servers would sit idle outside the sale.
Recommended model: hybrid cloud. Customer and payment data stay in the private cloud, and the 40 extra web servers are rented from a public cloud by cloud bursting only for the 10 sale days.
Conclusion: public clouds give scale and low entry cost, private clouds give control, and a hybrid cloud combines the two, which suits workloads with a steady base and short peaks.
6 What is utility computing? Explain its features and its relation to cloud computing. A company can own a server at a fixed cost of Rs 9,000 per month or rent an equivalent cloud virtual machine at Rs 25 per hour. Find the break-even usage and advise the company for (a) 8 hours a day on 22 working days and (b) round-the-clock use in a 30-day month. 10 marks
Utility computing is a model in which computing resources, such as processing time, storage and network bandwidth, are supplied on demand by a provider and charged according to measured use, in the same way as electricity, water or gas. The consumer does not own the equipment; it pays for what it consumes.
1. Features:
- On-demand supply: resources are obtained when needed and released when not.
- Metering: the provider measures use, for example in machine-hours, gigabytes stored or data transferred.
- Pay-per-use pricing: the bill follows the metered amount, so cost rises and falls with use, with no large up-front purchase.
- Provider-managed capacity: the provider buys, runs and upgrades the hardware and plans capacity for all its customers together.
- Service level agreements: the provider promises availability and performance for the price charged.
2. Relation to cloud computing: utility computing is the business and pricing model; cloud computing is the technology that delivers it at scale. Virtualisation, resource pooling and self-service let a cloud provider meter and sell slices of shared hardware, so the cloud is the practical realisation of utility computing over the Internet. Utility pricing is one cloud characteristic among others, such as elasticity and broad network access.
3. Worked example (assumed figures):
- Owning: fixed cost Rs 9,000 per month (hardware spread over its life, power, space and maintenance), whether the server is busy or idle.
- Renting: Rs 25 per hour of use.
- Break-even: 25 × h = 9,000, so h = 9,000 / 25 = 360 hours per month. A 30-day month has 30 × 24 = 720 hours, so the break-even point is 360 / 720 = 50% utilisation.
Case Hours Cost (Rs)
(a) 8 h x 22 176 4,400 cloud
(b) 24 h x 30 720 18,000 cloud
Own server - 9,000 fixed- Case (a): 8 × 22 = 176 hours, below 360, so renting costs 176 × 25 = Rs 4,400 and saves Rs 9,000 − Rs 4,400 = Rs 4,600, about 51.1% of the owning cost. Advice: rent.
- Case (b): 24 × 30 = 720 hours, above 360, so renting costs 720 × 25 = Rs 18,000, twice the owning cost, and owning saves Rs 9,000. Advice: own the server, or ask the provider for discounted pricing for long-term committed use and compare again.
Conclusion: utility computing turns fixed IT cost into a variable cost, and it pays when use is low or uneven; for steady, round-the-clock loads, owning or committed-use pricing can be cheaper, so the break-even point should be worked out first.
Cloud Enabling Technologies
Syllabus: Ubiquitous Internet; Parallel and distributed computing; Elements of parallel computing; Hardware architectures for parallel computing (SISD, SIMD, MISD, MIMD); Elements of distributed computing; Inter-process communication; Technologies for distributed computing; Remote procedure calls (RPC); Service-oriented architecture (SOA); Web services; Virtualization
One-page revision summary
- Cloud computing rests on several enabling technologies, chiefly a ubiquitous Internet, parallel and distributed computing, service orientation through web services, and virtualization.
- The ubiquitous Internet, with broadband, Wi-Fi and mobile data reachable almost everywhere, lets users reach remote cloud resources at any time from any device.
- Parallel computing splits one problem among tightly coupled processors to cut its run time, while distributed computing links autonomous networked computers that cooperate by messages.
- The elements of parallel computing are decomposition and coordination, the hardware architecture, the programming approach (data, task or master-worker) and the level of parallelism.
- Flynn's taxonomy counts instruction and data streams: SISD is a uniprocessor, SIMD runs one instruction on many data items, MISD is rare, and MIMD covers multicores and clusters.
- Shared-memory MIMD systems communicate through a common memory and are easier to program, while distributed-memory MIMD systems pass messages and scale much further.
- A distributed system is layered as hardware and network, operating system, middleware and applications, with middleware hiding the differences between nodes.
- Client-server (two-tier or three-tier) and peer-to-peer are the main system architectural styles of distributed computing.
- Inter-process communication between machines is message-based and follows the point-to-point, publish-subscribe or request-reply model.
- Technologies for distributed computing moved from sockets and RPC to distributed objects such as CORBA and Java RMI, and then to web services and SOA.
- RPC uses a client stub and a server stub to marshal parameters and results, so a remote call looks like a local one.
- In SOA, a provider publishes a service description to a registry, and a consumer finds it there and then binds to and invokes the provider.
- Classic web services use SOAP messages, WSDL descriptions and UDDI registries, while RESTful services use URIs, standard HTTP methods and usually JSON.
- Virtualization lets a hypervisor run many isolated virtual machines on one physical server, giving cloud providers consolidation, isolation and fast provisioning through software.
- Virtualization also applies to storage and networks, so a provider can create, resize, move or remove resources without touching the physical hardware.
Learn these by heart
- Amdahl's law: S(N) = 1 / ((1 − p) + p/N), efficiency E = S(N)/N, and the speedup can never exceed 1 / (1 − p).
- Flynn's four classes: SISD, SIMD, MISD and MIMD, formed from single or multiple instruction streams and data streams.
- RPC path: client program, client stub (marshal), network, server stub (unmarshal), server procedure, and the reply back the same way.
- SOA triangle: the provider publishes, the consumer finds the service in the registry, then the consumer binds to and invokes the provider.
- Web service standards: SOAP is the message format, WSDL describes the interface and UDDI is the registry; REST uses resources and HTTP methods.
- Virtualization has three components: the guest, the host and the virtualization layer (such as a hypervisor).
- Distributed system layers, from the bottom: hardware and network, operating system, middleware, applications and services.
2-mark questions
1 What is meant by the ubiquitous Internet, and why does cloud computing depend on it? 2 marks
The ubiquitous Internet means network access that is available almost everywhere and at any time, through broadband, Wi-Fi and mobile data, on phones, laptops and many other devices. Cloud computing depends on it because every cloud service is used over the network: only fast, reliable, always-on connectivity lets remote storage and computing replace local machines.
2 Differentiate between parallel computing and distributed computing. 2 marks
In parallel computing, many processors of one tightly coupled system, usually sharing memory, work on the same problem at the same time to finish it faster. In distributed computing, autonomous computers, each with its own memory, are linked by a network and cooperate by passing messages; they may be different kinds of machine and far apart.
3 A program spends 80% of its run time in work that can be parallelised. Using Amdahl's law, find its speedup on 4 processors. 2 marks
By Amdahl's law, with p = 0.8 and N = 4:
S = 1 / ((1 − p) + p/N) = 1 / (0.2 + 0.8/4) = 1 / 0.4 = 2.5.
The program runs 2.5 times faster, not 4, because the serial 20% does not shrink; the speedup can never pass 1 / 0.2 = 5.
4 What is marshalling in a remote procedure call, and why is it needed? 2 marks
Marshalling packs a procedure's identifier and parameters, or its results, into a flat message in an agreed format so that it can travel over the network; unmarshalling rebuilds the values at the other end. It is needed because the client and server are separate processes, often on machines with different data representations, so they cannot share memory or pointers.
5 Give two differences between SOAP-based and RESTful web services. 2 marks
- Message format: SOAP sends every call as an XML envelope, usually by HTTP POST, while REST can send any representation, most often JSON.
- Style: SOAP is a protocol whose operations are described in a WSDL contract, while REST treats data as resources with URIs, handled by standard HTTP methods such as GET, PUT and DELETE.
6 Define virtualization and name its three main components. 2 marks
Virtualization creates a software (virtual) version of a resource such as a computer, storage or network, so several isolated environments can share one physical machine. Its components are the guest (the system or application running on the virtual resource), the host (the physical environment) and the virtualization layer, such as a hypervisor, that recreates the environment for the guest.
10-mark questions
1 Explain Flynn's classification of computer architectures (SISD, SIMD, MISD and MIMD) with a neat diagram. How do shared-memory and distributed-memory MIMD systems differ? 10 marks
Flynn's taxonomy classifies computer architectures by counting two things: instruction streams (the sequences of instructions that control units issue) and data streams (the sequences of operands those instructions work on). Each can be single or multiple, which gives four classes. Cloud data centres are built mostly from the last class, MIMD.
1. SISD (single instruction, single data): one control unit issues one instruction stream to one processing unit, which works on one data stream. Instructions run one after another, although pipelining can overlap their stages. A traditional uniprocessor PC is the usual example.
2. SIMD (single instruction, multiple data): one control unit broadcasts the same instruction to many processing elements, and each applies it to its own data item in lockstep. Adding two arrays, C[i] = A[i] + B[i], then handles a whole group of elements in one step instead of one element per step. Vector processors, array processors and the vector instructions of modern CPUs (such as SSE and AVX) work this way, and graphics processors use a similar data-parallel style. SIMD suits image processing, matrix work and scientific simulation.
3. MISD (multiple instruction, single data): several processing units apply different instruction streams to the same data stream. Hardly any commercial machine follows this model. It is mainly of theoretical interest; the closest practical use is fault-tolerant checks, where different units process the same input and their results are compared.
4. MIMD (multiple instruction, multiple data): many processors each run their own instruction stream on their own data, independently and asynchronously. Multicore processors, multiprocessor servers and clusters are MIMD machines, and this is the most general and widely used class.
Shared-memory and distributed-memory MIMD:
- Shared-memory (tightly coupled) MIMD: all processors reach one common memory and communicate by reading and writing it. Programming is simpler, but contention for the memory limits how far the system can grow. A multicore server is an example.
- Distributed-memory (loosely coupled) MIMD: each processor has its own local memory, and processors communicate by passing messages over an interconnection network, for example with MPI. It scales to very large numbers of nodes and a failed node affects only its own work, but the programmer must manage the communication. Clusters and cloud data centres are examples.
In short, Flynn's taxonomy explains the hardware basis of parallel computing: SIMD exploits data parallelism inside one processor, while distributed-memory MIMD clusters are the foundation on which distributed and cloud computing are built.
2 Explain the elements of parallel computing, including the approaches to parallel programming and the levels of parallelism. Using Amdahl's law, find the speedup and efficiency on 2, 4, 8 and 16 processors of a program whose parallel fraction is 0.9. 10 marks
Parallel computing uses several processing elements at the same time to solve one problem faster. Single processors can no longer be made much faster without too much power and heat, so performance now grows by adding cores and machines.
1. Decomposition and coordination: the problem is split into tasks that can run at the same time, the tasks are mapped onto processors, and the processors synchronise and exchange results. The gain is lost if tasks wait on each other or communicate too much.
2. Hardware architecture: the machine may be SIMD or MIMD in Flynn's taxonomy, with shared or distributed memory, and this decides how tasks communicate.
3. Approaches to parallel programming:
- Data parallelism: the same operation runs on different parts of the data, such as filtering each block of an image on a different core.
- Task (process) parallelism: different operations run at the same time, such as one thread reading input while another computes.
- Master-worker (farmer-and-worker) model: a master divides the job, hands pieces to workers and gathers their results.
4. Levels of parallelism, by grain size: large grain (separate jobs or programs), medium grain (procedures or threads inside a program), fine grain (iterations of loops) and very fine grain (individual instructions). The two coarser levels are usually exposed by the programmer, while the two finer levels are mostly found by compilers and processor hardware.
5. Limits on speedup (Amdahl's law): if a fraction p of the run time can be parallelised and the rest is serial, the speedup on N processors is S(N) = 1 / ((1 − p) + p/N) and the efficiency is E = S(N)/N.
Worked example with p = 0.9:
N (1-p)+p/N Speedup Efficiency
2 0.55000 1.82 91%
4 0.32500 3.08 77%
8 0.21250 4.71 59%
16 0.15625 6.40 40%For N = 16: S = 1 / (0.1 + 0.9/16) = 1 / (0.1 + 0.05625) = 1 / 0.15625 = 6.40, and E = 6.40/16 = 0.40, or 40%.
As N grows without limit, p/N falls towards 0, so S can never exceed 1 / (1 − p) = 1 / 0.1 = 10, however many processors are added.
In conclusion, parallel computing needs a good decomposition, suitable hardware and a matching programming model, and Amdahl's law shows that the serial part of a program sets a hard limit on the speedup.
3 What are the elements of distributed computing? Explain the layered view of a distributed system and its main architectural styles, with a diagram. 10 marks
A distributed system is a collection of autonomous computers, each with its own memory, linked by a network, that cooperate by exchanging messages so that users see one coherent system. A cloud data centre is a very large distributed system, so these elements are also the elements of every cloud platform.
1. Layered view of a distributed system:
- Hardware and network layer: the computers, storage devices and the network that links them.
- Operating system (OS) layer: each node runs its own OS, which manages local resources and provides network protocols (TCP/IP) and basic inter-process communication such as sockets.
- Middleware layer: software spread over all the nodes that hides their differences in hardware, OS and location. It offers common services such as remote calls, messaging, naming, security and transactions, so developers see one uniform programming model.
- Applications and services layer: the programs people use, such as web applications and cloud services, reached through browsers or APIs.
2. Architectural styles. Software styles describe how the parts of a program are organised, for example layered, data-centred (a shared repository), pipe-and-filter, call-and-return or event-based. System styles describe how processes are placed on machines:
- Client-server: clients send requests, and a server processes them and replies. In a two-tier design the client talks straight to a server that holds the data; in a three-tier (n-tier) design, presentation, application logic and data storage run on separate tiers that can be scaled independently. Most web and cloud applications use this style.
- Peer-to-peer: every node acts as both client and server and shares its resources directly with other peers, with no central server, as in file-sharing networks. It scales well and has no single point of failure, but it is harder to manage and secure.
3. Desired properties:
- Transparency: users should not see where resources are, whether they are copied, or when a part fails.
- Scalability: adding nodes should add capacity.
- Fault tolerance: the system keeps working when some nodes fail.
- Openness: parts from different vendors work together through standard interfaces.
- Concurrency without a global clock: nodes run in parallel and coordinate only through messages.
In conclusion, a distributed system combines networked hardware, local operating systems, middleware and applications, arranged in client-server or peer-to-peer styles, and these elements let cloud providers build large, reliable services out of many ordinary machines.
4 Explain inter-process communication (IPC) in distributed systems. Describe the message-based communication models and the main technologies for distributed computing. 10 marks
Inter-process communication (IPC) is the set of mechanisms that processes use to exchange data and coordinate their work. Processes on one machine can share memory or use pipes, but processes on different machines of a distributed system share no memory, so all their communication is done by sending messages over the network.
1. Basic message passing: the operating system offers two primitives, send and receive, usually through sockets. A TCP socket gives a reliable byte stream, while a UDP socket sends independent datagrams that may be lost. Communication is synchronous when the sender blocks until the message is received or answered, and asynchronous when the sender continues at once. Middleware wraps these primitives in higher-level models.
2. Message-based communication models:
- Point-to-point: a sender addresses one specific receiver. Messages go directly, or through a message queue that stores them until the receiver is ready, so the two need not run at the same time.
- Publish-subscribe: publishers send messages on a topic to a broker, and the broker delivers each message to every subscriber registered for that topic. Publishers and subscribers do not know each other, which decouples them; the broker may push messages to subscribers, or subscribers may pull them.
- Request-reply: a client sends a request and waits for the matching reply. This is the pattern behind RPC, HTTP and web services.
3. Technologies for distributed computing:
- Remote procedure call (RPC): a process calls a procedure in another process as if it were local, and stubs hide the message passing. Modern frameworks such as gRPC follow the same idea.
- Distributed object frameworks: RPC extended to objects, so a client calls methods on a remote object through a local proxy. CORBA (language-neutral, with an interface definition language and an object request broker), Java RMI and Microsoft's DCOM are examples.
- Service-oriented computing and web services: functions are exposed as services with standard interfaces and reached over HTTP using SOAP or REST. They work across languages and platforms, which made them the basis of cloud APIs.
- Message-oriented middleware: message brokers such as RabbitMQ and Apache Kafka carry queued and publish-subscribe messages between the parts of a cloud application.
In conclusion, IPC in a distributed system is built on message passing and organised into point-to-point, publish-subscribe and request-reply models, while the technologies have moved from raw sockets through RPC and distributed objects to web services, which cloud platforms use today.
5 What is a remote procedure call (RPC)? Explain, with a neat diagram, the steps of an RPC and the roles of stubs, marshalling and binding. How does a remote call differ from a local call? 10 marks
A remote procedure call (RPC) lets a program call a procedure that runs in another process, usually on another machine, with the same syntax as a local call. The programmer writes result = add(5, 7), and the RPC system hides the messages that carry the call across the network. RPC is a request-reply form of inter-process communication.
Main parts:
- Interface definition: the remote procedures and their parameter types are declared in an interface definition language (IDL), and a compiler generates the stubs from it.
- Client stub: a local stand-in for the remote procedure.
- Server stub (skeleton): receives requests and calls the real procedure.
- RPC runtime: sends and receives the messages on each machine.
Steps of a call: 1. The client program calls the client stub like a local procedure. 2. The client stub marshals the procedure identifier and parameters into a request message for the RPC runtime. 3. The client runtime sends the request across the network, and the client waits. 4. The server runtime delivers the request to the server stub. 5. The server stub unmarshals the parameters and calls the server procedure. 6. The procedure runs and returns its result to the server stub. 7. The server stub marshals the result into a reply message. 8. The server runtime sends the reply back across the network. 9. The client runtime delivers the reply to the client stub. 10. The client stub unmarshals the result and returns it to the client program, which continues as if the call had been local.
Marshalling turns values into a flat, agreed format, such as XDR in Sun RPC or protocol buffers in gRPC, so machines with different data representations understand each other. Binding is how the client finds the server: it gets the server's host address from a name or directory service, then asks a binding service on that host for the port. In Sun RPC that binding service is the portmapper, which maps each program and version number to a port.
How a remote call differs from a local call:
- No shared memory: pointers mean nothing on the other machine, so parameters are copied by value.
- Partial failure: the network or server may fail, leaving the client unsure whether the call ran. Systems offer at-least-once semantics (retry until a reply comes) or at-most-once semantics (the server filters duplicate requests); retrying is safe only for idempotent operations, which give the same result when repeated.
- Delay: a remote call is far slower than a local one, so remote calls should do enough work to be worth it.
In conclusion, RPC hides the network behind ordinary procedure calls through stubs, marshalling and binding, and it underlies distributed object systems and many cloud service APIs.
6 Explain service-oriented architecture (SOA) with a diagram of its roles. Describe how web services implement SOA using SOAP, WSDL, UDDI and REST. 10 marks
Service-oriented architecture (SOA) is a style of building software as a set of loosely coupled services. A service is a self-contained unit of functionality, such as checking stock or taking a payment, that is reached over a network through a published interface, so any program that follows the interface can use it without knowing how it is built. Web services are the most common way to implement SOA, and cloud services follow the same idea.
1. Roles and operations in SOA:
- Service provider: builds the service and publishes its description to a registry.
- Service registry (broker): a directory that stores service descriptions and lets consumers search them.
- Service consumer (requester): finds a suitable service in the registry, then binds to the provider and invokes it.
2. Principles of SOA: loose coupling, a standard service contract, abstraction (the implementation is hidden), reusability, autonomy, statelessness where possible, discoverability, and composability (small services combine into larger business processes).
3. Web services: a web service is a software component that exposes its operations over the network using open web standards, so programs in any language on any platform can call it. The classic stack is built on XML:
- SOAP (originally Simple Object Access Protocol): an XML message format. Each message is an envelope with an optional header, for details such as security, and a body that holds the call or its result. It is usually carried over HTTP.
- WSDL (Web Services Description Language): an XML document that describes the service contract: its operations, input and output messages, data types, protocol binding and endpoint address. Tools generate client stubs from it.
- UDDI (Universal Description, Discovery and Integration): a standard registry for publishing and finding service descriptions, which fills the registry role. Public UDDI registries saw little use, so services are now often found through documentation or internal catalogues.
4. RESTful web services: REST (Representational State Transfer) is a lighter architectural style. Every resource has a URI and is handled with standard HTTP methods: GET reads it, POST creates it, PUT updates or replaces it, and DELETE removes it. Requests are stateless, and data is usually sent as JSON. Cloud providers offer most of their services through HTTP-based APIs over HTTPS, many of them RESTful.
In conclusion, SOA organises software as published, discoverable and reusable services, and web services put that idea into practice, first through SOAP, WSDL and UDDI and now mostly through REST. The same approach lets cloud platforms deliver infrastructure, platforms and software as services.
Virtualization and Containers
Syllabus: Characteristics of virtualized environments; Taxonomy of virtualization techniques; Virtualization and cloud computing; Pros and cons of virtualization; Technology examples: Xen and VMware; Building blocks of containers; Container platforms: LXC and Docker; Container orchestration: Docker Swarm and Kubernetes; Public cloud VM and container offerings, for example Amazon EC2 and Amazon Elastic Container Service
One-page revision summary
- A virtualized environment has three parts: the guest, the virtualization layer (VMM or hypervisor) and the host.
- Managed execution gives sharing, aggregation, emulation and isolation; the other characteristics are increased security, performance tuning and portability.
- Virtualization is classified by resource (execution environment, storage, network), and execution virtualization by level (process level or system level).
- Process-level techniques are emulation, high-level VMs such as the JVM, and multiprogramming; system-level techniques are full, para, hardware-assisted and partial virtualization.
- Full virtualization runs an unmodified guest OS; paravirtualization modifies the guest to make hypercalls; hardware-assisted virtualization uses Intel VT-x or AMD-V.
- Clouds use virtualization for on-demand VMs from stored images, server consolidation, live migration, elasticity and safe multi-tenancy.
- Advantages of virtualization: better utilization, lower cost, isolation, fast provisioning and portability; disadvantages: overhead, the hypervisor as a single point of failure and attack, VM sprawl and licensing complexity.
- Xen is an open-source Type 1 hypervisor: Dom0 is privileged and holds drivers and tools, DomU domains are guests, and paravirtualized guests use hypercalls and split drivers.
- VMware uses full virtualization with binary translation and hardware support; Workstation is a hosted Type 2 hypervisor, ESXi is a bare-metal Type 1 hypervisor, vCenter Server manages hosts and vMotion migrates live VMs.
- A container shares the host kernel, so it is lighter and faster to start than a VM, which carries its own guest OS kernel and gives stronger isolation.
- Container building blocks are namespaces (isolation), cgroups (resource limits), union file systems with copy-on-write, layered images and a runtime such as runc with containerd.
- LXC runs system containers that behave like lightweight VMs; Docker runs application containers built from a Dockerfile into layered images shared through registries such as Docker Hub.
- Kubernetes has a control plane (API server, etcd, scheduler, controller manager) and worker nodes (kubelet, kube-proxy, container runtime); a pod is its smallest deployable unit.
- Docker Swarm is built into Docker Engine: manager nodes keep state with Raft and schedule tasks, worker nodes run tasks, and a service declares its number of replicas.
- Amazon EC2 rents virtual machine instances launched from an Amazon Machine Image (AMI) with a chosen instance type; the user manages the operating system and software.
- Amazon ECS runs containers described in task definitions as tasks and services, on a cluster of EC2 instances or on serverless AWS Fargate.
- Amazon Elastic Container Registry (ECR) stores container images, and Amazon Elastic Kubernetes Service (EKS) offers managed Kubernetes clusters.
Learn these by heart
- Virtualized environment = guest + virtualization layer (VMM or hypervisor) + host.
- Managed execution = sharing, aggregation, emulation and isolation.
- Type 1 hypervisor runs on bare hardware (Xen, VMware ESXi); Type 2 runs on a host OS (VMware Workstation, VirtualBox).
- Hosts needed for consolidation = total load ÷ target load per host, rounded up; 12 × 10% ÷ 60% = 2 hosts (CPU only).
- Classic 32-bit x86 Xen rings: hypervisor in ring 0, guest kernel in ring 1, applications in ring 3.
- Container = namespaces (what a process can see) + cgroups (what it can use) + a layered image.
- Kubernetes: a pod is the smallest deployable unit, etcd stores cluster state and the kubelet runs on every worker node.
2-mark questions
1 Define virtualization and name the three components of a virtualized environment. 2 marks
Virtualization creates a software (virtual) version of a resource such as a server, storage, network or operating system, so that one physical resource can serve several isolated users. A virtualized environment has three components: the guest that runs, the host that provides the real resources, and the virtualization layer (VMM or hypervisor) that maps guest requests onto the host.
2 Distinguish a Type 1 hypervisor from a Type 2 hypervisor, giving one example of each. 2 marks
A Type 1 (bare-metal) hypervisor runs directly on the physical hardware and controls the guests itself, as Xen and VMware ESXi do; it is used on servers and in clouds. A Type 2 (hosted) hypervisor runs as an application on a host operating system, as VMware Workstation and Oracle VirtualBox do; it is easy to install but adds more overhead.
3 What is live migration of a virtual machine, and why is it useful in a cloud? 2 marks
Live migration moves a running VM from one physical host to another without stopping its service. Memory pages are copied while the VM keeps running, the few pages changed meanwhile are copied during a very short pause, and the VM then resumes on the new host. Clouds use it for hardware maintenance, load balancing and consolidating VMs to save power.
4 What are namespaces and control groups (cgroups) in Linux containers? 2 marks
Namespaces isolate what a process can see: each container gets its own process IDs (pid), network stack (net), mount points (mnt), hostname (uts), IPC objects and user IDs. Control groups limit and account for what a process can use, such as CPU time, memory, block I/O and the number of processes. Together they turn ordinary processes into containers.
5 Differentiate a Docker image and a Docker container. 2 marks
A Docker image is a read-only template of stacked file-system layers, built from a Dockerfile and stored in a registry such as Docker Hub. A container is a running (or stopped) instance of an image: Docker adds a thin writable layer and gives it its own namespaces and cgroup limits. One image can start many containers.
6 Differentiate Amazon EC2 and Amazon Elastic Container Service (ECS). 2 marks
Amazon EC2 is an IaaS service that rents virtual machines (instances), each launched from an Amazon Machine Image (AMI) with a chosen instance type; the user manages its operating system. Amazon ECS is a managed container orchestration service: containers described in a task definition are run and scaled on EC2 instances or on serverless AWS Fargate.
10-mark questions
1 Explain the characteristics of a virtualized environment, with a neat diagram of its components. 10 marks
Virtualization places a software layer between a computing resource and its users, so that the users see a virtual resource instead of the real one. Every virtualized environment has three components, and its useful characteristics come from the way the middle layer controls the guest.
Components:
- Guest: the system or application that runs in the virtual environment, for example a guest OS with its applications, running on virtual hardware.
- Virtualization layer: the virtual machine manager (VMM) or hypervisor. It creates the virtual hardware for each guest and maps every guest request onto the real resources.
- Host: the original environment, that is the physical machine (sometimes with a host operating system) that actually does the work.
Characteristics:
1. Increased security. Every guest operation passes through the virtualization layer, which can block what is not allowed. A guest cannot see the host or other guests, so untrusted programs can be run safely in a sandbox, as the Java Virtual Machine does for downloaded code.
2. Managed execution. Because the layer controls execution, it can offer four features:
- Sharing: many guests run on one host and share its CPU, memory and network, which raises utilization.
- Aggregation: the opposite of sharing; a group of separate hosts is presented to the guest as one large virtual resource, as in a cluster.
- Emulation: the guest can be given an environment different from the host, such as another processor type or an old device, which the layer imitates in software.
- Isolation: each guest has its own complete environment; a crash or attack inside one guest does not spread to other guests or to the host.
3. Performance tuning. The layer decides how much CPU time, memory and bandwidth each guest receives, so a provider can guarantee a level of service to each customer and adjust it at run time.
4. Portability. A virtual machine is just a set of files (a disk image and a configuration), so it can be copied, backed up or moved to another host. Its state can be saved, paused and resumed, and a running VM can even be moved by live migration. At the language level, bytecode compiled once runs on any machine that has the matching virtual machine.
In short, the virtualization layer gives each guest a controlled, isolated and movable environment, which is exactly what a cloud provider needs to rent one physical machine safely to many customers.
2 Explain the role of virtualization in cloud computing, with a consolidation example. Discuss the advantages and disadvantages of virtualization. 10 marks
Cloud computing sells computing as a metered service, and virtualization is the technology that makes this possible: it lets a provider divide large physical servers into many isolated virtual machines (VMs), create them in minutes and move them while they run.
Role of virtualization in cloud computing:
1. On-demand provisioning. A customer asks for a VM through a portal or API; the cloud manager picks a host and its hypervisor starts the VM from a stored image. IaaS services such as Amazon EC2 work this way: the user picks an Amazon Machine Image (AMI) and an instance type and never sees the physical host.
2. Server consolidation. Many lightly used workloads are packed onto fewer hosts. Example: 12 servers each run at an average of 10% CPU. Their total load is 12 × 10% = 120% of one server. If each host is to run at 60%, hosts needed = 120 / 60 = 2. So 12 machines shrink to 2, and the 10 machines removed (10/12 ≈ 83.3%) no longer need power, cooling or floor space. This simple estimate counts CPU only; memory and I/O must also fit.
3. Live migration. A running VM can be moved to another host for maintenance or load balancing, as the figure shows for VM 2, and the VM after migration keeps serving its users.
4. Elasticity and multi-tenancy. Extra VMs are cloned from the same image when demand rises and removed when it falls, while isolation keeps the tenants apart.
Advantages:
- Higher hardware utilization and lower capital, power and cooling costs.
- Isolation: a fault or attack in one VM stays inside it.
- Fast provisioning and easy scaling from templates.
- Portability: VMs are files that can be copied, snapshotted and backed up, which simplifies disaster recovery.
- Old or different operating systems can run side by side on new hardware.
Disadvantages:
- Performance overhead: the extra layer slows some work, especially heavy disk and network I/O.
- The hypervisor is a single point of failure and an attractive target: if it is compromised, every guest on that host is exposed, and malware may even try to install itself as a hidden hypervisor beneath an operating system.
- Some host features, such as special devices, may not be fully exposed to guests, so the user experience can be poorer.
- VM sprawl (unused VMs piling up) and complex software licensing.
- Noisy neighbours: tenants sharing one host can affect each other's performance.
In conclusion, virtualization is the foundation of IaaS and much of PaaS because it turns fixed hardware into a flexible pool; its costs are some overhead and a larger security responsibility at the hypervisor.
3 Explain the taxonomy of virtualization techniques with a neat diagram. 10 marks
Virtualization techniques are classified first by the kind of resource that is virtualized, and then, for execution environments, by the level at which the virtual environment is created and the technique used to create it.
1. By resource:
- Execution environment virtualization creates an environment in which programs run. It is the largest and most developed group.
- Storage virtualization hides where data physically lives and presents many disks or arrays as one logical pool, as in a storage area network (SAN) or a virtual disk file.
- Network virtualization combines or divides physical networks into virtual ones, such as a virtual LAN (VLAN) or a virtual switch that connects the VMs on one host.
2. Execution virtualization by level:
- Process level: the virtual environment runs on top of an existing operating system and serves one process or application.
- System level: the virtual environment is created directly on the hardware, or with very little help from a host OS, and serves a whole guest operating system.
3. Process-level techniques:
- Emulation: software imitates a different instruction set or device, so an application built for one machine runs on another.
- High-level VM: programs are compiled to an intermediate bytecode that runs on a virtual machine such as the Java Virtual Machine or the .NET Common Language Runtime.
- Multiprogramming: the operating system gives each process its own share of CPU time and its own address space, so each process behaves as if it had the machine to itself.
4. System-level techniques:
- Full virtualization: the guest OS runs unmodified because the VMM imitates the whole hardware, trapping or translating sensitive instructions, as in VMware's binary translation.
- Paravirtualization (para-virtualization): the guest OS is modified to call the hypervisor through hypercalls instead of using privileged instructions, which cuts overhead, as in Xen.
- Hardware-assisted virtualization: processor extensions such as Intel VT-x and AMD-V trap sensitive instructions in hardware, so unmodified guests run efficiently.
- Partial virtualization: only part of the hardware, such as the address space, is imitated; programs can share the machine, but a complete guest OS cannot run.
Operating-system-level virtualization, the basis of containers, is a further execution technique: one kernel provides many isolated user spaces that all share it.
In conclusion, the taxonomy moves from what is virtualized (execution environment, storage, network) to where (process level or system level) and how (the technique). It helps choose the right tool, such as a JVM for portable code or a hypervisor for whole servers.
4 Describe the architecture of Xen and explain how VMware achieves full virtualization. Compare the two. 10 marks
Xen and VMware are two widely used hypervisor technologies. Both create virtual machines on x86 servers, but they started from different ideas: Xen from paravirtualization and VMware from full virtualization.
Xen:
1. Xen is an open-source Type 1 (bare-metal) hypervisor that began as a research project at the University of Cambridge. It runs directly on the physical hardware and does only the core work: CPU scheduling, memory partitioning and interrupt handling.
2. Guests run in domains. Domain 0 (Dom0) is a privileged domain that starts first; it holds the real device drivers and the management tools used to create, start and stop other domains. Domain U (DomU) domains are the unprivileged guest VMs.
3. Paravirtualization: a paravirtualized (PV) DomU runs a modified guest OS that replaces privileged instructions with hypercalls to Xen. In the classic 32-bit x86 design, Xen runs in ring 0, guest kernels in ring 1 and applications in ring 3, so a guest kernel cannot execute privileged instructions itself.
4. I/O uses split drivers: a front-end driver in DomU passes requests to a back-end driver in Dom0, which uses the real device driver.
5. With processor support (Intel VT-x or AMD-V), Xen also runs unmodified guests such as Windows as hardware-assisted (HVM) guests; their sensitive instructions cause hardware traps into Xen.
Xen is used in commercial products and by cloud providers; Amazon EC2 originally ran its instances on Xen.
VMware:
1. VMware uses full virtualization: the guest OS is not modified. The VMM runs user-level guest code directly on the processor and uses binary translation (BT) for kernel code, rewriting sensitive instructions on the fly into safe sequences and caching the result. Newer versions also use the hardware extensions (HW).
2. Hosted product: VMware Workstation is a Type 2 hypervisor that runs as an application on a Windows or Linux desktop.
3. Server products: VMware ESXi is a Type 1 hypervisor built on its own VMkernel, which contains the device drivers. vCenter Server manages many ESXi hosts centrally, and vMotion moves running VMs between hosts by live migration.
Comparison:
Point Xen VMware ESXi
Licence Open source Proprietary
Method Para + HVM Full: BT + HW
Guest OS PV: modified Unmodified
Drivers In Dom0 In VMkernel
Manager Dom0 tools vCenter ServerIn conclusion, Xen accepts a modified guest in return for lower overhead, while VMware keeps guests unchanged through binary translation; today both also rely on hardware-assisted virtualization.
5 What is a container? Explain the building blocks of Linux containers and compare the LXC and Docker container platforms. 10 marks
A container is a group of ordinary processes that the host kernel isolates and limits, so that they appear to have a machine of their own. Unlike a virtual machine, a container has no guest kernel: all containers on a host share the host's Linux kernel, which runs on the host hardware, so they start in seconds or less and use far less memory.
Building blocks:
1. Namespaces give isolation. Each namespace type wraps one resource: pid (process IDs), net (network interfaces and ports), mnt (mount points), uts (hostname), ipc (shared memory and message queues) and user (user and group IDs). A process inside sees only its own namespaces.
2. Control groups (cgroups) give resource control. They limit, prioritise and account for CPU, memory, block I/O and the number of processes, so one container cannot starve the others.
3. A union (layered) file system such as OverlayFS stacks read-only image layers and adds a thin writable layer on top using copy-on-write, so many containers share the same base layers.
4. Container images package an application with its libraries and settings as these layers, so it runs the same way on any host.
5. Security features such as Linux capabilities, seccomp system-call filters and SELinux or AppArmor profiles reduce what a container can ask of the kernel.
6. A container runtime (for example runc, driven by containerd) uses these kernel features to create the container, and an engine such as Docker Engine gives users commands and an API on top.
LXC (Linux Containers) is a set of user-space tools and libraries that use namespaces and cgroups to run system containers. An LXC container usually boots a full Linux distribution with its own init system and services, so it behaves like a lightweight VM.
Docker focuses on application containers: one main process, such as a web server, per container. A developer writes a Dockerfile, builds a layered image, pushes it to a registry such as Docker Hub and runs it on any host with Docker Engine. Early Docker versions used LXC underneath; Docker later moved to its own runtime library.
Point LXC Docker
Container System (OS) Application
Inside Init + many One main
services process
Packaging Templates Dockerfile,
layered image
Images OS images Registries
Best for Light VMs MicroservicesIn conclusion, namespaces, cgroups and layered images are the real building blocks; LXC uses them to imitate a whole machine, while Docker uses them to package and ship single applications.
6 What is container orchestration? Explain the architecture of Kubernetes and compare it with Docker Swarm. 10 marks
Running one container by hand is easy; running hundreds across many machines is not. Container orchestration is the automatic deployment, placement, scaling, networking and healing of containers across a cluster of hosts. The operator states the desired state, for example three copies of a web service, and the orchestrator keeps the actual state equal to it.
Main orchestration functions:
- Scheduling: choosing a host with enough CPU and memory for each container.
- Scaling: adding or removing copies as load changes.
- Self-healing: restarting failed containers and replacing those on a failed host.
- Service discovery and load balancing: a stable name and address for a changing set of containers.
- Rolling updates and rollbacks: replacing versions a few at a time.
Kubernetes is an open-source orchestrator first developed at Google and now hosted by the Cloud Native Computing Foundation (CNCF). A cluster has a control plane and worker nodes.
1. Control plane:
- API server: the front door; kubectl and every other component send requests to it.
- etcd: a consistent key-value store that holds the whole cluster state.
- Scheduler: assigns each new pod to a suitable worker node.
- Controller manager: runs control loops (for Deployments, ReplicaSets and so on) that compare desired and actual state and correct any difference.
2. Worker nodes:
- kubelet: the agent that receives pod specs from the API server and asks the container runtime to start the containers.
- Container runtime, such as containerd, which runs the containers of the pods.
- kube-proxy: keeps network rules so that traffic for a Service is routed to the right pods.
3. Objects: a pod is the smallest deployable unit, one or more containers sharing an IP address and storage; a Deployment keeps a set number of pod replicas; a Service gives pods a stable address. The Horizontal Pod Autoscaler (HPA) changes the replica count with load.
Docker Swarm is the orchestrator built into Docker Engine (swarm mode). Manager nodes keep the cluster state using the Raft consensus algorithm and schedule tasks; worker nodes run them. A service names an image and a number of replicas, and each replica runs as a task (one container).
Point Swarm Kubernetes
Setup Simple, More complex,
built in many parts
Unit Task Pod
State Raft in etcd
managers
Autoscale Not native HPA
Ecosystem Smaller Very largeIn conclusion, Docker Swarm suits small teams that want quick, simple clustering, while Kubernetes offers richer features and is available as a managed service from major clouds, for example Amazon Elastic Kubernetes Service (EKS).
Cloud Computing Challenges
Syllabus: Economics of the cloud; Cloud interoperability and standards; Scalability and fault tolerance; Energy efficiency in clouds; Federated clouds; Cloud computing security; Fundamentals of computer security; Cloud security architecture; The cloud shared responsibility model; Security in cloud deployment models
One-page revision summary
- Cloud economics rests on turning capital expenditure into operational expenditure, on paying only for what is used, and on the providers' economies of scale.
- Elastic pay-per-use capacity avoids both over-provisioning for the peak and under-provisioning that loses users, so it suits variable or uncertain demand.
- Total cost of ownership must count power, cooling, space, staff and maintenance for owned servers, and data transfer, storage and support charges for cloud services.
- Interoperability lets different clouds work together through common interfaces, and portability lets workloads and data move between them; both reduce vendor lock-in.
- Interoperability standards include OVF for packaging virtual machines, OCCI for managing IaaS resources, CDMI for cloud storage and TOSCA for describing and deploying applications.
- Vertical scaling enlarges one machine, horizontal scaling adds instances behind a load balancer, and elasticity means scaling out and in automatically with demand.
- Fault tolerance relies on redundancy across availability zones, health checks, replication with failover, checkpointing and retries, so that no single failure stops the service.
- Energy is saved by consolidating VMs through live migration, switching off idle servers, DVFS, energy-aware scheduling and efficient cooling, while still meeting SLAs.
- A federated cloud links independent providers through cloud coordinators, a cloud exchange and cloud brokers, so that capacity is shared and workloads are placed across providers.
- Federation offers extra capacity, lower latency, data-location compliance and disaster recovery, but it needs common standards, cross-provider SLAs and federated identity.
- Major cloud security threats include misconfiguration, stolen credentials, insecure APIs, data breaches, insider misuse, denial-of-service attacks and weak isolation between tenants.
- Data in the cloud is protected by encryption at rest and in transit, careful key management and strict least-privilege identity and access management.
- In the shared responsibility model the provider always secures the physical and virtualisation layers, the customer always secures its data and access, and the middle layers move to the provider from IaaS to SaaS.
- Public clouds trade control for provider-grade security, private clouds give full control at a higher cost, community clouds share governance, and hybrid clouds must also secure the links between their parts.
Learn these by heart
- Allowed downtime = (1 − availability) × 8,760 hours a year; 99.9% availability allows 8.76 hours.
- Independent replicas in parallel: A = 1 − (1 − a)ⁿ; components in series: A = a1 × a2 × … × an.
- PUE = total facility power ÷ IT equipment power; the ideal value is 1.0.
- Server power model: P(u) = P_idle + (P_max − P_idle) × u; dynamic CPU power is roughly proportional to C × V² × f.
- Break-even usage = yearly cost of owning ÷ cloud price per server-hour.
- CIA triad: confidentiality, integrity, availability; AAA: authentication, authorisation, accounting.
- Shared responsibility: the provider secures the cloud itself; the customer secures what it puts in the cloud, always including its data and access.
2-mark questions
1 Distinguish capital expenditure (CapEx) and operational expenditure (OpEx) in cloud economics. 2 marks
Capital expenditure (CapEx) is money spent up front to buy and own assets such as servers, storage and a data centre, before they are used. Operational expenditure (OpEx) is a running cost paid as resources are consumed. Cloud computing turns most IT spending from CapEx into OpEx through pay-per-use billing, so no large initial investment is needed.
2 What is vendor lock-in, and how do cloud standards reduce it? 2 marks
Vendor lock-in is the situation where moving applications or data away from one cloud provider is costly or impractical because they depend on that provider's own APIs, formats and services. Open standards, such as OVF for packaging virtual machines, CDMI for cloud storage and TOSCA for application topologies, give common formats and interfaces, so workloads can move between providers.
3 A cloud service promises 99.9% availability. How much downtime per year does this allow? 2 marks
Allowed downtime = (1 − availability) × hours in a year = (1 − 0.999) × 8,760 h = 0.001 × 8,760 = 8.76 hours per year, which is about 43.2 minutes in a 30-day month. So "three nines" still permits nearly nine hours of outage in a year.
4 Define Power Usage Effectiveness (PUE) and find it for a data centre that draws 1,800 kW in total while its IT equipment uses 1,200 kW. 2 marks
PUE = total facility power ÷ power used by the IT equipment. Here PUE = 1,800 ÷ 1,200 = 1.5, so for every 1 kW used by servers, storage and network equipment, another 0.5 kW goes to cooling, power conversion and lighting. The ideal value is 1.0, and a lower PUE means a more efficient data centre.
5 What is the CIA triad in computer security? 2 marks
The CIA triad names the three basic goals of security. Confidentiality: only authorised users can read the data (encryption, access control). Integrity: data is not altered without authorisation, and any change can be detected (hashes, digital signatures). Availability: systems and data are reachable by authorised users when needed (redundancy, backups, DDoS protection).
6 What is multi-tenancy, and why is it a security concern in the cloud? 2 marks
Multi-tenancy means many customers (tenants) share the same physical servers, storage and network, kept apart only by software isolation such as hypervisors, containers and access controls. It is a security concern because a flaw in that isolation, a misconfiguration or a side-channel attack can let one tenant read or disturb another tenant's data or workloads.
10-mark questions
1 Explain the economics of cloud computing. A firm can buy 10 servers at Rs 2,40,000 each, used for 4 years and costing Rs 3,00,000 a year in total to run, or rent equivalent cloud servers at Rs 25 per server-hour. It needs 2 servers all year and 8 more during a 60-day peak. Compare the yearly costs and find the break-even usage. 10 marks
Cloud economics studies how paying for computing as a metered service, instead of owning it, changes what an organisation spends and when.
1. CapEx to OpEx: there is no up-front purchase of servers or data centre space; resources are paid for as they are used.
2. Pay per use and elasticity: capacity follows demand, so the firm avoids over-provisioning (idle servers bought only for the peak) and under-provisioning (users lost when demand exceeds capacity).
3. Economies of scale: providers buy hardware and power in bulk, automate operations and keep utilisation high by serving many tenants, so each unit of computing costs them less.
4. Total cost of ownership (TCO): owning includes hardware, licences, power, cooling, space, staff and maintenance, not just the purchase price. Cloud TCO adds items such as data transfer out of the cloud, storage, support and migration effort.
5. Pricing models: on-demand (no commitment), reserved or committed use (a discount for a long-term commitment) and spot or preemptible capacity (cheap spare capacity that the provider can take back).
Worked example (the prices are assumed for practice):
Owning: 10 × Rs 2,40,000 = Rs 24,00,000. Spread evenly over 4 years, this is Rs 6,00,000 a year; adding the running cost of Rs 3,00,000 gives Rs 9,00,000 a year, whatever the usage.
Cloud usage:
- baseline: 2 × 8,760 h = 17,520 server-hours
- peak: 8 × 60 × 24 h = 11,520 server-hours
- total: 29,040 server-hours, so the cloud cost = 29,040 × Rs 25 = Rs 7,26,000 a year
Option Yearly cost (Rs)
Own 9,00,000
Cloud 7,26,000
Saving 1,74,000Break-even: Rs 9,00,000 ÷ Rs 25 = 36,000 server-hours a year. The owned servers offer 10 × 8,760 = 87,600 server-hours, so the break-even point is 36,000 ÷ 87,600 ≈ 41.1% average utilisation. The firm needs only 29,040 ÷ 87,600 ≈ 33.2%, so renting is cheaper. If all 10 servers were busy all year (87,600 server-hours), the cloud would cost Rs 21,90,000, far more than owning.
Conclusion: the cloud is cheaper for variable, bursty or uncertain demand and for new ventures short of capital, while steady, high utilisation can favour owning or reserved capacity. A sound decision compares the full TCO of both options, not only the hourly price.
2 What is a federated cloud? Explain its architecture and benefits, and discuss the interoperability problems and standards that a federation depends on. 10 marks
A federated cloud (also called a cloud federation) is an arrangement in which several independent cloud providers, or several data centres of one provider, connect their infrastructures under agreed policies and service level agreements (SLAs). Each member keeps control of its own resources but can lease capacity from, or move workloads to, the others. The wider idea of interconnected clouds is often called the InterCloud.
Architecture (main roles):
1. Cloud coordinator: one for each member provider (the provider A and provider B coordinators in the figure). It publishes the provider's spare capacity and prices to the exchange and manages the virtual machines placed with that provider.
2. Cloud exchange: a market maker that collects the offers published by coordinators in its directory and matches them with brokers' requests.
3. Cloud broker: acts for users and applications, which submit their requests to it. It queries the exchange to find offers, chooses providers that meet the SLA at the lowest cost, negotiates with their coordinators and deploys the workload.
Benefits:
- capacity beyond one provider's limit, for example bursting to a partner at a peak
- placement near users for lower latency, and in a chosen country to meet data-location laws
- disaster recovery across providers
- lower cost and less dependence on a single vendor
Interoperability problems: providers differ in virtual machine image formats, management APIs, storage interfaces, identity systems and billing. Without common ground, a federation needs a custom adapter for every pair of providers, and users face vendor lock-in.
Standards that help:
- OVF (Open Virtualization Format, from DMTF): a portable package for virtual machines and their metadata.
- OCCI (Open Cloud Computing Interface, from the Open Grid Forum): a common REST-based API for managing cloud resources, first aimed at IaaS.
- CDMI (Cloud Data Management Interface, from SNIA): a standard interface for creating and managing cloud storage.
- TOSCA (Topology and Orchestration Specification for Cloud Applications, from OASIS): describes an application's components and their relationships so that it can be deployed and managed on different clouds.
- Container images built to the Open Container Initiative (OCI) format, run by orchestrators such as Kubernetes, also make applications portable.
Remaining challenges: monitoring SLAs across providers, trust and identity federation (single sign-on with SAML or OpenID Connect), consistent security policies, accounting between members and differing national laws.
Conclusion: federation turns many separate clouds into one larger shared pool, but it works only when interoperability standards make resources, data and management interfaces portable.
3 Explain scalability and fault tolerance in cloud computing. A web tier uses servers of 99% availability behind a load balancer of 99.9% availability. Find the availability and yearly downtime of one server, of two servers in parallel, and of the load balancer with the two servers. 10 marks
Scalability is the ability of a system to handle a growing workload by adding resources, without redesign. Fault tolerance is the ability to keep giving correct service when some components fail. Clouds achieve both mainly through redundancy and automation.
1. Vertical scaling (scale up): give one machine more CPU, memory or storage, for example by moving to a larger virtual machine size. It is simple but limited by the largest machine available, and it often needs a restart.
2. Horizontal scaling (scale out): add more instances and spread users' requests over them with a load balancer. It has no fixed ceiling and also adds redundancy, but the application should keep session state outside the servers, in a shared cache or database.
3. Auto-scaling and elasticity: an auto-scaler watches metrics and adds or removes instances by rule, for example adding one when average CPU stays above 70% and removing one below 30%, within a set minimum and maximum. Capacity example: if each instance handles 500 requests per second and the target is 70% utilisation, each should carry 350; a peak of 3,200 requests per second needs 3,200 ÷ 350 ≈ 9.14, so 10 instances.
4. Fault-tolerance techniques: redundant instances in two availability zones (zone A and zone B), health checks so that the load balancer stops sending traffic to a failed instance, replication from the primary database to a standby database with automatic failover, checkpointing of long jobs so they restart from the last saved state, and retries with backoff for temporary errors.
5. Availability calculation (failures assumed independent; a year has 8,760 hours):
- one server: 99%, downtime 0.01 × 8,760 = 87.6 hours a year
- two servers in parallel: 1 − (0.01)² = 0.9999 = 99.99%, downtime 0.876 hours ≈ 52.6 minutes
- load balancer (LB) in series with the pair: 0.999 × 0.9999 = 0.9989 ≈ 99.89%, downtime ≈ 9.64 hours
Setup Avail. Down/yr
One server 99% 87.6 h
Two in parallel 99.99% 52.6 min
LB + two servers 99.89% 9.64 hThe series result is lower than the load balancer's own 99.9%, so the load balancer has become the weak point and must itself be duplicated.
Conclusion: horizontal scaling with auto-scaling gives capacity on demand, and redundancy with health checks, replication and failover removes single points of failure. Together they let a cloud application grow and stay available.
4 Why is energy efficiency important in cloud data centres? Explain PUE and the main energy-saving techniques, and calculate the saving when ten servers at 20% utilisation are consolidated onto three (take P_idle = 100 W, P_max = 200 W and PUE = 1.5). 10 marks
Cloud data centres run very large numbers of servers, storage devices and network switches around the clock, and they also need cooling and power conversion. Energy is therefore a major operating cost and a source of carbon emissions, so providers try to do the same work with less energy.
1. Measuring efficiency: Power Usage Effectiveness, PUE = total facility power ÷ IT equipment power. A PUE of 1.5 means 0.5 W of cooling and power-distribution overhead for every 1 W used by IT equipment; 1.0 is the ideal.
2. Idle power: a server draws a large part of its peak power even when idle. A simple linear model is P(u) = P_idle + (P_max − P_idle) × u, where u is the utilisation between 0 and 1.
3. Server consolidation: virtual machines (VMs) on lightly loaded hosts are moved by live migration onto fewer hosts, and the freed servers are switched off or put to sleep.
4. DVFS (dynamic voltage and frequency scaling): the dynamic power of a CMOS processor is roughly proportional to C × V² × f, so lowering the voltage and clock frequency at light load saves power, at the cost of slower execution.
5. Energy-aware scheduling: place work where it uses least energy, for example on the most efficient servers or in data centres with cheaper or renewable power, while still meeting SLAs.
6. Cooling and facility design: hot and cold aisle containment, free cooling with outside air, liquid cooling, efficient power supplies and renewable energy sources.
Worked example:
- before: each of 10 servers at 20% draws 100 + 100 × 0.2 = 120 W, a total of 10 × 120 = 1,200 W
- the total load is 10 × 0.2 = 2 servers' worth; spread over 3 servers, each runs at 2/3 ≈ 66.7%, leaving headroom for peaks
- after: each draws 100 + 100 × 2/3 ≈ 166.7 W, a total of 3 × 100 + 100 × 2 = 500 W, and the other 7 servers are switched off
- IT saving = 1,200 − 500 = 700 W, that is 700 ÷ 1,200 ≈ 58.3%
- with PUE 1.5, facility power falls from 1,800 W to 750 W, saving 1,050 W, or 1.05 kW × 8,760 h = 9,198 kWh a year
The useful work is unchanged (the load-dependent part is 200 W in both cases); the whole saving comes from removing the idle power of seven servers.
Conclusion: consolidation, DVFS, energy-aware scheduling and better cooling reduce energy use and PUE, but they must be balanced against performance, because packing hosts too tightly or migrating too often can violate SLAs.
5 Explain the fundamentals of computer security and describe a layered cloud security architecture. 10 marks
Computer security protects information and systems from unauthorised access, change and disruption. The same fundamentals apply in the cloud, but the controls are split between the provider's shared infrastructure and the customer's own configuration.
1. Goals (CIA triad): confidentiality (only authorised parties read data), integrity (data is not changed without authorisation, and changes are detectable) and availability (the service is there when needed). Non-repudiation, proof that a party really performed an action, is often added.
2. AAA: authentication verifies identity (passwords, one-time codes, certificates, multi-factor authentication); authorisation decides what an authenticated identity may do (for example role-based access control); accounting, or auditing, records who did what.
3. Threat, vulnerability and risk: a threat is a possible cause of harm (an attacker, malware, a disaster); a vulnerability is a weakness it can exploit (an unpatched server, a weak password); risk combines the likelihood of the harm with its impact.
4. Design principles: least privilege, separation of duties, defence in depth (several independent layers of control) and secure defaults. Controls are preventive (firewalls, encryption), detective (logs, intrusion detection) or corrective (backups, incident response).
Cloud security architecture: defence in depth applied layer by layer. Every access request from users passes identity and access management first, and monitoring covers all layers.
- Identity and access management (IAM): user and role accounts, least-privilege policies, multi-factor authentication and federated single sign-on.
- Application security: secure coding, authenticated APIs and a web application firewall.
- Data security: encryption at rest and in transit (TLS), keys held in a key management service or hardware security module, backups and data classification.
- Compute security: hypervisor isolation between tenants, hardened machine images, patching and anti-malware.
- Network security: isolated virtual networks with subnets, firewalls and security groups, VPN links and DDoS protection.
- Physical security: guarded, access-controlled data centres run by the provider.
- Monitoring and governance: central logging, intrusion detection, security information and event management (SIEM), compliance audits and incident response.
Cloud-specific threats such as misconfigured storage, stolen credentials, insecure APIs and attacks across tenant boundaries are each blocked at one or more of these layers.
Conclusion: the CIA goals and AAA say what security must achieve, and the layered architecture says how, so that the failure of one control does not expose the whole system.
6 Explain the cloud shared responsibility model for IaaS, PaaS and SaaS, and discuss security in public, private, community and hybrid clouds. 10 marks
In the cloud, security is shared between the provider and the customer. The shared responsibility model states who secures what, and is often summarised as: the provider secures the cloud itself, and the customer secures what it puts in the cloud. Misreading this split, for example assuming that the provider sets access rules on a customer's storage, is a common cause of data exposure.
1. Always the provider: physical data centres, the hosts, storage and network hardware, and the virtualisation layer.
2. IaaS: the customer manages the guest operating system (OS) and its patches, the runtime, middleware and applications, its data, firewall rules and security groups, and user access.
3. PaaS: the provider also manages the OS and runtime; the customer manages its application code, configuration, data and access.
4. SaaS: the provider runs the whole application; the customer still manages its data, user accounts and permissions, application settings and the devices used to reach the service.
5. Always the customer: its data and who can access it, whatever the service model.
Layer IaaS PaaS SaaS
Data & access C C C
Application C C P
OS & runtime C P P
Virtualisation P P P
Physical P P P
(C = customer, P = provider)Security in deployment models:
- Public cloud: many tenants share the provider's infrastructure. The provider supplies strong physical and platform security, but the customer has less visibility and control, data may sit in other jurisdictions, and multi-tenancy and misconfiguration are the main risks. Strict IAM and encryption with customer-managed keys reduce them.
- Private cloud: the infrastructure serves one organisation, on its premises or hosted for it. It gives full control and easier compliance, but the organisation carries most of the responsibility and cost, including physical security and patching.
- Community cloud: shared by organisations with common requirements, such as government departments or hospitals. Policies, audits and costs are shared, so members must trust each other and agree on governance.
- Hybrid cloud: combines private and public clouds. Sensitive data can stay private while other workloads burst to the public cloud, but the links between them (VPN or dedicated lines), consistent identity management and uniform policies become extra points to secure.
Conclusion: the provider's share grows from IaaS to SaaS, but data and access always remain the customer's duty, and each deployment model changes how much control, and how much risk, the customer keeps.
Advanced Concepts in Cloud Computing
Syllabus: Serverless computing and Function-as-a-Service; Serverless computing architecture; Serverless platforms: public cloud (for example AWS Lambda) and open source (for example OpenFaaS); Internet of Things (IoT) and its applications; Cloud-centric IoT and its layers; Edge and fog computing; DevOps; Infrastructure as code; Quantum cloud computing
One-page revision summary
- Serverless computing hides servers from the developer: the provider handles provisioning, scaling and patching, and the developer supplies only code and configuration.
- Serverless combines Function-as-a-Service, which runs event-triggered code, with Backend-as-a-Service, which provides managed databases, storage, authentication and messaging.
- FaaS functions are event driven, stateless and short-lived, scale automatically down to zero, and are billed per call and per GB-second of execution.
- A serverless architecture links event sources, an API gateway, an event router, a controller, stateless function instances and managed services, with logs and metrics for every call.
- A cold start is the delay of creating a new execution environment for a call; small packages, light start-up code and pre-warmed instances reduce it.
- AWS Lambda is a fully managed public-cloud FaaS service triggered by services such as Amazon API Gateway, Amazon S3 and Amazon SQS, with access controlled by an IAM execution role.
- OpenFaaS is an open-source FaaS framework that runs container-image functions on the user's own Kubernetes cluster or server, giving portability at the cost of running that infrastructure.
- The Internet of Things connects physical objects with sensors, actuators and network links so that they can collect and exchange data and act with little human help.
- IoT applications include smart homes, healthcare wearables, precision agriculture, smart cities, industrial predictive maintenance, logistics tracking and smart energy grids.
- IoT devices are often constrained in battery, memory and processing power, so they use lightweight protocols such as MQTT and CoAP, and low-power links such as ZigBee and LoRaWAN.
- Cloud-centric IoT keeps devices simple and places storage, analytics and device management in the cloud, organised as perception, network, cloud processing, application and business layers.
- Edge computing processes data on the device, fog computing processes it in nodes at a local site, and the cloud stores and analyses data from all sites.
- A fog layer cuts delay and bandwidth by filtering and summarising data locally and sending only summaries and alarms to the cloud.
- DevOps unites development and operations through collaboration, automation, small frequent changes and measurement, forming a continuous plan, code, build, test, deploy and monitor loop.
- Continuous integration builds and tests every commit automatically; continuous delivery keeps every passing build ready for an approved release, and continuous deployment releases it automatically.
- Infrastructure as Code defines infrastructure in version-controlled files, either declaratively as a desired state (Terraform, AWS CloudFormation) or imperatively as steps, and declarative tools apply them idempotently.
- Quantum cloud computing offers remote access to quantum processors and simulators: users submit circuits as jobs and receive measurement counts, without owning quantum hardware.
- Many quantum cloud workloads are hybrid: a classical program prepares circuits, sends them to the quantum service and uses the results to choose its next step.
Learn these by heart
- Serverless = FaaS (event-triggered functions) + BaaS (managed backend services); servers still exist, but the provider manages them.
- FaaS compute in GB-seconds = number of calls × execution time per call in seconds × memory in GB.
- Cold start: a new execution environment is created before the call runs; warm start: an existing instance is reused.
- Cloud-centric IoT layers, bottom to top: perception, network, cloud processing, application, business.
- Edge (on the device), fog (nodes at the local site), cloud (data centre): delay and computing power both increase from edge to cloud.
- CI = automatic build and test on every commit; CD = continuous delivery (release after approval) or continuous deployment (automatic release).
- IaC: declarative states the desired end state, imperative lists the steps; idempotent means applying the same file again changes nothing.
2-mark questions
1 What is Function-as-a-Service (FaaS), and how is it related to serverless computing? 2 marks
Function-as-a-Service is a cloud model in which a developer uploads single-purpose functions and the provider runs each one only when an event triggers it, managing the servers, scaling and patching, and billing only for calls and run time. FaaS is the compute part of serverless computing; the other part is managed backend services (BaaS) such as databases, storage and authentication.
2 What is a cold start in serverless computing, and how can its effect be reduced? 2 marks
A cold start is the extra delay on a call when no ready instance of the function exists, so the platform must first create an execution environment, load the runtime and code, and run the start-up code. It is reduced by keeping the package and its dependencies small, doing less work at start-up, and keeping some instances pre-warmed.
3 What is OpenFaaS? Name its main components. 2 marks
OpenFaaS is an open-source framework for running serverless functions on a Kubernetes cluster or a single server, with each function packaged as a container image. Its main components are the API gateway, which receives calls and records metrics; a watchdog inside each function container, which passes requests to the function code; Prometheus, which stores the metrics; and the faas-cli tool, which builds and deploys functions.
4 Distinguish between edge computing and fog computing. 2 marks
Edge computing processes data on, or right next to, the device that produces it, such as a smart camera that detects motion itself. Fog computing places a layer of fog nodes, such as gateways, routers and local servers, between many edge devices and the cloud; these nodes filter, combine and analyse data from a whole site and send only useful results to the cloud.
5 What is Infrastructure as Code (IaC)? Name its two styles. 2 marks
Infrastructure as Code means describing servers, networks, storage and other resources in machine-readable files kept in version control, so a tool can build the same environment automatically every time instead of someone clicking through a console. In the declarative style, used by Terraform and AWS CloudFormation, the file states the desired end state; in the imperative style, a script lists the steps to reach it.
6 What is quantum cloud computing? 2 marks
Quantum cloud computing gives users remote access to quantum processors and quantum simulators through a cloud service, so they need not own the hardware. A user writes a quantum circuit with a software kit and submits it as a job; the provider queues it, runs it many times and returns the measurement results as counts of each outcome. Amazon Braket and IBM Quantum offer this kind of access.
10-mark questions
1 Explain serverless computing and Function-as-a-Service (FaaS). Compare FaaS with IaaS and PaaS, and list the benefits and limitations of FaaS. 10 marks
Serverless computing is a cloud execution model in which the provider fully manages the servers and the developer supplies only code and configuration. The name does not mean that there are no servers; it means the servers are hidden from the developer. Serverless has two parts: Function-as-a-Service (FaaS), which runs the developer's code, and Backend-as-a-Service (BaaS), which offers managed databases, object storage, authentication and messaging that the code uses through APIs.
Main features of FaaS:
1. Event driven: a function runs only when an event arrives, such as an HTTP request, a file upload, a queue message or a timer. 2. Stateless and short-lived: each call is independent, so data that must last is kept in an external store such as a database. 3. Automatic scaling: the platform starts more copies of the function as simultaneous events increase, and keeps none when there are no events (scale to zero). 4. Pay per use: billing is per call and per execution time weighted by memory, measured in GB-seconds; idle time costs nothing. 5. No server administration: operating system patching, capacity planning and fault tolerance are the provider's job.
Comparison with IaaS and PaaS:
Aspect IaaS PaaS FaaS
Deploys VM App Function
You run OS + app App Code
Scaling By you Platform Per event
Idle cost Yes Often None
Billing Uptime Instance Calls+timeWorked example: a function given 512 MB (0.5 GB) of memory runs for 200 ms per call and is called 3,000,000 times in a month. Billed compute = 3,000,000 × 0.2 s × 0.5 GB = 300,000 GB-seconds, plus a charge for the 3,000,000 requests. The total running time is 3,000,000 × 0.2 s = 600,000 s, about 166.7 hours, while a VM kept on for a 30-day month is billed for 30 × 24 = 720 hours whether it is busy or idle.
Benefits:
- No servers to manage, so the team focuses on code.
- Low cost for bursty or low traffic.
- Built-in scaling and high availability.
- Faster development by joining managed services together.
Limitations:
- Cold-start delay on a call that finds no ready instance.
- Providers limit execution time and memory per call.
- Stateless design makes long workflows harder.
- Vendor lock-in through provider-specific triggers and services.
- Debugging and monitoring across many small functions are harder.
- For steady, heavy traffic an always-on server can be cheaper.
In conclusion, FaaS suits event-driven, bursty tasks such as image resizing, IoT event processing, chatbots and scheduled jobs, while long-running or steady workloads fit IaaS or PaaS better.
2 What is the Internet of Things (IoT)? Explain its characteristics and describe its applications in different fields. 10 marks
The Internet of Things (IoT) is a network of physical objects, or things, that carry sensors, actuators, a small processor and a network connection, so that they can collect data, exchange it over the Internet and act on it with little human help. A soil-moisture sensor in a farm, a smart electricity meter and a fitness band are all IoT things.
Characteristics of IoT:
1. Sensing and actuation: things measure the physical world, such as temperature, motion or location, and change it through actuators such as valves, relays and motors. 2. Connectivity: devices connect through Wi-Fi, Bluetooth, ZigBee, cellular networks or LoRaWAN. 3. Unique identity: each thing has an identity such as an IP address or an RFID tag, so it can be found and addressed. 4. Heterogeneity: many kinds of devices, vendors and protocols must work together. 5. Huge scale: very large numbers of devices produce continuous streams of data. 6. Constrained devices: most things have little battery, memory and processing power, so they use lightweight protocols such as MQTT and CoAP. 7. Dynamic nature: devices join, leave, sleep and move, so the network keeps changing. 8. Intelligence: value comes from analysing the data, usually in the cloud, and turning it into decisions.
Applications in different fields:
1. Smart home: lights, door locks, thermostats and appliances are controlled from a phone or by schedules. 2. Healthcare: wearables track heart rate and blood oxygen, and remote patient monitoring alerts a doctor when a reading is abnormal. 3. Agriculture: soil-moisture sensors switch drip irrigation on only when the soil is dry, and weather stations help plan spraying, saving water and labour. 4. Smart city: smart street lights, adaptive traffic signals, parking sensors, waste-bin fill sensors and air-quality monitors. 5. Industry (industrial IoT): vibration and temperature sensors on machines allow predictive maintenance before a breakdown. 6. Transport and logistics: GPS fleet tracking, and cold-chain temperature monitoring for medicines and food. 7. Energy: smart meters report usage so that utilities can balance supply and demand in a smart grid.
IoT also brings challenges: weak device security, privacy of personal data, interoperability between vendors, and power supply for remote devices.
In conclusion, IoT connects the physical world to computing. The things create the data, and cloud platforms give the storage and analytics that turn the data into useful action, which is why IoT systems are usually built in a cloud-centric way.
3 Explain the architecture of a serverless application with a neat diagram. How do AWS Lambda and OpenFaaS implement this model? 10 marks
In a serverless architecture the application is split into small functions that run only when events occur, while state and shared features live in managed services. The developer writes the functions and the platform does the rest.
Components of the architecture:
1. Event sources: a client app sending an HTTP request, a file upload event from object storage, a message in a queue, or a timer event. 2. API gateway: receives HTTP requests, can check authentication, and passes each request on as an event. 3. Event router: maps each event to the function subscribed to it. 4. Controller: finds a free warm instance of the function or, if none exists, starts a new one (a cold start); it also adds instances as load rises and removes idle ones. 5. Function instances: run the handler code. They are stateless, so they read and write data in a managed database or object storage. 6. Logs and metrics: every call is logged and measured for monitoring and billing.
Flow of a request: the client sends a request to the API gateway, the event router passes the event to the controller, the controller runs a function instance, the function reads or writes the managed database, and the result goes back to the client through the gateway.
AWS Lambda (public cloud):
- A fully managed FaaS service; the developer uploads code or a container image and chooses the memory size.
- Triggers include Amazon API Gateway, Amazon S3 uploads, Amazon SQS queues, DynamoDB streams and scheduled events.
- Each function runs with an IAM execution role that limits what it may access, and its logs go to Amazon CloudWatch.
- Billing is per request and per execution time weighted by memory.
OpenFaaS (open source):
- Runs functions on the user's own Kubernetes cluster or a single server, in any cloud or on premises.
- Each function is a container image, usually built from a language template with the faas-cli tool.
- The OpenFaaS gateway receives calls, a watchdog inside each container passes requests to the function, and Prometheus collects the metrics used for scaling replicas.
- The user runs and pays for the cluster, but avoids vendor lock-in.
Point Lambda OpenFaaS
Hosting AWS managed Own cluster
Source Proprietary Open source
Ops work No servers Run cluster
Lock-in Higher Lower
Billing Per use Cluster costIn conclusion, both follow the same pattern of events, gateway, functions and managed services; Lambda gives up control in exchange for no server operations, while OpenFaaS takes on operations work in exchange for portability.
4 What is cloud-centric IoT? Explain its layers with a neat diagram and an example. 10 marks
Cloud-centric IoT is an IoT design in which the cloud sits at the centre of the system. Devices in the field only sense, act and send data, while storage, processing, analytics, device management and applications run on a cloud platform. The cloud supplies what small devices lack: very large storage, elastic computing power and access to the data from anywhere.
A common layered view has five layers, from the field up to the business:
1. Perception layer: the things themselves, that is sensors, actuators and RFID tags. Sensors measure quantities such as temperature, humidity or location, and actuators carry out commands such as opening a valve.
2. Network layer: carries data from the things to the cloud. Short-range links such as Bluetooth and ZigBee, or long-range low-power links such as LoRaWAN, connect devices to a gateway, and the gateway uses Ethernet, Wi-Fi or cellular networks to reach the Internet. Lightweight protocols such as MQTT and CoAP move small messages efficiently, and the gateway can also filter data and translate protocols.
3. Cloud processing layer: the core of cloud-centric IoT. It receives the data streams, stores them in databases, runs analytics and machine learning, manages and updates devices, and sends control commands back down. Serverless functions often process each incoming event here.
4. Application layer: delivers services to users, such as a smart-farm app that shows soil moisture, a smart-city traffic dashboard or a health-monitoring app, through web and mobile interfaces.
5. Business layer: uses reports and dashboards from the applications to make decisions, set policies and plan business models, and manages the whole system.
Data flows upward from the perception layer to the business layer, while commands flow downward from the cloud to the actuators.
Example: in a smart irrigation system, soil-moisture sensors (perception) send readings over LoRaWAN through a gateway (network) to a cloud platform (cloud processing), which compares the moisture with a threshold and sends a command to open the valve. The farmer watches the field on a mobile app (application), and the farm owner uses monthly water-use reports to plan crops (business).
Advantages: easy scaling to very many devices, central storage and analytics, and remote access. Weaknesses: dependence on the Internet link, extra delay for time-critical control, and the bandwidth cost of sending raw data, which edge and fog computing reduce.
In conclusion, cloud-centric IoT keeps devices simple and moves intelligence to the cloud, organised as perception, network, cloud processing, application and business layers.
5 Explain edge and fog computing with a neat diagram and compare them with cloud computing. Show with an example how a fog layer reduces the data sent to the cloud. 10 marks
Cloud data centres are far from the devices that produce IoT data, so sending every reading to the cloud adds network delay, uses a lot of bandwidth and fails when the Internet link is down. Edge and fog computing move part of the processing closer to the data.
1. Edge computing: data is processed on the device itself or on a computer attached to it, such as a smart camera that detects motion or a controller that stops a machine at once. It gives the lowest delay but has limited computing power and sees only its own data.
2. Fog computing: a fog layer of nodes, such as industrial gateways, routers and small local servers, sits between the edge devices and the cloud. Each fog node collects data from many devices at a site, filters and combines it, runs local analytics and alarms, and sends only summaries to the cloud. It can keep working for a while if the Internet link fails.
3. Cloud computing: the cloud stores long-term data from all sites and runs heavy analytics and model training.
Comparison:
Point Edge Fog Cloud
Location Device Site Data centre
Delay Lowest Low Highest
Compute Small Medium Huge
Scope 1 device 1 site All sites
Role Instant Filter, Analytics,
control alarms trainingWorked example: a factory has 400 vibration sensors on two production lines, 200 sensors per line. Each sensor sends one 250-byte reading every second (1 KB = 1,000 bytes, 1 MB = 10^6 bytes, 1 GB = 10^9 bytes).
Without fog, every reading goes to the cloud:
- 400 × 250 = 100,000 bytes per second (100 KB/s)
- per day: 100,000 × 86,400 = 8,640,000,000 bytes = 8.64 GB
With one fog node per line, each node turns every sensor's 60 readings in a minute into one 500-byte summary (minimum, maximum and average) and sends alarms at once:
- summaries per day: 400 × 1,440 = 576,000
- data per day: 576,000 × 500 = 288,000,000 bytes = 288 MB
- reduction: 8,640 MB ÷ 288 MB = 30 times less, a saving of (1 − 1/30) × 100 ≈ 96.7 percent, ignoring the few alarm messages
The fog node also answers alarms over the local network, without waiting for a round trip to a distant data centre.
In conclusion, the edge layer, the fog layer and the cloud layer form a hierarchy: the edge acts instantly on one device, the fog filters and coordinates a site, and the cloud stores and analyses everything. Using all three gives low delay, lower bandwidth cost and central analytics together.
6 What is DevOps? Explain the DevOps pipeline with a neat diagram, and describe the role of Infrastructure as Code in it with an example. 10 marks
DevOps is a culture and set of practices that brings software development (Dev) and IT operations (Ops) together as one team with shared goals, so that software is delivered quickly, often and reliably. It replaces the old hand-over model, in which developers passed finished code to a separate operations team, with automation, shared responsibility and constant feedback.
Key principles:
- Collaboration and shared ownership of the running system.
- Automation of build, test, infrastructure and deployment.
- Small, frequent changes that are easy to test and roll back.
- Measurement, for example deployment frequency, lead time for changes, change failure rate and time to restore service.
The DevOps pipeline:
1. Plan: requirements and tasks are tracked as small work items. 2. Code and commit: developers push changes to a shared Git repository. 3. Build (continuous integration, CI): every commit triggers an automatic build, for example in Jenkins or GitHub Actions, which often produces a Docker image. 4. Automated tests: unit, integration and security tests run; a failure stops the pipeline and the developer is told at once. 5. Deploy (continuous delivery or deployment, CD): the tested build is released to staging and production, for example on Kubernetes. In continuous delivery a person approves the final release; in continuous deployment it goes out automatically. 6. Monitor and operate: tools such as Prometheus and Grafana watch errors and performance, and the feedback goes back to planning.
Role of Infrastructure as Code (IaC): the environment that the deploy stage needs, such as networks, servers and load balancers, is described in IaC files stored in Git next to the application code. The pipeline runs the IaC tool to provision infrastructure before deploying, so every environment is created the same way.
Example (Terraform, declarative):
# values come from variables
resource "aws_instance" "web" {
count = 2
ami = var.web_ami
instance_type = var.web_size
tags = {
Name = "web-server"
}
}Running terraform plan shows the changes, and terraform apply creates the two web servers. Applying the same file again changes nothing, because the tool compares the desired state with the real state; this property is called idempotence.
Benefits of IaC: repeatable and identical environments, review of changes through version control, quick rebuilding after a failure, no configuration drift from manual changes, and the infrastructure documented as code.
In conclusion, DevOps joins people, process and tools into a continuous loop of plan, code, build, test, deploy and monitor, and IaC makes the infrastructure part of that loop as automated and reviewable as the application code.
Public sources that settled doubtful points
Only the points the second AI pass doubted were looked up. These are the pages that confirmed or contradicted them; nothing here is copied from them.
42 pages
- RFC 1833: Binding Protocols for ONC RPC Version 2
- Using KVM to run Xen guests without Xen (Linux Symposium 2007)
- InterCloud: Utility-Oriented Federation of Cloud Computing Environments for Scaling of Application Services (Buyya, Ranjan, Calheiros)
- LoRa Alliance: What is LoRaWAN?
- The Things Network documentation: LoRaWAN architecture
- MQTT For Sensor Networks (MQTT-SN) Protocol Specification Version 1.2
- NIST SP 800-145, The NIST Definition of Cloud Computing
- NIST SP 500-292, NIST Cloud Computing Reference Architecture
- Choose an App Engine environment (Google Cloud documentation)
- Overview of Azure App Service (Microsoft Learn)
- Azure Functions overview (Microsoft Learn)
- Storage options for your Amazon EC2 instances (AWS documentation)
- Web Services Discovery (UDDI) - Wikipedia
- RFC 5531: RPC: Remote Procedure Call Protocol Specification Version 2
- Introduction to gRPC
- Advanced Vector Extensions - Wikipedia
- Introduction to Intel Advanced Vector Extensions (LLNL)
- Multiple instruction, single data - Wikipedia
- Granularity (parallel computing) - Wikipedia
- Distributed Component Object Model - Wikipedia
- Distributed object - Wikipedia
- Apache Kafka documentation: use cases
- Amazon Elastic Compute Cloud - Wikipedia
- The Nitro System journey - The Security Design of the AWS Nitro System
- The Evolution of an x86 Virtual Machine Monitor (Agesen et al., VMware)
- LXC - Wikipedia
- How nodes work - Docker Docs
- Kubernetes Components - Kubernetes documentation
- Architect your solution for Amazon ECS - Amazon ECS Developer Guide
- Open Virtualization Format - Wikipedia
- Open Cloud Computing Interface - Wikipedia
- Cloud Data Management Interface - Wikipedia
- OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC
- Shared Responsibility Model - Amazon Web Services
- Recommendations for Measuring and Reporting Overall Data Center Efficiency, Version 2 (ENERGY STAR, The Green Grid and others)
- Energy-Efficient Management of Data Center Resources for Cloud Computing (Buyya, Beloglazov, Abawajy)
- OpenFaaS documentation: deployment (Kubernetes and faasd)
- OpenFaaS documentation: the OpenFaaS stack
- Internet of Things Architectures: A Comparative Study (arXiv 2004.12936)
- Internet of Things (IoT): A Vision, Architectural Elements, and Future Directions (arXiv 1207.0203)
- AWS Lambda Developer Guide: Understanding the Lambda execution environment lifecycle
- Amazon Braket Developer Guide: Example quantum tasks on Amazon Braket
Further reading
Titles only, for your own study. Nothing on this page is copied from them. The units follow the official JNTUK R23 CSE syllabus (PDF) ↗.
- Mastering Cloud Computing · Rajkumar Buyya, Christian Vecchiola, S. Thamarai Selvi, Shivananda Poojara and Satish N. Srirama
- Distributed and Cloud Computing · Kai Hwang, Geoffrey C. Fox and Jack J. Dongarra
- Cloud Computing: Theory and Practice · Dan C. Marinescu
- Essentials of Cloud Computing · K. Chandrasekaran