Processes
Processes
Processes
1.Instruction set architecture: the set of machine instructions, with two subsets:
•Privileged instructions: allowed to be executed only by the operating system.
•General instructions: can be executed by any program.
2.System calls as offered by an operating system.
3.Library calls, known as an application programming interface (API)
Ways of virtualization
Differences
(a)Separate set of instructions, an interpreter/emulator, running atop an
OS.
(b)Low-level instructions, along with bare-bones minimal operating
system
(c)Low-level instructions, but delegating most work to a full-fledged OS.
Privileged vs. Non-Privileged
Instructions in Operating Systems
• Privileged instruction: : if and only if executed in user mode, it
causes a trap to the operating system
• Nonpriviliged instruction: execute it by any program
Condition for virtualization
•Necessary condition
For any conventional computer, a virtual machine monitor may be constructed if the set
of sensitive instructions for that computer is a subset of the set of privileged instructions.
•Problem: condition is not always satisfied
There may be sensitive instructions that are executed in user mode without causing a
trap to the operating system.
•Solutions
•Emulate all instructions
•Wrap nonprivileged sensitive instructions to divert control to VMM
•Paravirtualization: modify guest OS, either by preventing nonprivileged sensitive
instructions, or making them nonsensitive (i.e., changing the context).
Benefits of Virtualization
•Cost Efficiency
•Dynamic Load Balancing
•Flexibility and Isolation
•Better Resource Utilization
•Improved Scalability
•Enhanced Collaboration
Containers
• Containers are a virtualization
technology that isolates applications
within an independent runtime
environment while sharing the same
underlying operating system. Instead of
using full operating systems like in
virtual machines, containers run on a
single operating system and run
different applications within them.
How do containers work?
• Structure:
A container contains the applications and everything needed for them to run (such as
files, libraries, and tools), and operates independently from other containers and
applications.
•Isolated Environment:
Each container runs on the same underlying operating system but with complete isolation
between the applications inside different containers.
Difference between Containers and Virtual Machines
(VMs):
•Containers:
Containers share the underlying operating system but isolate applications. They consume
fewer resources because the underlying operating system is shared.
•Virtual Machines (VMs):
Each virtual machine has its own complete operating system, requiring more resources.
VMs and cloud computing
Cloud Computing refers to the delivery of computing services, including
servers, storage, databases, networking, software, and analytics, over the
internet ("the cloud"). Instead of owning and managing physical hardware and
software, users can access these resources on-demand from cloud providers.
• Three types of cloud services
•Infrastructure-as-a-Service covering the basic infrastructure
•Platform-as-a-Service covering system-level services
•Software-as-a-Service containing actual applications
Client-Specific Counterparts Thin-Client Solutions
• Observation: Concurrent servers are the standard because they handle multiple client requests effectively,
even under heavy load.
Contacting
Servers:
End Points Clients communicate with servers through end points (ports) on the server's
machine:
Preassigned End Points: Well-known services like FTP (port 21)
and HTTP (port 80) use fixed ports globally assigned by IANA.
Dynamically Assigned End Points: Services without fixed ports use
operating systems or daemons to assign and track active ports. A
client first queries the daemon for the correct end point and then contacts
the specific server.
Interrupting a Server
Servers need to handle interruptions effectively, such as canceling ongoing operations
like file uploads. Two main approaches are used:
1. Abrupt Exit
•Client disconnects, forcing the server to terminate the session.
•Simple but inefficient.
2. Out-of-Band Data
• Client sends a special interruption signal to notify the server.
•Two implementations:
1. Separate Control Endpoint: A dedicated channel for urgent signals.
2. Same Connection: Uses the existing connection (e.g., TCP urgent
flag).
The differences between stateless and stateful servers
Object servers
• object servers are specialized servers designed to host and manage distributed objects.
• object servers provide the environment and mechanisms needed to execute and manage objects.
• These objects encapsulate data (state) and methods (code) and are the primary building blocks of
services in distributed systems.