0% found this document useful (0 votes)
3 views

OS Unit 5

Unit V of the Operating Systems course covers Virtual Machines and Mobile Operating Systems, detailing the definition, applications, benefits, and types of virtual machines, as well as their building blocks like trap-and-emulate and binary translation. It also discusses mobile operating systems, specifically iOS and Android, comparing their features, architecture, and development environments. The document emphasizes the significance of virtualization in optimizing hardware resource usage and enabling multiple operating systems to run on a single physical machine.

Uploaded by

janciraniaids
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

OS Unit 5

Unit V of the Operating Systems course covers Virtual Machines and Mobile Operating Systems, detailing the definition, applications, benefits, and types of virtual machines, as well as their building blocks like trap-and-emulate and binary translation. It also discusses mobile operating systems, specifically iOS and Android, comparing their features, architecture, and development environments. The document emphasizes the significance of virtualization in optimizing hardware resource usage and enabling multiple operating systems to run on a single physical machine.

Uploaded by

janciraniaids
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

AL3452 – OPERATING SYSTEMS UNIT -V

UNIT V VIRTUAL MACHINES AND MOBILE OS


Virtual Machines – History, Benefits and Features, Building Blocks, Types of Virtual
Machines and their Implementations, Virtualization and Operating-System
Components; Mobile OS - iOS and Android.
PART-A
1. What is virtual machine?
A Virtual Machine (VM) is a compute resource that uses software instead of a
physical computer to run programs and deploy apps. One or more virtual “guest”
machines run on a physical “host” machine. Each virtual machine runs its own
operating system and functions separately from the other VMs, even when they are all
running on the same host. This means that, for example, a virtual MacOS virtual
machine can run on a physical PC.

2. What are the applications of virtual machines?


● Building and deploying apps to the cloud.
● Trying out a new operating system (OS), including beta releases.
● Spinning up a new environment to make it simpler and quicker for developers to
run dev-test scenarios.
● Backing up your existing OS.
● Accessing virus-infected data or running an old application by installing an older
OS.

3. What are the benefits of virtual machine?

a. Security benefits
b. Scalability
c. Lowered downtime
d. Agility and speed
e. Cost savings

4. What are building blocks of e-virtual machine?

(i)Trap-and-Emulate
(ii)Binary Translation and
(iii)Hardware Assistance

Prepared by: Ms.M.NITHYA, AP/AI&DS, 1


AL3452 – OPERATING SYSTEMS UNIT -V

5. What is trap-and-emulate in virtual machine?

Trap-and-emulate is a technique used by the virtual machine to emulate


privileged instructions and registers and pretend to the OS that it's still in kernel mode.
An operation system is designed to have full control of the system.

6. Define binary translation.

The VMM scans the instruction stream and identifies the privileged, control- and
behavior-sensitive instructions. When these instructions are identified, they are
trapped into the VMM, which emulates the behavior of these instructions. The method
used in this emulation is called binary translation.

7. What is hardware assistance in VM?

● When using this assistance, the guest can use a separate mode of execution called
guest mode.
● The guest code, whether application code or privileged code, runs in the guest
mode.

8. What are the types of virtual machines?

● Process virtual machines


● System virtual machines

9. Define Para virtualization.

Para virtualization is the category of CPU virtualization which uses hyper calls
for operations to handle instructions at compile time. In para virtualization, guest OS is
not completely isolated but it is partially isolated by the virtual machine from the
virtualization layer and hardware. VMware and Xen are some examples of para
virtualization.

10. What is Programming-Environment Virtualization?

● The virtualization of programming environments is a separate type of


virtualization that is based on a different execution paradigm.
● A programming language is meant to run in a custom-built virtualized
environment in this case.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 2


AL3452 – OPERATING SYSTEMS UNIT -V

11. Define emulation.

Emulation, as name suggests, is a technique in which Virtual machines


simulates complete hardware in software. There are many virtualization techniques
that were developed in or inherited from emulation technique. It is very useful when
designing software for various systems. It simply allows us to use current platform to
access an older application, data, or operating system.

12. Define CPU scheduling in VM.

A system with virtualization, even a single-CPU system, frequently acts like a


multiprocessor system. The virtualization software presents one or more virtual
CPUs to each of the virtual machines running on the system and then schedules the
use of the physical CPUs among the virtual machines.

13. What is virtual-to physical procedure?

Virtual to physical (V2P) is the process of converting or porting a virtual machine


(VM) onto and/or as a standard physical machine. V2P allows a VM to transform into a
physical machine without losing its state, data and overall operations.

14. What are the types of virtualizations?

● Network Virtualization
● Storage Virtualization
● Server Virtualization
● Application Virtualization
● Desktop Virtualization

15. Write some of the key features of UIKit.


▪ Application lifecycle management
▪ Application event handling (e.g. touch screen user interaction)
▪ Multitasking
▪ Wireless Printing
▪ Data protection via encryption
▪ Cut, copy, and paste functionality
▪ Web and text content presentation and management
▪ Data handling

Prepared by: Ms.M.NITHYA, AP/AI&DS, 3


AL3452 – OPERATING SYSTEMS UNIT -V

16. Write some SDK framework.


● UIKit Framework (UIKit.framework)
● Map Kit Framework (MapKit.framework)
● Message UI Framework (MessageUI.framework)
● Game Kit Framework (GameKit.framework)

17. What are the iOS Media Layer?


● Core Video Framework (CoreVideo.framework)
● Core Text Framework (CoreText.framework)
● Image I/O Framework (ImageIO.framework)
● Assets Library Framework (AssetsLibrary.framework)
● Core Graphics Framework (CoreGraphics.framework)

18. List the iOS Audio support files.


● Foundation framework (AVFoundation.framework)
● Core Audio Frameworks
● Open Audio Library (OpenAL)
● Media Player Framework (MediaPlayer.framework)
● Core Midi Framework (CoreMIDI.framework)
19. What is iOS Core OS Layer?
• The Core OS Layer occupies the bottom position of the iOS stack and, as
such, sits directly on top of the device hardware.
• The layer provides a variety of services including low level networking,
access to external accessories and the usual fundamental operating
system services such as memory management, file system handling and
threads.
20. List the iOS Core OS Layer.
⮚ Accelerate Framework (Accelerate.framework)
⮚ External Accessory Framework (ExternalAccessory.framework)
⮚ Security Framework (Security.framework)

Prepared by: Ms.M.NITHYA, AP/AI&DS, 4


AL3452 – OPERATING SYSTEMS UNIT -V

21. Draw an iOS 6 Architecture.

22. What are the advantages and disadvantages of writing an operating System in a
high-level language, such as C ? (Nov/Dec-2019)
Advantages: The code can be written faster, is more compact, and is easier to
understand and debug. In addition, improvements in compiler technology will improve
the generated code for the entire operating system by simple recompilation.
An operating system is far easier to port — to move to some other hardware — if it is
written in a higher-level language.
Disadvantages: Using high level language for implementing an operating
system leads to a loss in speed and increase in storage requirements. However in
modern systems only a small amount of code is needed for high performance, such as
the CPU scheduler and memory manager.

23. What are the Basic features of Linux?


1.Portable
2.Open Source
3.Multi user
4.Multi programming
5.Hierarchical File system.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 5


AL3452 – OPERATING SYSTEMS UNIT -V

24. What is the significance of using virtual machines? (April/May 2024)


Virtual machines are significant because they allow users to run multiple
operating systems on a single physical computer, providing flexibility, scalability,
cost savings, and isolation by efficiently utilizing hardware resources, making it
easier to test applications, manage different environments, and implement
disaster recovery strategies, all while minimizing the need for dedicated physical
servers.
25. Compare iOS and Android OS? (April/May 2024) (or) Compare and contrast
Android OS and iOS. (Nov/Dec 2024)

ANDROID OS
S.No. IOS

It was developed by Google and


It was developed and is owned by Apple
Open Handset Alliance and is
Incorporation.
1. owned by Google LLC.

IOS was initially released on July 29, Google was initially released on 23
2. 2007 September 2008.

when IOS was released its first version is When Google released its first
3. iPhone OS 1 before named IOS. version of Android 1.0, Alpha.

4. It was launched in 2007. It was launched in 2008.

Latest stable release version: iOS 15.3.1 Latest stable release version:
5. and iPadOS 15.3.1 Android 14

6. Its target system types are smartphones, Its target system types are

Prepared by: Ms.M.NITHYA, AP/AI&DS, 6


AL3452 – OPERATING SYSTEMS UNIT -V

ANDROID OS
S.No. IOS

music players, and tablet computers. smartphones and tablets.

It is specially designed for Apple iphones It is designed for smartphones of


7. and ipads. all companies.

8. Its kernel type is Hybrid. Its kernel type is Linux-based.

It has preferred license is Proprietary, It has the preferred license of


9. APSL, and GNU GPL. Apache 2.0 and GNU GPLv2.

It is mainly written in C, C++, Objective- It is written using C, C++, Java,


10. C, assembly language, and Swift. and other languages.

Its update management is Software Its update management is Systems


11. Update. Software Update.

Java and Kotlin are majorly used


Swift is majorly used for iOS application
for Android application
development.
12. development.

IOS has a Commercial Based Source Android is an Open Source based


13. model with open source components. Source model.

Android devices have google


14. IOS-based Devices have Safari as the
chrome but one can install any

Prepared by: Ms.M.NITHYA, AP/AI&DS, 7


AL3452 – OPERATING SYSTEMS UNIT -V

ANDROID OS
S.No. IOS

default Internet Browser. Internet Browser.

15. IOS has Siri as Voice Assistant. Google has Google Assistance.

IOS-based devices have the feature of But Google doesn’t block 3rd party
16. blocking 3rd party app stores. app stores.

Android Devices are available in


IOS devices are available in 40 languages.
17. 100+ languages.

In IOS customizability is limited unless In Android, we can change almost


18. jailbroken. anything.

File transfer in android is easier than in File transfer in IOS is more


19. IOS. difficult than in android.

None on the iPhone 7 and later; lighting have a headphone jack, but some
3.5mm no longer comes with the phone current Android smartphones lack
20. after the iPhone XS. a headphone jack.

26. Define Virtualization. (Nov/Dec 2024)


Virtualization refers to the technology that allows multiple virtual machines
(VMs), each running its own operating system, to operate simultaneously on a single
physical computer by creating a software layer that simulates hardware, effectively
dividing the physical hardware resources into multiple virtual environments, enabling

Prepared by: Ms.M.NITHYA, AP/AI&DS, 8


AL3452 – OPERATING SYSTEMS UNIT -V

efficient use of computing power and allowing different OSes to run on the same
machine.

27. Write the importance of the kernel in the Linux operating system. (Nov/Dec
2024)
The Linux kernel is the central component of the Linux operating
system, acting as the primary interface between the computer hardware and
software processes, managing system resources like memory, CPU, and peripherals,
allowing applications to utilize hardware without directly interacting with it, and
ensuring smooth operation by handling tasks like process management, memory
allocation, and device control - essentially making it the core foundation for the
entire Linux system to function effectively.

PART-B
1. Explain in Detail about History of Virtual machines.
Virtual machines first appeared commercially on IBM mainframes in
1972. Virtualization was provided by the IBM VM operating system. This system
has evolved and is still available. In addition, many of its original concepts are
found in other systems, making it worth exploring.
IBM VM370 divided a mainframe into multiple virtual machines, each running its
own operating system. A major difficulty with the VM approach involved disk
systems. Suppose that the physical machine had three disk drives but wanted to
support seven virtual machines.
It could not allocate a disk drive to each virtual machine. The solution was to
provide virtual disks— termed minidisks in IBM’s VM operating system.
● The minidisks Virtual Machines to the system’s hard disks in all
respects except size. The system implemented each minidisk by
allocating as many tracks on the physical disks as the minidisk needed.
● Once the virtual machines were created, users could run any of the
operating systems or software packages that were available on the
underlying machine. For the IBM VM system, a user normally ran CMS—
a single-user interactive operating system.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 9


AL3452 – OPERATING SYSTEMS UNIT -V

● For many years after IBM introduced this technology, virtualization


remained in its domain. Most systems could not support virtualization.
However, a formal definition of virtualization helped to establish system
requirements and a target for functionality.
The virtualization requirements stated that:
1. A VMM provides an environment for programs that is essentially identical to
the original machine.
2. Programs running within that environment show only minor performance
decreases.
3. The VMM is in complete control of system resources. These requirements of
fidelity, performance, and safety still guide virtualization efforts today. By the
late 1990s, Intel 80x86 CPUs had become common, fast, and rich in
features. Accordingly, developers launched multiple efforts to implement
virtualization on that platform.
● Both Xen and VMware created technologies, still used today, to allow
guest operating systems to run on the 80x86. Since that time,
virtualization has expanded to include all common CPUs, many
commercial and open-source tools, and many operating systems.
● For example, the open-source Virtual Box project
(http://www.virtualbox.org) provides a program than runs on Intel
x86 and AMD64 CPUs and on Windows, Linux, Mac OS X, and Solaris
host operating systems. Possible guest operating systems include many
versions of Windows, Linux, Solaris, and BSD, including even MS-DOS
and IBM OS/2.

2. Discuss in Detail about the Benefits and Features of Virtual machines. (or) Explain
the features of virtual machine and also discuss the architecture in detail.
(April/May 2024)
Several advantages make virtualization is more attractive. Most of them are
fundamentally related to the ability to share the same hardware yet run several
different execution environments (that is, different operating systems) concurrently.
One important advantage of virtualization is that the host system is protected from the
virtual machines, just as the virtual machines are protected from each other.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 10


AL3452 – OPERATING SYSTEMS UNIT -V

● A virus inside a guest operating system might damage that operating


system but is unlikely to affect the host or the other guests. Because
each virtual machine is almost completely isolated from all other virtual
machines, there are almost no protection problems.
● A potential disadvantage of isolation is that it can prevent sharing of
resources. Two approaches to provide sharing have been implemented.
● First, it is possible to share a file-system volume and thus to share files.
Second, it is possible to define a network of virtual machines, each of
which can send information over the virtual communications network.
● The network is modeled after physical communication networks but is
implemented in software. Of course, the VMM is free to allow any number
of its guests to use physical resources, such as a physical network
connection (with sharing provided by the VMM), in which case the allowed
guests could communicate with each other via the physical network.
● One feature common to most virtualization implementations is the
ability to freeze, or suspend, a running virtual machine. Many operating
systems provide that basic feature for processes, but VMMs go one step
further and allow copies and snapshots to be made of the guest.
● The copy can be used to create a new VM or to move a VM from one
machine to another with its current state intact. The guest can then
resume where it was, as if on its original machine, creating a clone. The
snapshot records a point in time, and the guest can be reset to that point
if necessary (for example, if a change was made but is no longer wanted).
● Often, VMMs allow many snapshots to be taken. For example, snapshots
might record a guest’s state every day for a month, making restoration to
any of those snapshot states possible. These abilities are used to good
advantage in virtual environments. A virtual machine system is a perfect
vehicle for operating-system research and development.
● Normally, changing an operating system is a difficult task. Operating
systems are large and complex programs, and a change in one part may
cause obscure bugs to appear in some other part. The power of the
operating system makes changing it particularly dangerous. Because the
operating system executes in kernel mode, a wrong change in a pointer

Prepared by: Ms.M.NITHYA, AP/AI&DS, 11


AL3452 – OPERATING SYSTEMS UNIT -V

could cause an error that would destroy the entire file system. Thus, it is
necessary to test all changes to the operating system carefully.
● Furthermore, the operating system runs on and controls the entire
machine, meaning that the system must be stopped and taken out of use
while changes are made and tested. This period is commonly called
system-development time. Since it makes the system unavailable to users,
system-development time on shared systems is often scheduled late at
night or on weekends, when system load is low.
● A virtual-machine system can eliminate much of this latter problem.
System programmers are given their own virtual machine, and system
development is done on the virtual machine instead of on a physical
machine. Normal system operation is disrupted only when a completed
and tested change is ready to be put into production.
● Another advantage of virtual machines for developers is that multiple
operating systems can run concurrently on the developer’s workstation.
This virtualized workstation allows for rapid porting and testing of
programs in varying environments.
● In addition, multiple versions of a program can run, each in its own
isolated operating system, within one system. Similarly, quality assurance
engineers can test their applications in multiple environments without
buying, powering, and maintaining a computer for each environment.
● A major advantage of virtual machines in production data-center use is
system consolidation, which involves taking two or more separate systems
and running them in virtual machines on one system. Such physical-to-
virtual conversions result in resource optimization, since many lightly
used systems can be combined to create one more heavily used system.
● Virtual Machines Consider, too, that management tools that are part of
the VMM allow system administrators to manage many more systems
than they otherwise could. A virtual environment might include 100
physical servers, each running 20 virtual servers.
● Without virtualization, 2,000 servers would require several system
administrators. With virtualization and its tools, the same work can be
managed by one or two administrators. One of the tools that make this

Prepared by: Ms.M.NITHYA, AP/AI&DS, 12


AL3452 – OPERATING SYSTEMS UNIT -V

possible is templating, in which one standard virtual machine image,


including an installed and configured guest operating system and
applications, is saved and used as a source for multiple running VMs.
● Other features include managing the patching of all guests, backing up
and restoring the guests, and monitoring their resource use.
Virtualization can improve not only resource utilization but also resource
management. Some VMMs include a live migration feature that moves a
running guest from one physical server to another without interrupting its
operation or active network connections.
● If a server is overloaded, live migration can thus free resources on the
source host while not disrupting the guest. Similarly, when host hardware
must be repaired or upgraded, guests can be migrated to other servers,
the evacuated host can be maintained, and then the guests can be
migrated back.
● This operation occurs without downtime and without interruption to
users. Think about the possible effects of virtualization on how
applications are deployed. If a system can easily add, remove, and move a
virtual machine, then why install applications on that system
directly? Instead, the application could be preinstalled on a tuned and
customized operating system in a virtual machine.
● Thus, they need not be expensive, high-performance components. Other
uses of virtualization are sure to follow as it becomes more prevalent and
hardware support continues to improve.

3. Explain in detail about Building Blocks of virtual machine.


Although the virtual machine concept is useful, it is difficult to
implement. Much work is required to provide an exact duplicate of the
underlying machine. This is especially a challenge on dual-mode systems,
where the underlying machine has only user mode and kernel mode.
● The building blocks that are needed for efficient virtualization. The
ability to virtualize depends on the features provided by the CPU. If the
features are sufficient, then it is possible to write a VMM that provides a
guest environment. Otherwise, virtualization is impossible.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 13


AL3452 – OPERATING SYSTEMS UNIT -V

● VMMs use several techniques to implement virtualization, including


trap-and-emulate and binary translation. We discuss each of these
techniques in this section, along with the hardware support needed to
support virtualization.
● One important concept found in most virtualization options is the
implementation of a virtual CPU (VCPU). The VCPU does not execute
code. Rather, it represents the state of the CPU as the guest machine
believes it to be.
● For each guest, the VMM maintains a VCPU representing that guest’s
current CPU state. When the guest is context-switched onto a CPU by
the VMM, information from the VCPU is used to load the right context,
much as a general-purpose operating system would use the PCB.
● The kernel, of course, runs in kernel mode, and it is not safe to allow
user-level code to run in kernel mode. Just as the physical machine has
two modes, however, so must the virtual machine. Consequently, we must
have a virtual user mode and a virtual kernel mode, both of which run in
physical user mode.
● Those actions that cause a transfer from user mode to kernel mode on
a real machine (such as a system call, an interrupt, or an attempt to
execute a privileged instruction) must also cause a transfer from virtual
user mode to virtual kernel mode in the virtual machine. How can such a
transfer be accomplished?
● The procedure is as follows: When the kernel in the guest attempts
to execute a privileged instruction, that is an error (because the system
is in user mode) and causes a trap to the VMM in the real machine.
● The VMM gains control and executes (or “emulates”) the action that was
attempted by the guest kernel on the part of the guest. It then returns
control to the virtual machine. This is called the trap-and-emulate
method.
● Most virtualization products use this method to one extent or other. With
privileged instructions, time becomes an issue. All non privileged
instructions run natively on the hardware, providing the same
performance

Prepared by: Ms.M.NITHYA, AP/AI&DS, 14


AL3452 – OPERATING SYSTEMS UNIT -V

● Privileged instructions create extra overhead, however, causing the


guest to run more slowly than it would natively. In addition, the CPU is
being multiprogrammed among many virtual machines, which can further
slow down the virtual machines in unpredictable ways.
● This problem has been approached in various ways. IBM VM, for
example, allows normal instructions for the virtual machines to execute
directly on the hardware. Only the privileged instructions (needed mainly
for I/O) must be emulated and hence execute more slowly.
● In general, with the evolution of hardware, the performance of trap-and-
emulate functionality has been improved, and cases in which it is
needed have been reduced. For example, many CPUs now have extra
modes added to their standard dual-mode operation.
● The VCPU need not keep track of what mode the guest operating
system is in, because the physical CPU performs that function. In fact,
some CPUs provide guest CPU state management in hardware, so the
VMM need not supply that functionality, removing the extra overhead.

(i)Trap-and-Emulate
On a typical dual-mode system, the virtual machine guest can execute
only in user mode (unless extra hardware support is provided). The kernel, of
course, runs in kernel mode, and it is not safe to allow user-level code to run in
kernel mode.
● Just as the physical machine has two modes, however, so must the
virtual machine. Consequently, we must have a virtual user mode and a
virtual kernel mode, both of which run in physical user mode.
● Those actions that cause a transfer from user mode to kernel mode on a
real machine (such as a system call, an interrupt, or an attempt to
execute a privileged instruction) must also cause a transfer from virtual
user mode to virtual kernel mode in the virtual machine.
● How can such a transfer be accomplished? The procedure is as follows:
When the kernel in the guest attempts to execute a privileged instruction,
that is an error (because the system is in user mode) and causes a trap to
the VMM in the real machine.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 15


AL3452 – OPERATING SYSTEMS UNIT -V

● The VMM gains control and executes (or “emulates”) the action that was
attempted by the guest kernel on the part of the guest. It then returns
control to the virtual machine. This is called the trap-and-emulate
method and is shown in Fig 5.1.
Most virtualization products use this method to one extent or other. With
privileged instructions, time becomes an issue. All nonprivileged instructions
run natively on the hardware, providing the same performance

Fig 5.1: Trap-and-Emulate


● Privileged instructions create extra overhead, however, causing the guest
to run more slowly than it would natively. In addition, the CPU is being
multiprogrammed among many virtual machines, which can further slow
down the virtual machines in unpredictable ways.
● This problem has been approached in various ways. IBM VM, for example,
allows normal instructions for the virtual machines to execute directly on
the hardware. Only the privileged instructions (needed mainly for I/O)
must be emulated and hence execute more slowly.
● In general, with the evolution of hardware, the performance of trap-and-
emulate functionality has been improved, and cases in which it is needed
have been reduced. For example, many CPUs now have extra modes
added to their standard dual-mode operation.
The VCPU need not keep track of what mode the guest operating system is in,
because the physical CPU performs that function. In fact, some CPUs provide
guest CPU state management in hardware, so the VMM need not supply that
functionality, removing the extra overhead.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 16


AL3452 – OPERATING SYSTEMS UNIT -V

(ii)Binary Translation
Some CPUs do not have a clean separation of privileged and non
privileged instructions. Unfortunately for virtualization implementers, the Intel
x86 CPU line is one of them.
● No thought was given to running virtualization on the x86 when it was
designed. (In fact, the first CPU in the family—the Intel 4004, released in
1971—was designed to be the core of a calculator.) The chip has
maintained backward compatibility throughout its lifetime, preventing
changes that would have made virtualization easier through many
generations.
● Let’s consider an example of the problem. The command popf loads the
flag register from the contents of the stack. If the CPU is in privileged
mode, all of the flags are replaced from the stack. If the CPU is in user
mode, then only some flags are replaced, and others are ignored.
Binary translation is fairly simple in concept but complex in implementation.
The basic steps are as follows:
1. If the guest VCPU is in user mode, the guest can run its instructions natively
on a physical CPU.
2. If the guest VCPU is in kernel mode, then the guest believes that it is running
in kernel mode. The VMM examines every instruction the guest executes in
virtual kernel mode by reading the next few instructions that the guest is going
to execute, based on the guest’s program counter. Instructions other than
special instructions are run natively. Special instructions are translated into a
new set of instructions that perform the equivalent task—for example changing
the flags in the VCPU. Binary translation is shown in Fig 5.2.
3. It is implemented by translation code within the VMM. The code reads native
binary instructions dynamically from the guest, on demand, and generates
native binary code that executes in place of the original code.
The basic method of binary translation just described would execute correctly
but perform poorly. Fortunately, the vast majority of instructions would execute
natively.
● VMware tested the performance impact of binary translation by booting
one such system, Windows XP, and immediately shutting it down while

Prepared by: Ms.M.NITHYA, AP/AI&DS, 17


AL3452 – OPERATING SYSTEMS UNIT -V

monitoring the elapsed time and the number of translations produced by


the binary translation method.
● The result was 950,000 translations, taking 3 microseconds each, for a
total increase of 3 seconds (about 5%) over native execution of Windows
XP. To achieve that result, developers used many performance
improvements that we do not discuss here. For more information, consult
the bibliographical notes at the end of this chapter.

Fig 5.2: Binary Translation


(iii)Hardware Assistance
Without some level of hardware support, virtualization would be impossible. The
more hardware support available within a system, the more feature-rich and
stable the virtual machines can be and the better they can perform. In the Intel
x86 CPU family, Intel added new virtualization support in successive generations
(the VT-x instructions) beginning in 2005.
● Now, binary translation is no longer needed. In fact, all major general-
purpose CPUs are providing extended amounts of hardware support for
virtualization. For example, AMD virtualization technology (AMD-V) has
appeared in several AMD processors starting in 2006.
● It defines two new modes of operation—host and guest—thus moving
from a dual-mode to a multimode processor. The VMM can enable host
mode, define the characteristics of each guest virtual machine, and then

Prepared by: Ms.M.NITHYA, AP/AI&DS, 18


AL3452 – OPERATING SYSTEMS UNIT -V

switch the system to guest mode, passing control of the system to a guest
operating system that is running in the virtual machine.
● In guest mode, the virtualized operating system thinks it is running
on native hardware and sees whatever devices are included in the host’s
definition of the guest.
● The functionality in Intel VT-X is similar, providing root and non root
modes, equivalent to host and guest modes. Both provide guest VCPU
state data structures to load and save guest CPU state automatically
during guest context switches.
● In addition, virtual machine control structures (VMCSs) are provided
to manage guest and host state, as well as the various guest execution
controls, exit controls, and information about why guests exit back to the
host.
● In the latter case, for example, a nested page-table violation caused by
an attempt to access unavailable memory can result in the guest’s exit.
AMD and Intel have also addressed memory management in the virtual
environment. With AMD’s RVI and Intel’s EPT memory management
enhancements, VMMs no longer need to implement software NPTs.
● In essence, these CPUs implement nested page tables in hardware to
allow the VMM to fully control paging while the CPUs accelerate the
translation from virtual to physical addresses. The NPTs add a new layer,
one representing the guest’s view of logical-to-physical address
translation.
● The CPU page-table walking function includes this new layer as
necessary, walking through the guest table to the VMM table to find the
physical address desired. A TLB miss results in a performance penalty,
because more tables must be traversed (the guest and host page tables) to
complete the lookup.
● Shows the extra translation work performed by the hardware to
translate from a guest virtual address to a final physical address. I/O is
another area improved by hardware assistance. Consider that the
standard direct-memory-access (DMA) controller accepts a target memory

Prepared by: Ms.M.NITHYA, AP/AI&DS, 19


AL3452 – OPERATING SYSTEMS UNIT -V

address and a source I/O device and transfers data between the two
without operating-system action.
● Without hardware assistance, a guest might try to set up a DMA transfer
that affects the memory of the VMM or other guests. In CPUs that provide
hardware-assisted DMA (such as Intel CPUs with VT-d), even DMA has a
level of indirection.
● First, the VMM sets up protection domains to tell the CPU which
physical memory belongs to each guest. Next, it assigns the I/O devices
to the protection domains, allowing them direct access to those memory
regions and only those regions.
● The hardware then transforms the address in a DMA request issued by
an I/O device to the host physical memory address associated with the
I/O. In this manner DMA transfers are passed through between a guest
and a device without VMM interference. Similarly, interrupts must be
delivered to the appropriate guest and must not be visible to other guests.
● By providing an interrupt remapping feature, CPUs with virtualization
hardware assistance automatically deliver an interrupt destined for a
guest to a core that is currently running a thread of that guest.
● That way, the guest receives interrupts without the VMM’s needing to
intercede in their delivery. Without interrupt remapping, malicious
guests can generate interrupts that can be used to gain control of the
host system. (See the bibliographical notes at the end of this chapter for
more details.)

4. Explain in detail about Types of Virtual Machines and Their


Implementations. (or) Describe the different types of virtual machines and
their implementation. (Nov/Dec 2024)
Without some level of hardware support, virtualization would be
impossible. The more hardware support available within a system, the more
feature-rich and stable the virtual machines can be and the better they can
perform.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 20


AL3452 – OPERATING SYSTEMS UNIT -V

● In the Intel x86 CPU family, Intel added new virtualization support in
successive generations (the VT-x instructions) beginning in 2005.
Now, binary translation is no longer needed. In fact, all major general-
purpose CPUs are providing extended amounts of hardware support for
virtualization.
● The NPTs add a new layer, one representing the guest’s view of logical-to-
physical address translation. The CPU page-table walking function
includes this new layer as necessary, walking through the guest table to
the VMM table to find the physical address desired.
● A TLB miss results in a performance penalty, because more tables
must be traversed (the guest and host page tables) to complete the
lookup. Translation work performed by the hardware to translate from a
guest virtual address to a final physical address.
● I/O is another area improved by hardware assistance. Consider that the
standard direct-memory-access (DMA) controller accepts a target
memory address and a source I/O device and transfers data between
the two without operating-system action. Without hardware
assistance, a guest might try to set up a DMA transfer that affects the
memory of the VMM or other guests.
● In CPUs that provide hardware-assisted DMA. First, the VMM sets up
protection domains to tell the CPU which physical memory belongs to
each guest. Next, it assigns the I/O devices to the protection domains,
allowing them direct access to those memory regions and only those
regions.
● The hardware then transforms the address in a DMA request issued by an
I/O device to the host physical memory address associated with the I/O.
In this manner DMA transfers are passed through between a guest
and a device without VMM interference. Similarly, interrupts must be
delivered to the appropriate guest and must not be visible to other guests.
● By providing an interrupt remapping feature, CPUs with virtualization
hardware assistance automatically deliver an interrupt destined for a
guest to a core that is currently running a thread of that guest.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 21


AL3452 – OPERATING SYSTEMS UNIT -V

● That way, the guest receives interrupts without the VMM’s needing to
intercede in their delivery. Without interrupt remapping, malicious guests
can generate interrupts that can be used to gain control of the host
system.

Types of Virtual Machines and Their Implementations


We’ve now looked at some of the techniques used to implement virtualization.
Next, we consider the major types of virtual machines, their implementation,
their functionality, and how they use the building blocks just described to create
a virtual environment.
Of course, the hardware on which the virtual machines are running can cause
great variation in implementation methods. Here, we discuss the
implementations in general, with the understanding that VMMs take advantage
of hardware assistance where it is available Shown in Fig 5.3.

Fig 5.3: VMM Machine

(i) The Virtual Machine Life Cycle


Whatever the hypervisor type, at the time a virtual machine is created, its
creator gives the VMM certain parameters. These parameters usually include the

Prepared by: Ms.M.NITHYA, AP/AI&DS, 22


AL3452 – OPERATING SYSTEMS UNIT -V

number of CPUs, amount of memory, networking details, and storage details


that the VMM will take into account when creating the guest.
For example, a user might want to create a new guest with two virtual CPUs, 4
GB of memory, 10 GB of disk space, one network interface that gets its IP
address via DHCP, and access to the DVD drive.

● The VMM then creates the virtual machine with those parameters. In the
case of a type 0 hypervisor, the resources are usually dedicated. In this
situation, if there are not two virtual CPUs available and unallocated, the
creation request in our example will fail. For other hypervisor types, the
resources are dedicated or virtualized, depending on the type.
● Certainly, an IP address cannot be shared, but the virtual CPUs are
usually multiplexed on the physical CPUs. Similarly, memory
management usually involves allocating more memory to guests than
actually exists in physical memory.
● Finally, when the virtual machine is no longer needed, it can be deleted.
When this happens, the VMM first frees up any used disk space and then
removes the configuration associated with the virtual machine, essentially
forgetting the virtual machine.
● These steps are quite simple compared with building, configuring,
running, and removing physical machines. Creating a virtual machine
from an existing one can be as easy as clicking the “clone” button and
providing a new name and IP address.
● This ease of creation can lead to virtual machine sprawl, which occurs
when there are so many virtual machines on a system that their use,
history, and state become confusing and difficult to track.

(ii) Type 0 Hypervisor


Type 0 hypervisors have existed for many years under many names,
including “partitions” and “domains”. They are a hardware feature, and that
brings its own positives and negatives. Operating systems need do nothing
special to take advantage of their features. The VMM itself is encoded in the

Prepared by: Ms.M.NITHYA, AP/AI&DS, 23


AL3452 – OPERATING SYSTEMS UNIT -V

firmware and loaded at boot time. In turn, it loads the guest images to run in
each partition.
The feature set of a type 0 hypervisor tends to be smaller than those of the other
types because it is implemented in hardware. For example, a system might be
split into four virtual systems, each with dedicated CPUs, memory, and I/O
devices.

● Each guest believes that it has dedicated hardware because it does,


simplifying many implementation details. I/O presents some difficulty,
because it is not easy to dedicate I/O devices to guests if there are not
enough.
● What if a system has two Ethernet ports and more than two guests? For
example, either all guests must get their own I/O devices, or the system
must provide I/O device sharing. In these cases, the hypervisor manages
shared access or grants all devices to a control partition.
● In the control partition, a guest operating system provides services (such
as networking) via daemons to other guests, and the hypervisor routes
I/O requests appropriately.
● Some type 0 hypervisors are even more sophisticated and can move
physical CPUs and memory between running guests. In these cases, the
guests are para virtualized, aware of the virtualization and assisting in its
execution is Shown in Fig 5.4.

Fig 5.4: Type 0 Hypervisor

Prepared by: Ms.M.NITHYA, AP/AI&DS, 24


AL3452 – OPERATING SYSTEMS UNIT -V

(iii) Type 1 Hypervisor


Type 1 hypervisors are commonly found in company data centers and are
in a sense becoming “the data-center operating system.” They are special-
purpose operating systems that run natively on the hardware, but rather than
providing system calls and other interfaces for running programs, they create,
run, and manage guest operating systems.
● In addition to running on standard hardware, they can run on type 0
hypervisors, but not on other type 1 hypervisors. Whatever the platform,
guests generally do not know they are running on anything but the native
hardware.
● Type 1 hypervisors run in kernel mode, taking advantage of hardware
protection. Where the host CPU allows, they use multiple modes to give
guest operating systems their own control and improved performance.
They implement device drivers for the hardware they run on, because no
other component could do so.
● Because they are operating systems, they must also provide CPU
scheduling, memory management, I/O management, protection, and even
security. Frequently, they provide APIs, but those APIs support
applications in guests or external applications that supply features like
backups, monitoring, and security.
● The price of this increased manageability is the cost of the VMM (if it is a
commercial product), the need to learn new management tools and
methods, and the increased complexity. Another type of type 1 hypervisor
includes various general-purpose operating systems with VMM
functionality.
(iv) Type 2 Hypervisor
Type 2 hypervisors are less interesting to us as operating-system
explorers, because there is very little operating-system involvement in these
application level virtual machine managers.
● This type of VMM is simply another process run and managed by the
host, and even the host does not know virtualization is happening within
the VMM. Type 2 hypervisors have limits not associated with some of the
other types.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 25


AL3452 – OPERATING SYSTEMS UNIT -V

● For example, a user needs administrative privileges to access many of the


hardware assistance features of modern CPUs. If the VMM is being run by
a standard user without additional privileges, the VMM cannot take
advantage of these features.
● Due to this limitation, as well as the extra overhead of running a general-
purpose operating system as well as guest operating systems, type 2
hypervisors tend to have poorer overall performance than type 0 or 1.

● As is often the case, the limitations of type 2 hypervisors also provide


some benefits. They run on a variety of general-purpose operating
systems, and running them requires no changes to the host operating
system. A student can use a type 2 hypervisor, for example, to test a non-
native operating system without replacing the native operating system.
● In fact, on an Apple laptop, a student could have versions of Windows,
Linux, Unix, and less common operating systems all available for learning
and experimentation.

(v) Para virtualization:


As we’ve seen, Para virtualization takes a different tack than the other
types of virtualizations. Rather than try to trick a guest operating system into
believing it has a system to itself, Para virtualization presents the guest with a
system that is similar but not identical to the guest’s preferred system.

● The guest must be modified to run on the Para virtualized virtual


hardware. The gain for this extra work is more efficient use of resources
and a smaller virtualization layer. The Xen VMM, which is the leader in
Para virtualization, has implemented several techniques to optimize the
performance of guests as well as of the host system.
● For example, as we have seen, some VMMs present virtual devices to
guests that appear to be real devices. Instead of taking that approach, the
Xen VMM presents clean and simple device abstractions that allow
efficient I/O, as well as good communication between the guest and the
VMM about device I/O. For each device used by each guest, there is a

Prepared by: Ms.M.NITHYA, AP/AI&DS, 26


AL3452 – OPERATING SYSTEMS UNIT -V

circular buffer shared by the guest and the VMM via shared memory.
Read and write data are placed in this buffer
● For memory management, Xen does not implement nested page tables.
Rather, each guest has its own set of page tables, set to read-only. Xen
requires the guest to use a specific mechanism, a hyper call from the
guest to the hypervisor VMM, when a page-table change is needed.

● This means that the guest operating system’s kernel code must be
changed from the default code to these Xen-specific methods. To optimize
performance, Xen allows the guest to queue up multiple page-table
changes asynchronously via hyper calls and then check to ensure that
the changes are complete before continuing operation.
● Xen allowed virtualization of x86 CPUs without the use of binary
translation, instead requiring modifications in the guest operating
systems like the one described above. Over time, Xen has taken
advantage of hardware features supporting virtualization.
● As a result, it no longer requires modified guests and essentially does not
need the Para virtualization method. Para virtualization is still used in
other solutions, however, such as type 0 hypervisors Shown in Fig 5.5.

Fig 5.5: Para virtualization

Prepared by: Ms.M.NITHYA, AP/AI&DS, 27


AL3452 – OPERATING SYSTEMS UNIT -V

(vi) Programming-Environment Virtualization:


Another kind of virtualization, based on a different execution model, is the
virtualization of programming environments. Here, a programming language is
designed to run within a custom-built virtualized environment.

● For example, Oracle’s Java has many features that depend on its running
in the Java virtual machine (JVM), including specific methods for security
and memory management. If we define virtualization as including only
duplication of hardware, this is not really virtualization at all.
● But we need not limit ourselves to that definition. Instead, we can define a
virtual environment, based on APIs, that provides a set of features that we
want to have available for a particular language and programs written in
that language. Java programs run within the JVM environment, and the
JVM is compiled to be a native program on systems on which it runs.
● This arrangement means that Java programs are written once and then
can run on any system (including all of the major operating systems) on
which a JVM is available. The same can be said for interpreted languages,
which run inside programs that read each instruction and interpret it into
native operations.

(vii) Emulation
Virtualization is probably the most common method for running
applications designed for one operating system on a different operating system,
but on the same CPU. This method works relatively efficiently because the
applications were compiled for the same instruction set as the target system
uses.

● But what if an application or operating system needs to run on a different


CPU? Here, it is necessary to translate the entire source CPU’s
instructions so that they are turned into the equivalent instructions of the
target CPU.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 28


AL3452 – OPERATING SYSTEMS UNIT -V

● Such an environment is no longer virtualized but rather is fully emulated.


Emulation is useful when the host system has one system architecture
and the guest system was compiled for a different architecture.

● For example, suppose a company has replaced its outdated computer


system with a new system but would like to continue to run certain
important programs that were compiled for the old system. The programs
could be run in an emulator that translates each of the outdated system’s
instructions into the native instruction set of the new system.

● Emulation can increase the life of programs and allow us to explore old
architectures without having an actual old machine. As may be expected,
the major challenge of emulation is performance. Instruction-set
emulation can run an order of magnitude slower than native instructions.

(viii) Application Containment


The goal of virtualization in some instances is to provide a method to
segregate applications, manage their performance and resource use, and create
an easy way to start, stop, move, and manage them.
● In such cases, perhaps full-fledged virtualization is not needed. If the
applications are all compiled for the same operating system, then we do
not need complete virtualization to provide these features. We can instead
use application containment is Shown in Fig 5.6.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 29


AL3452 – OPERATING SYSTEMS UNIT -V

Fig 5.6: Application Containment


● Consider one example of application containment. Starting with version
10, Oracle Solaris has included containers, or zones, that create a virtual
layer between the operating system and the applications.
● In this system, only one kernel is installed, and the hardware is not
virtualized. Rather, the operating system and its devices are virtualized,
providing processes within a zone with the impression that they are the
only processes on the system.
● One or more containers can be created, and each can have its own
applications, network stacks, network address and ports, user accounts,
and so on. CPU and memory resources can be divided among the zones
and the system-wide processes.
● Each zone in fact can run its own scheduler to optimize the performance
of its applications on the allotted resources.

5. Explain in detail about Virtualization and Operating-System Components.


Thus far, we have explored the building blocks of virtualization and the
various types of virtualizations. In this section, we take a deeper dive into the
operating system aspects of virtualization, including how the VMM provides core
operating-system functions like scheduling, I/O, and memory management.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 30


AL3452 – OPERATING SYSTEMS UNIT -V

Here, we answer questions such as these: How do VMMs schedule CPU use
when guest operating systems believe they have dedicated CPUs? How can
memory management work when many guests require large amounts of
memory?

i) CPU Scheduling
A system with virtualization, even a single-CPU system, frequently acts
like a multiprocessor system. The virtualization software presents one or more
virtual CPUs to each of the virtual machines running on the system and then
schedules the use of the physical CPUs among the virtual machines.

● The significant variations among virtualization technologies make it


difficult to summarize the effect of virtualization on scheduling. First, let’s
consider the general case of VMM scheduling. The VMM has a number of
physical CPUs available and a number of threads to run on those CPUs.

● In this situation, the guests act much like native operating systems
running on native CPUs. Of course, in other situations, there may not be
enough CPUs to go around. The VMM itself needs some CPU cycles for
guest management and I/O management and can steal cycles from the
guests by scheduling its threads across all of the system CPUs, but the
impact of this action is relatively minor.
● More difficult is the case of over commitment, in which the guests are
configured for more CPUs than exist in the system. Here, a VMM can use
standard scheduling algorithms to make progress on each thread but can
also add a fairness aspect to those algorithms.
● For example, if there are six hardware CPUs and 12 guest-allocated CPUs,
the VMM could allocate CPU resources proportionally, giving each guest
half of the CPU resources it believes it has.
● The VMM can still present all 12 virtual CPUs to the guests, but in
mapping them onto physical CPUs, the VMM can use its scheduler to
share them appropriately. Even given a scheduler that provides fairness,
any guest operating-system scheduling algorithm that assumes a certain

Prepared by: Ms.M.NITHYA, AP/AI&DS, 31


AL3452 – OPERATING SYSTEMS UNIT -V

amount of progress in a given amount of time will be negatively affected


by virtualization.
● Consider a timesharing operating system that tries to allot 100
milliseconds to each time slice to give users a reasonable response time.
Within a virtual machine, this operating system is at the mercy of the
virtualization system as to what CPU resources it actually receives.

(ii) Memory Management


Efficient memory use in general-purpose operating systems is one
of the major keys to performance. In virtualized environments, there are more
users of memory (the guests and their applications, as well as the VMM), leading
to more pressure on memory use.
● Further adding to this pressure is that VMMs typically overcommit
memory, so that the total memory with which guests are configured
exceeds the amount of memory that physically exists in the system. The
extra need for efficient memory use is not lost on the implementers of
VMMs, who take great measures to ensure the optimal use of memory.
● For example, VMware ESX uses at least three methods of memory
management. Before memory optimization can occur, the VMM must
establish how much real memory each guest should use. To do that, the
VMM first evaluates the maximum memory size of each guest as dictated
when it is configured.
● General-purpose operating systems do not expect the amount of memory
in the system to change, so VMMs must maintain the illusion that the
guest has that amount of memory. Next, the VMM computes a target real
memory allocation for each guest based on the configured memory for
that guest and other factor, such as over commitment and system load.
● It then uses the three low-level mechanisms below to reclaim memory
from the guests. The overall effect is to enable guests to behave and
perform as if they had the full amount of memory requested although in
reality they have less.
● Recall that a guest believes it controls memory allocation via its page table
management, whereas in reality the VMM maintains a nested page table

Prepared by: Ms.M.NITHYA, AP/AI&DS, 32


AL3452 – OPERATING SYSTEMS UNIT -V

that re-translates the guest page table to the real page table. The VMM
can use this extra level of indirection to optimize the guest’s use of
memory without the guest’s knowledge or help.
● One approach is to provide double paging, in which the VMM has its own
page-replacement algorithms and pages to backing-store pages that the
guest believes are in physical memory. Of course, the VMM has knows
less about the guest’s memory access patterns than the guest does, so its
paging is less efficient, creating performance problems.
● VMMs do use this method when other methods are not available or are
not providing enough free memory. However, it is not the preferred
approach.
● At the same time, the guest is using its own memory management and
paging algorithms to manage the available memory, which is the most
efficient option. If memory pressure within the entire system decreases,
the VMM will tell the balloon process within the guest to unpin and free
some or all of the memory, allowing the guest more pages for its use.
3. Another common method for reducing memory pressure is for the VMM to
determine if the same page has been loaded more than once. If this is the case,
to the VMM reduces the number of copies of the page to one and maps the other
users of the page to that one copy.
● for example, randomly samples guest memory and creates a hash for each
page sampled. That hash value is a “thumbprint” of the page. The hash of
every page examined is compared with other hashes already stored in a
hash table. If there is a match, the pages are compared byte by byte to see
if they really are identical.
● If they are, one page is freed, and its logical address is mapped to the
other’s physical address. This technique might seem at first to be
ineffective, but consider that guests run operating systems. If multiple
guests run the same operating system, then only one copy of the active
operating-system pages need be in memory.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 33


AL3452 – OPERATING SYSTEMS UNIT -V

(iii) Input / Output:


In the area of I/O, hypervisors have some leeway and can be less
concerned with exactly representing the underlying hardware to their guests.
Because of all the variation in I/O devices, operating systems are used to dealing
with varying and flexible I/O mechanisms.
● For example, operating systems have a device-driver mechanism that
provides a uniform interface to the operating system whatever the I/O
device. Device-driver interfaces are designed to allow third-party hardware
manufacturers to provide device drivers connecting their devices to the
operating system.
● In the area of networking, VMMs also have work to do. General-purpose
operating systems typically have one Internet protocol (IP) address,
although they sometimes have more than one—for example, to connect to
a management network, backup network, and production network.
● With virtualization, each guest needs at least one IP address, because
that is the guest’s main mode of communication. Therefore, a server
running a VMM may have dozens of addresses, and the VMM acts as a
virtual switch to route the network packets to the addressed guest. The
guests can be “directly” connected to the network by an IP address that is
seen by the broader network (this is known as bridging).
● Alternatively, the VMM can provide a network address translation (NAT)
address. The NAT address is local to the server on which the guest is
running, and the VMM provides routing between the broader network and
the guest. The VMM also provides firewalling, moderating connections
between guests within the system and between guests and external
systems.

(iv) Storage Management


An important question in determining how virtualization works is this: If
multiple operating systems have been installed, what and where is the boot
disk? Clearly, virtualized environments need to approach the area of storage
management differently from native operating systems.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 34


AL3452 – OPERATING SYSTEMS UNIT -V

● Even the standard multi boot method of slicing the root disk into
partitions, installing a boot manager in one partition, and installing each
other operating system in another partition is not sufficient, because
partitioning has limits that would prevent it from working for tens or
hundreds of virtual machines.
● Once again, the solution to this problem depends on the type of
hypervisor. Type 0 hypervisors do tend to allow root disk partitioning,
partly because these systems tend to run fewer guests than other
systems.
● Alternatively, they may have a disk manager as part of the control
partition, and that disk manager provides disk space (including boot
disks) to the other partitions.
● The guest then executes as usual, with the VMM translating the disk I/O
requests coming from the guest into file I/O commands to the correct
files. Frequently, VMMs provide a mechanism to capture a physical
system as it is currently configured and convert it to a guest that the
VMM can manage and run.
● Based on the discussion above, it should be clear that this physicalto-
virtual (P-to-V) conversion reads the disk blocks of the physical system’s
disks and stores them within files on the VMM’s system or on shared
storage that the VMM can access.
(v) Live Migration:
One feature not found in general-purpose operating systems but found in
type 0 and type 1 hypervisors is the live migration of a running guest from one
system to another. We mentioned this capability earlier.
1. The source VMM establishes a connection with the target VMM and confirms
that it is allowed to send a guest.
2. The target creates a new guest by creating a new VCPU, new nested page
table, and other state storage.
3. The source sends all read-only memory pages to the target.
4. The source sends all read-write pages to the target, marking them as clean.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 35


AL3452 – OPERATING SYSTEMS UNIT -V

5. The source repeats step 4, as during that step some pages were probably
modified by the guest and are now dirty. These pages need to be sent again and
marked again as clean.
6. When the cycle of steps 4 and 5 becomes very short, the source VMM freezes
the guest, sends the VCPU’s final state, sends other state details, sends the final
dirty pages, and tells the target to start running the guest. Once the target
acknowledges that the guest is running, the source terminates the guest is
shown in fig 5.7.

Fig 5.7: VMM Source


● Before virtualization, this did not happen, as the MAC address was tied to
physical hardware. With virtualization, the MAC must be movable for
existing networking connections to continue without resetting. Modern
network switches understand this and route traffic wherever the MAC
address is, even accommodating a move. A limitation of live migration is
that no disk state is transferred.

6. Write a note on Mobile OS – iOS and Android of Architecture and SDK


Framework.(April/May-2021) (or) Discuss in detail the system components of
mobile OS. Also analyze the features of iOS and Android OS.(April/May 2024)
iPhone OS becomes iOS
❖ Prior to the release of the iPad in 2010, the operating system running on
the iPhone was generally referred to as iPhone OS. Unfortunately, iOS is also the
name used by Cisco for the operating system on its routers. When performing an

Prepared by: Ms.M.NITHYA, AP/AI&DS, 36


AL3452 – OPERATING SYSTEMS UNIT -V

internet search for iOS, therefore, be prepared to see large numbers of results for
Cisco “iOS which have absolutely nothing to do with Apple “iOS.

An Overview of the iOS 6 Architecture


✔ iOS consists of a number of different software layers, each of which
provides programming frameworks for the development of applications that run
on top of the underlying hardware.
✔ Some diagrams designed to graphically depict the iOS software stack
show an additional box positioned above the Cocoa Touch layer to indicate the
applications running on the device.
✔ In the above diagram we have not done so since this would suggest that
the only interface available to the app is Cocoa Touch. In practice, an app can
directly call down any of the layers of the stack to perform tasks on the physical
device.
✔ That said, however, each operating system layer provides an increasing
level of abstraction away from the complexity of working with the hardware.
✔ As an iOS developer you should, therefore, always look for solutions to
your programming goals in the frameworks located in the higher-level iOS layers
before resorting to writing code that reaches down to the lower-level layers.
✔ In general, the higher level of layer you program to, the less effort and
fewer lines of code you will have to write to achieve your objective. The layers of
IOS are given below in fig 5.8.

Fig 5.8: iOS Architecture

Prepared by: Ms.M.NITHYA, AP/AI&DS, 37


AL3452 – OPERATING SYSTEMS UNIT -V

The Cocoa Touch Layer


❖ The Cocoa Touch layer sits at the top of the iOS stack and contains the
frameworks that are most commonly used by iPhone application developers.
Cocoa Touch is primarily written in Objective-C, is based on the standard Mac
OS X Cocoa API (as found on Apple desktop and laptop computers) and has been
extended and modified to meet the needs of the iPhone hardware.
The Cocoa Touch layer provides the following frameworks for iPhone app
development:
UIKit Framework (UIKit.framework)
❖ The UIKit framework is a vast and feature rich Objective-C based
programming interface. It is, without question, the framework with which you
will spend most of your time working. Entire books could, and probably will, be
written about the UIKit framework alone.

Some of the key features of UIKit are as follows:


⮚ User interface creation and management (text fields, buttons, labels,
colors, fonts etc)
⮚ Application lifecycle management
⮚ Application event handling (e.g. touch screen user interaction)
⮚ Multitasking
⮚ Wireless Printing
⮚ Data protection via encryption
⮚ Cut, copy, and paste functionality
⮚ Web and text content presentation and management
⮚ Data handling
⮚ Inter-application integration
⮚ Push notification in conjunction with Push Notification Service
⮚ Local notifications (a mechanism whereby an application running in the
background can gain the user’s attention)
⮚ Accessibility
⮚ Accelerometer, battery, proximity sensor, camera and photo library
interaction

Prepared by: Ms.M.NITHYA, AP/AI&DS, 38


AL3452 – OPERATING SYSTEMS UNIT -V

⮚ Touch screen gesture recognition


⮚ File sharing (the ability to make application files stored on the device
available via iTunes)
⮚ Blue tooth-based peer to peer connectivity between devices
⮚ Connection to external displays

Map Kit Framework (MapKit.framework)


❖ The Map Kit framework provides a programming interface which enables
you to build map-based capabilities into your own applications. This allows you
to, amongst other things, display scrollable maps for any location, display the
map corresponding to the current geographical location of the device and
annotate the map in a variety of ways.

Push Notification Service


❖ The Push Notification Service allows applications to notify users of an
event even when the application is not currently running on the device. Since
the introduction of this service it has most commonly been used by news based
applications.
❖ Typically, when there is breaking news, the service will generate a
message on the device with the news headline and provide the user the option to
load the corresponding news app to read more details. This alert is typically
accompanied by an audio alert and vibration of the device. This feature should
be used sparingly to avoid annoying the user with frequent interruptions.
Message UI Framework (MessageUI.framework)
❖ The Message UI framework provides everything you need to allow users to
compose and send email messages from within your application. In fact, the
framework even provides the user interface elements through which the user
enters the email addressing information and message content.
❖ Alternatively, this information may be pre-defined within your application
and then displayed for the user to edit and approve prior to sending
Game Kit Framework (GameKit.framework)

Prepared by: Ms.M.NITHYA, AP/AI&DS, 39


AL3452 – OPERATING SYSTEMS UNIT -V

❖ The Game Kit framework provides peer-to-peer connectivity and voice


communication between multiple devices and users allowing those running the
same app to interact.
❖ When this feature was first introduced it was anticipated by Apple that it
would primarily be used in multi-player games (hence the choice of name) but
the possible applications for this feature clearly extend far beyond games
development.

iAd Framework (iAd.framework)


❖ The purpose of the iAd Framework is to allow developers to include
banner advertising within their applications. All advertisements are served by
Apple‟s own ad service. Event Kit UI Framework (EventKit.framework) The
Event Kit UI framework was introduced in iOS 4 and is provided to allow the
calendar and reminder events to be accessed and edited from within an
application.

❖ Accounts Framework (Accounts.framework) iOS 5 introduced the concept


of system accounts. These essentially allow the account information for other
services to be stored on the iOS device and accessed from within application
code.
Social Framework (Social.framework)
❖ The Social Framework allows Twitter, Facebook and SinaWeibo
integration to be added to applications. The framework operates in conjunction
the Accounts Framework to gain access tothe user‟s social network account
information.

7. Explain in detail about the iOS Media Layer.


The iOS Media Layer
❖ The role of the Media layer is to provide iOS with audio, video, animation
and graphics capabilities. As with the other layers comprising the iOS stack, the
Media layer comprises a number of frameworks which may be utilized when
developing iPhone apps. In this section we will look at each one in turn.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 40


AL3452 – OPERATING SYSTEMS UNIT -V

Core Video Framework (CoreVideo.framework)


✔ The Core Video Framework provides buffering support for the Core Media
framework. Whilst this may be utilized by application developers it is typically
not necessary to use this framework.

Core Text Framework (CoreText.framework)


✔ The iOS Core Text framework is a C-based API designed to ease the
handling of advanced text layout and font rendering requirements.
Image I/O Framework (ImageIO.framework)
✔ The Image I/O framework, the purpose of which is to facilitate the
importing and exporting of image data and image metadata, was introduced in
iOS 4. The framework supports a wide range of image formats including PNG,
JPEG, TIFF and GIF.

Assets Library Framework (AssetsLibrary.framework)


✔ The Assets Library provides a mechanism for locating and retrieving video
and photo files located on the iPhone device. In addition to accessing existing
images and videos, this framework also allows new photos and videos to be
saved to the standard device photo album.
Core Graphics Framework (CoreGraphics.framework)
✔ The iOS Core Graphics Framework (otherwise known as the Quartz 2D
API) provides a lightweight two-dimensional rendering engine. Features of this
framework include PDF document creation and presentation, vector-based
drawing, transparent layers, path-based drawing, anti-aliased rendering, color
manipulation and management, image rendering and gradients. Those familiar
with the Quartz 2D API running on MacOS X will be pleased to learn that the
implementation of this API is the same on iOS.
Core Image Framework (CoreImage.framework)
✔ A new framework introduced with iOS 5 providing a set of video and
image filtering and manipulation capabilities for application developers.
Quartz Core Framework (QuartzCore.framework)
✔ The purpose of the Quartz Core framework is to provide animation
capabilities on the iPhone. It provides the foundation for the majority of the

Prepared by: Ms.M.NITHYA, AP/AI&DS, 41


AL3452 – OPERATING SYSTEMS UNIT -V

visual effects and animation used by the UIKit framework and provides an
Objective-C based programming interface for creation of specialized animation
within iPhone apps.

OpenGL ES framework (OpenGLES.framework)


✔ For many years the industry standard for high performance 2D and 3D
graphics drawing has been OpenGL. Originally developed by the now defunct
Silicon Graphics, Inc (SGI) during the 1990s in the form of GL, the open version
of this technology (OpenGL) is now under the care of a non-profit consortium
comprising a number of major companies including Apple, Inc., Intel, Motorola
and ARM Holdings.
GLKit Framework (GLKit.framework) :
The GLKit framework is an Objective-C based API designed to ease the task of
creating OpenGL ES based applications.
NewsstandKit Framework (NewsstandKit.framework)
The Newsstand application is a new feature of iOS 5 and is intended as a central
location for users to gain access to newspapers and magazines. The
NewsstandKit framework allows for the development of applications that utilize
this new service.
iOS Audio Support
iOS is capable of supporting audio in AAC, Apple Lossless (ALAC), A-law,
IMA/ADPCM, Linear PCM, µ-law, DVI/Intel IMA ADPCM, Microsoft GSM 6.10
and AES3-2003 formats through the support provided by the following
frameworks.

AV Foundation framework (AVFoundation.framework)


✔ An Objective-C based framework designed to allow the playback,
recording and management of audio content.
Core Audio Frameworks (CoreAudio.framework, AudioToolbox.framework
and AudioUnit.framework)
✔ The frameworks that comprise Core Audio for iOS define supported audio
types, playback and recording of audio files and streams and also provide access
to the device‟s built-in audio processing units.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 42


AL3452 – OPERATING SYSTEMS UNIT -V

Open Audio Library (OpenAL)


✔ OpenAL is a cross platform technology used to provide high-quality, 3D
audio effects (also referred to as positional audio). Positional audio may be used
in a variety of applications though is typically used to provide sound effects in
games.
Media Player Framework (MediaPlayer.framework)
✔ The iOS Media Player framework is able to play video in .mov, .mp4, .m4v,
and .3gp formats at a variety of compression standards, resolutions and frame
rates.
Core Midi Framework (CoreMIDI.framework)
✔ Introduced in iOS 4, the Core MIDI framework provides an API for
applications to interact with MIDI compliant devices such as synthesizers and
keyboards via the iPhone‟s dock connector.

8. Explain in detail about TheiOS Core Services Layer.


The iOS Core Services Layer
✔ The iOS Core Services layer provides much of the foundation on which the
previously referenced layers are built and consists of the following frameworks.
Address Book Framework (AddressBook.framework)
✔ The Address Book framework provides programmatic access to the iPhone
Address Book contact database allowing applications to retrieve and modify
contact entries.
CFNetwork Framework (CFNetwork.framework)
✔ The CFNetwork framework provides a C-based interface to the TCP/IP
networking protocol stack and low level access to BSD sockets. This enables
application code to be written that works with HTTP, FTP and Domain Name
servers and to establish secure and encrypted connections using Secure Sockets
Layer (SSL) or Transport Layer Security (TLS).

Core Data Framework (CoreData.framework)


✔ This framework is provided to ease the creation of data modeling and
storage in Model-ViewController (MVC) based applications. Use of the Core Data
framework significantlyreduces the amount of code that needs to be written to

Prepared by: Ms.M.NITHYA, AP/AI&DS, 43


AL3452 – OPERATING SYSTEMS UNIT -V

perform common tasks when working with structured data within an


application.
Core Foundation Framework (CoreFoundation.framework)
✔ The Core Foundation framework is a C-based Framework which provides
basic functionality such as data types, string manipulation, raw block data
management, URL manipulation, threads and run loops, date and times, basic
XML manipulation and port and socket communication.
✔ Additional XML capabilities beyond those included with this framework
are provided via the libXML2 library. Though this is a C-based interface, most of
the capabilities of the Core Foundation framework are also available with
Objective-C wrappers via the Foundation Framework.
Core Media Framework (CoreMedia.framework)
✔ The Core Media framework is the lower level foundation upon which the
AV Foundation layer is built. Whilst most audio and video tasks can, and indeed
should, be performed using the higher level AV Foundation framework, access is
also provided for situations where lower level control is required by the iOS
application developer.
Core Telephony Framework (CoreTelephony.framework)
✔ The iOS Core Telephony framework is provided to allow applications to
interrogate the device for information about the current cell phone service
provider and to receive notification of telephony related events.
EventKit Framework (EventKit.framework)
✔ An API designed to provide applications with access to the calendar,
reminders and alarms on the device.
Foundation Framework (Foundation.framework)
✔ The Foundation framework is the standard Objective-C framework that
will be familiar to those who have programmed in Objective-C on other platforms
(most likely Mac OS X). Essentially, this consists of Objective-C wrappers around
much of the C-based Core Foundation Framework.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 44


AL3452 – OPERATING SYSTEMS UNIT -V

Core Location Framework (CoreLocation.framework)


✔ The Core Location framework allows you to obtain the current
geographical location of the device (latitude, longitude and altitude) and compass
readings from with your own applications.
✔ The method used by the device to provide coordinates will depend on the
data available at the time the information is requested and the hardware support
provided by the particular iPhone model on which the app is running (GPS and
compass are only featured on recent models). This will either be based on GPS
readings, Wi-Fi network data or cell tower triangulation (or some combination of
the three).
Mobile Core Services Framework (MobileCoreServices.framework)
✔ The iOS Mobile Core Services framework provides the foundation for
Apple‟s Uniform Type Identifiers (UTI) mechanism, a system for specifying and
identifying data types.
✔ A vast range of predefined identifiers have been defined by Apple
including such diverse data types as text, RTF, HTML, JavaScript, PowerPoint
.ppt files, PhotoShop images and MP3 files.
Store Kit Framework (StoreKit.framework)
✔ The purpose of the Store Kit framework is to facilitate commerce
transactions between your application and the Apple App Store. Prior to version
3.0 of iOS, it was only possible to charge a customer for an app at the point that
they purchased it from the App Store. iOS 3.0 introduced the concept of the “in
app purchase” whereby the user can be given the option to make additional
payments from within the application.

SQLite library
✔ Allows for a lightweight, SQL based database to be created and
manipulated from within your iPhone application.
System Configuration Framework (SystemConfiguration.framework)
✔ The System Configuration framework allows applications to access the
network configuration settings of the device to establish information about the
“reachability” of the device (for example whether Wi-Fi or cell connectivity is
active and whether and how traffic can be routed to a server).

Prepared by: Ms.M.NITHYA, AP/AI&DS, 45


AL3452 – OPERATING SYSTEMS UNIT -V

Quick Look Framework (QuickLook.framework)


✔ The Quick Look framework provides a useful mechanism for displaying
previews of the contents of file types loaded onto the device (typically via an
internet or network connection) for which the application does not already
provide support. File format types supported by this framework include iWork,
Microsoft Office document, Rich Text Format, Adobe PDF, Image files, public.text
files and comma separated (CSV).

9. Explain about the iOS Core OS Layer.


The iOS Core OS Layer
⮚ The Core OS Layer occupies the bottom position of the iOS stack and, as
such, sits directly on top of the device hardware. The layer provides a variety of
services including low level networking, access to external accessories and the
usual fundamental operating system services such as memory management, file
system handling and threads.
Accelerate Framework (Accelerate.framework)
❖ The Accelerate Framework provides a hardware optimized C-based API for
performing complex and large number math, vector, digital signal processing
(DSP) and image processing tasks and calculations.
External Accessory Framework (ExternalAccessory.framework)
❖ Provides the ability to interrogate and communicate with external
accessories connected physically to the iPhone via the 30-pin dock connector or
wirelessly via Bluetooth.
Security Framework (Security.framework)
❖ The iOS Security framework provides all the security interfaces you would
expect to find on a device that can connect to external networks including
certificates, public and private keys, trust policies, keychains, encryption,
digests and Hash-based Message Authentication Code (HMAC).

System (LibSystem)
❖ As we have previously mentioned, iOS is built upon a UNIX-like
foundation. The System component of the Core OS Layer provides much the
same functionality as any other UNIX like operating system. This layer includes

Prepared by: Ms.M.NITHYA, AP/AI&DS, 46


AL3452 – OPERATING SYSTEMS UNIT -V

the operating system kernel (based on the Mach kernel developed by Carnegie
Mellon University) and device drivers.
❖ The kernel is the foundation on which the entire iOS platform is built
and provides the low-level interface to the underlying hardware. Amongst other
things, the kernel is responsible for memory allocation, process lifecycle
management, input/output, inter-process communication, thread management,
low level networking, file system access and thread management.
❖ As an app developer your access to the System interfaces is restricted for
security and stability reasons. Those interfaces that are available to you are
contained in a C-based library called LibSystem. As with all other layers of the
iOS stack, these interfaces should be used only when you are absolutely certain
there is no way to achieve the same objective using a framework located in a
higher iOS layer.
10. Write the features of mobile OS. (April/May-2019)
Mobile devices are becoming less about the hardware and more about the
operating system (OS) running atop of it. Here are four of the most important
aspects of a mobile operating system:

1.Speed:
Menus and buttons are about as vital to a mobile experience as much as what
the user can do with them. Impossible is it, to download apps and access the
very things that a device is supposed to allow us to do if the settings and options
to do are as complicated as figuring out quantum physics. It’s the difference
between ‘Open App’ and ‘Begin Using Software Application’. It’s also the
difference between button shapes and if they’re easily noticeable and
understandable.
2. Power to the User:
When it comes to our gadgets, there are few things we enjoy more than a
breadth of options. Given the option to change everything from colour schemes
to simple concepts like being able to change the background image on the device
or to decide how the device greets us on switching it on, usually, the more
options the better.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 47


AL3452 – OPERATING SYSTEMS UNIT -V

The developer of the operating system want a completely different design to that
of the user so while simplistic use may be fine for some, allowing them to add
nuts, bolts, screws and brackets to the operating system bracket (besides apps)
could be a great thing.

3. Apps
Smartphones and tablets made such a big splash when they were first
introduced to the market in part because of how wondrous and fantastical were
the devices’ touchscreens, the other reason for the success, is likely down to
apps.
● Eschewing having to load up the device’s built-in web browser to fire up a
website and access it that way, apps make that far easier, often providing
even more features to their browser counterparts.

● In fact, apps are so advanced that you can even download a brand-new
browser to access the Internet on. The only problem is that not every app
is available on every OS.

● As it stands, Apple’s iOS has far more apps listen on its store and some
even have iOS exclusivity so if you want to get your hands on plenty of
applications application, that’s where you should look. So, while ‘quality
over quantity’ is a good mantra to go by, the more apps available on an
operating system, the better.

4. Multi-Tasking
The hardware of a device covers how well and how fast each app or
process on the device runs. It’s responsible for how many crashes an app will
log in a use and what keeps them running as smoothly as possible and, with
your hardware up to the challenge of running all of these apps as they
should, why not take advantage and ask for more of it?

Prepared by: Ms.M.NITHYA, AP/AI&DS, 48


AL3452 – OPERATING SYSTEMS UNIT -V

● Multi-tasking is mostly a new feature in terms of operation systems, with


Apple’s updated iOS allowing for multiple apps at one time and with
Android’s latest Jellybean update also letting users multi-task too.

● With devices more and more being used as extensions of offices and
workspaces, it makes sense for them to allow us to run as many things as
we’d want from our laptops and with devices that do that, it’s a wonder
why we’d find much use from computers at all.

11. Explain about iOS SDK( Software Development Kit):


The iOS SDK (Software Development Kit) (formerly iPhone SDK) is a software
development kit developed by Apple Inc. The kit allows for the development
of mobile apps on Apple's iOS operating system.
● While originally developing iPhone prior to its unveiling in 2007, Apple's
then-CEO Steve Jobs did not intend to let third-party developers build native
apps for iOS, instead directing them to make web applications for the Safari web
browser.
● However, backlash from developers prompted the company to reconsider,
with Jobs announcing in October 2007 that Apple would have a software
development kit available for developers by February 2008. The SDK was
released on March 6, 2008.
● The SDK is a free download for users of Mac personal computers. It is not
available for Microsoft Windows PCs. The SDK contains sets giving developers
access to various functions and services of iOS devices, such as hardware and
software attributes.
● It also contains an iPhone simulator to mimic the look and feel of the
device on the computer while developing. New versions of the SDK accompany
new versions of iOS. In order to test applications, get technical support, and
distribute apps through App Store, developers are required to subscribe to the
Apple Developer Program.
● Combined with Xcode, the iOS SDK helps developers write iOS apps using
officially supported programming languages, including Swift and Objective-C.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 49


AL3452 – OPERATING SYSTEMS UNIT -V

Other companies have also created tools that allow for the development of native
iOS apps using their respective programming languages.
12. Explain about Mobile Operating Systems
1. Android OS (Google Inc.)
The Android mobile operating system is Google's open and free software stack
that includes an operating system, middleware and also key applications for use
on mobile devices, including smartphones.
Updates for the open source Android mobile operating system have been
developed under "dessert-inspired" version names (Cupcake, Donut, Eclair,
Gingerbread, Honeycomb, Ice Cream Sandwich) with each new version arriving
in alphabetical order with new enhancements and improvements.

2. Bada (Samsung Electronics)


Bada is a proprietary Samsung mobile OS that was first launched in 2010. The
Samsung Wave was the first smartphone to use this mobile OS. Bada provides
mobile features such as multipoint-touch, 3D graphics and of course,
application downloads and installation.

3. BlackBerry OS (Research In Motion)


The BlackBerry OS is a proprietary mobile operating system developed by
Research In Motion for use on the company’s popular BlackBerry handheld
devices.
The BlackBerry platform is popular with corporate users as it offers
synchronization with Microsoft Exchange, Lotus Domino, Novell GroupWise
email and other business software, when used with the BlackBerry Enterprise
Server.

4. iPhone OS / iOS (Apple)


Apple's iPhone OS was originally developed for use on its iPhone devices. Now,
the mobile operating system is referred to as iOS and is supported on a number
of Apple devices including the iPhone, iPad, iPad 2 and iPod Touch.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 50


AL3452 – OPERATING SYSTEMS UNIT -V

The iOS mobile operating system is available only on Apple's own manufactured
devices as the company does not license the OS for third-party hardware. Apple
iOS is derived from Apple's Mac OS X operating system.

5. MeeGo OS (Nokia and Intel)


A joint open source mobile operating system which is the result of merging two
products based on open source technologies: Maemo (Nokia) and Moblin (Intel).
MeeGo is a mobile OS designed to work on a number of devices including
smartphones, netbooks, tablets, in-vehicle information systems and various
devices using Intel Atom and ARMv7 architectures.
6. Palm OS (Garnet OS)
The Palm OS is a proprietary mobile operating system (PDA operating system)
that was originally released in 1996 on the Pilot 1000 handheld.
Newer versions of the Palm OS have added support for expansion ports, new
processors, external memory cards, improved security and support for ARM
processors and smartphones.
Palm OS 5 was extended to provide support for a broad range of screen
resolutions, wireless connections and enhanced multimedia capabilities and is
called Garnet OS.

7. Symbian OS (Nokia)
Symbian is a mobile operating system (OS) targeted at mobile phones that offers
a high-level of integration with communication and personal information
management (PIM) functionality. Symbian OS combines middleware with
wireless communications through an integrated mailbox and the integration of
Java and PIM functionality (agenda and contacts).

Nokia has made the Symbian platform available under an alternative, open and
direct model, to work with some OEMs and the small community of platform
development collaborators. Nokia does not maintain Symbian as an open source
development project.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 51


AL3452 – OPERATING SYSTEMS UNIT -V

8. webOS (Palm/HP)
WebOS is a mobile operating system that runs on the Linux kernel. WebOS was
initially developed by Palm as the successor to its Palm OS mobile operating
system. It is a proprietary Mobile OS which was eventually acquired by HP and
now referred to as webOS (lower-case w) in HP literature.
HP uses webOS in a number of devices including several smartphones and HP
TouchPads. HP has pushed its webOS into the enterprise mobile market by
focusing on improving security features and management with the release of
webOS 3.x. HP has also announced plans for a version of webOS to run within
the Microsoft Windows operating system and to be installed on all HP desktop
and notebook computers in 2012.
9. Windows Mobile (Windows Phone)
Windows Mobile is Microsoft's mobile operating system used in smartphones
and mobile devices – with or without touchscreens. The Mobile OS is based on
the Windows CE 5.2 kernel.

13. Differentiate the host and the guest Operating system. (Nov/Dec 2024)

Host Operating
Features Guest Operating System System

A host operating
A guest operating system is a piece of system is a piece of
software that runs inside a virtual software that runs on a
computer. computer and connects
Definition with the hardware.

The host operating


system is responsible
the guest operating system is
for managing system
responsible for managing its own
resources such as
resources inside the virtual machine.
memory, CPU, and disk
Resource Management: space

Prepared by: Ms.M.NITHYA, AP/AI&DS, 52


AL3452 – OPERATING SYSTEMS UNIT -V

Host Operating
Features Guest Operating System System

the guest operating system must be The host operating


compatible with the virtual machine system must be
software and hardware abstraction compatible with the
layer provided by the host operating physical hardware or
Compatibility system. virtual machine,

The host operating


system is the primary
the guest operating system is a
operating system that
secondary operating system that runs
runs on the physical
inside the virtual machine.
hardware or virtual
Purpose machine,

The host operating


the guest operating system only has system has complete
control over the virtual resources control over the
provided by the virtual machine. physical hardware or
Control virtual machine,

It executes directly on
It executes on a virtual machine
Execution the hardware

The host operating


The guest operating system interacts
system interacts with
with the virtual machine.
Functionality the hardware.

It is possible for the guest OS to be It’s possible that the


Quantity several or single. host OS is all-in-one.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 53


AL3452 – OPERATING SYSTEMS UNIT -V

Host Operating
Features Guest Operating System System

It is secondary to the originally Host operating systems


Operating system on installed operating system on a use container-based
computer computer, virtualization

It is used to run more than one


application requiring different It helps to partition the
operating system on the same application in a server
Uses hardware.

14. Elucidate the architecture of the Linux operating system. (Nov/Dec 2024)
Linux is an open-source UNIX-based operating system. The main component of
the Linux operating system is Linux kernel. It is developed to provide low-cost or free
operating system service to personal system users, which includes an X-window
system, Emacs editor, IP/TCP GUI, etc.
Linux distribution:
Linux distribution is developed using a set of software based on compatibility
with the Linux core kernel, using which Linux-based operations in different systems,
such as personal systems, embedded systems, etc. There are around 600
distributions available.
Some Linux distributions are: MX Linux, Manjaro, Linux Mint, elementary, Ubuntu,
Debian, Solus, Fedora, openSUSE, Deepin
Components of Linux:
Like any operating system, Linux consists of software, computer programs,
documentation, and hardware.
The main components of Linux operating system are: Application, Shell, Kernel,
Hardware, Utilities as shown in figure 5.9.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 54


AL3452 – OPERATING SYSTEMS UNIT -V

Figure 5.9 Linux operating system architecture

1. Kernel:
Kernel is the main core component if Linux, it controls the activity of other hardware
components. It visualizes the common hardware resources and provide each process
with necessary virtual resources. It makes the process to wait in the ready queue and
execute in consequently to avoid any kind of conflict.
Different of types of kernel:
1.1. Monolithic Kernel:
Monolithic kernel is a type of operating system kernel, where all the concurrent
processes are executed simultaneously in the kernel itself. All the processes share
same memory recourses.
1.2. Micro kernel:
In micro kernel user services and kernel services are executed in separate address
spaces. User services are kept in user address space and kernel services are kept in
kernel address space.
1.3. Exokernel:
Exo-kernel is designed to manage hardware resources at application level. High level
abstraction is used in this operating system to offer hardware resources access to
kernel.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 55


AL3452 – OPERATING SYSTEMS UNIT -V

1.4. Hybrid kernel:


It is the combination of both monolithic kernel and microkernel. It has speed and
design of monolithic kernel and modularity and stability of microkernel.
Main Subsystems of kernel:
• Process scheduler: Responsible for fairly distributing the the processing time among
all the concurrently running process.
• Memory management unit: This kernel sub unit is responsible for proper distribution
of memory resources among the concurrently running process.
• Virtual file system: This subsystem provides interface to access stored data across
different file system and different physical media. As shown in figure 5.10.

Figure 5.10 Kernel subsystems


2. System Library:
System libraries are some predefined functions by using which any application
programs or system utilities can access kernel’s features. These libraries are the
foundation upon which any software can be built.
Some of the most common system libraries are:

Prepared by: Ms.M.NITHYA, AP/AI&DS, 56


AL3452 – OPERATING SYSTEMS UNIT -V

1. GNU C library: This is the C library that provides the most fundamental system for the
interface and execution of C programs. This provides may in-built functions for the
execution.
2. libpthread (POSIX Threads): This library plays important role for multithreading in
Linux, it allows users for creating and managing multiple threads.
3. libdl (Dynamic Linker): This library is responsible for the loading and linking file at
the runtime.
4. libm (Math Library): This library provides user with all kind of mathematical function
and their execution.
Some other system libraries are: librt (Realtime Library), libcrypt (Cryptographic
Library), libnss (Name Service Switch Library), libstdc++ (C++ Standard Library)
3. Shell:
Shell can be determined as the interface to the kernel, which hides the internal
execution of functions of kernel from the user. Users can just enter the commend and
using the kernel’s function that specific task is performed accordingly.
Different types of shell:
3.1. Command Line shell:
Executes the command provided by user given in the form command. A special
program called terminal in executed and the result is displayed in the terminal itself.
3.2. Graphical User Interface:
Executes the process provided by user in graphical way and output is displayed in the
graphical window. As shown in figure 5.11.

Figure 5.11 Linux shell

Prepared by: Ms.M.NITHYA, AP/AI&DS, 57


AL3452 – OPERATING SYSTEMS UNIT -V

4. Hardware Layer:
Hardware layer of Linux is the lowest level of operating system track. It is plays a vital
role in managing all the hardware components. It includes device drivers, kernel
functions, memory management, CPU control, and I/O operations. This layer
generalizes hard complexity, by providing an interface for software by assuring proper
functionality of all the components.
5. System utility:
System utilities are the commend line tools that preforms various tasks provided by
user to make system management and administration better. These utilities enables
user to perform different tasks, such as file management, system monitoring, network
configuration, user management etc.

Prepared by: Ms.M.NITHYA, AP/AI&DS, 58

You might also like