18
◾
Linux with Operating System Concepts
•
Visualization
: As humans are far more comfortable with pictures and spatial reason-
ing than we are at reading text, the GUI offers a format that is
easier for us to interpret
and interact with.
•
Fun
: Controlling the computer through a mouse makes the interaction more like a
game and takes away from the tedium of typing commands.
•
Multitasking
: Users tend to open multiple windows and work between them. Because
our computers are fast enough and our operating systems support this, multitasking
gives the user a great deal of power to accomplish numerous tasks concurrently (i.e.,
moving between tasks without necessarily finishing any one task before going on to
another). This also permits operations like copying and pasting from one window to
another. Although multitasking is possible from the command line, it is not as easy
or convenient.
In favor of the command line:
•
Control
: Controlling the
full
capabilities of the operating system or applications soft-
ware from the GUI can be a challenge. Often, commands are deeply hidden under-
neath menus and pop-up windows. Most Linux commands have a number of options
that can be specified via the command line to tailor
the command to the specific
needs of the user. Some of the Linux options are not available through the GUI.
•
Speed
: Unless you are a poor typist, entering commands from the command line can
be done rapidly, especially in a shell like Bash which offers numerous shortcuts. And
in many instances, the GUI can become cumbersome because of many repetitive
clicking and dragging operations. On the other hand, launching a GUI program will
usually take far more time than launching a text-based program. If you are an impa-
tient user, you might prefer the command line for these reasons.
•
Resources
: Most GUI programs are resource hogs. They tend to be far larger in size
than similar text-based programs, taking up more space on hard disk and in virtual
memory. Further, they are far more computationally expensive because the graphics
routines take more processing time and power than text-based commands.
•
Wrist strain
: Extensive misuse of the keyboard can lead
to carpal tunnel syndrome
and other health-related issues. However, the mouse is also a leading cause of car-
pal tunnel syndrome. Worse still is constant movement between the two devices. By
leaving your hands on the keyboard, you can position them in a way that will reduce
wrist strain. Keyboards today are often ergonomically arranged and a wrist rest on a
keyboard stand can also reduce the strain.
•
Learning
: As stated in Section 1.1, you can learn a lot about operating systems by
exploring Linux. However, to explore Linux, you mostly do so from the command
line. By using the command line, it provides you with knowledge that you would not
gain from GUI interaction.
Introduction to Linux
◾
19
The biggest argument in favor of the command line is control. As you learn to control
Linux through the command line, hopefully you will learn to love it. That is not to say that
you would forego the use of the GUI. Most software is more pleasing
when it is controlled
through the GUI. But when it comes to systems-level work, you should turn to the com-
mand line first and often.
1.5 VIRTUAL MACHINES
We take a bit of a departure by examining VMs (virtual machines). A VM is an extension to
an older idea known as
software emulation
. Through emulation, a computer could emulate
another type of computer. More specifically, the emulator would translate the instructions
of some piece of incompatible software into instructions native to the computer. This would
allow a user to run programs compiled for another computer with the right emulator.
The VM is a related idea to the emulator. The VM, as the name implies, creates an illu-
sionary computer in your physical computer. The physical computer is set up to run a
specific operating system and specific software. However,
through emulation, the VM then
can provide the user with a different operating system running different software.
One form of VM that you might be familiar with is the Java Virtual Machine (JVM),
which is built into web browsers. Through the JVM, most web browsers can execute Java
Applets. The JVM takes each Java Applet instruction, stored in an intermediate form called
byte code
, decodes the instruction into the machine language of the host computer, and
executes it. Thus, the JVM is an interpreter rather than a compiler. The JVM became so
successful that other forms of interpreters are now commonly available in a variety of
software so that you can run, for instance, Java or Ruby code. Today, just about all web
browsers contain a JVM.
Today’s VMs are a combination of software and data. The software
is a program that can
perform emulation. The data consist of the operating system, applications software, and
data files that the user uses in the virtual environment. With VM software, you install an
operating system. This creates a new VM. You run your VM software and boot to a specific
VM from within. This gives you access to a nonnative operating system, and any software
you wish to install inside of it. Interacting with the VM is like interacting with a computer
running that particular operating system. In this way, a Windows-based machine could
run the Mac OS X or a Macintosh could run Windows 7. Commonly, VMs are set up to
run some version of Linux. Therefore,
as a Linux user, you can access both your physical
machine’s operating system (e.g., Windows) and also Linux without having to reboot the
computer.
The cost of a VM is as follows:
• The VM software itself—although some are free, VM software is typically commer-
cially marketed and can be expensive.
• The operating system(s)—if you want to place Windows 7 in a VM, you will have to
purchase a Windows 7 installation CD to have a license to use it. Fortunately, most
versions of Linux are free and easily installed in a VM.
20
◾
Linux with Operating System Concepts
• The load on the computer—a VM requires a great deal of computational and memory
overhead, however modern multicore processors are more than capable of handling
the load.
• The size of the VM on hard disk—the image of the VM must be stored on hard disk
and the size of the VM will be similar in size to that of the real operating system, so
for instance, 8 GBytes is reasonable for a Linux image and 30 GBytes
for a Windows
7 image.
You could create a Linux VM, a Windows VM, even a mainframe’s operating system, all
accessible from your computer. Your computer could literally be several or dozens of dif-
ferent computers. Each VM could have its own operating system, its own software, and its
own file system space. Or, you could run several VMs where each VM is the same operat-
ing system and the same software, but each VM has different data files giving you a means
of experimentation. Table 1.1 provides numerous reasons for using virtualization.
VM software is now available to run on Windows computers, Mac OS X, and Linux/Unix
computers. VM software titles include vSphere Client and Server,
VMware Workstation,
TABLE 1.1
Reasons to Use Virtualization
Do'stlaringiz bilan baham: