Difference Between Windows and Linux: Mobile Operating Systems
Difference Between Windows and Linux: Mobile Operating Systems
operation of the computer hardware and computer software. Without the operating system, all
components of a computer such as hardware and software will be useless and a computer without an OS
is just a dumb metal. In other words, an OS describes a software program, which designed to run all other
software programs on a computer. In a pure techie perspective, the OS is the backbone of a computer,
which manages both hardware and software resources. The OS is comprised of system software and all
the fundamental files a computer needs while booting. Devices such as desktop computer, laptop, tablet
and a smartphone use an OS that facilitates the basic functionality that the device needs while startup.
The most common operating systems includes the Windows family of operating systems developed by
Microsoft, the Macintosh OS from Apple and the UNIX family of operating systems and many other
special purpose operating systems that are used with mainframes, robotics, real-time control systems,
manufacturing etc. (Read difference between Windows and Linux) Each OS may be different, but they all
provide GUI or graphical user interface, which has a desktop and the capability of files and folders
management.
Enables the applications to deal with the hardware in a consistent and stable way without knowing entire
details of the hardware.
The most important function of OS is managing the hardware and resources, where various input
methods and programs compete with each other to achieve the CPU attention, demand storage, memory
and I/O bandwidth etc. Here the OS ensures that every application gets necessary resources while
keeping the other applications nicely and also the processes are running fine for all users. The second
task is where a consistent API [application programming interface] is provided .Here it is important to
have multiple computers using the same type of OS or an OS that is open to any changes to the
hardware. A consistent API helps a software developer to create an application that runs on different
types of computers with varied memory or storage space. An OS ensures the different applications
continue to run in case of a hardware upgrade or a security patch updates. This is how an OS manages
both the hardware and software resources of a computer.
Since the OS is the fundamental user interface for a computer, it definitely affects how you interact with
the devices. Because of this people may set their own preferences for selecting a specific OS for their
perusal. Say for example one user may prefer using Linux or BSD where the other person may opt for
Windows 7 or any other version from the windows operating system family. A mobile user may choose an
Android phone or smartphone instead of an iPhone that runs on iOS. Depending on the capacity of an
application to run on multiple platforms it is important to choose an OS accordingly when you purchase a
computer
Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting
software for cost allocation of processor time, mass storage, printing, and other resources.
For hardware functions such as input and output and memory allocation, the operating system acts as an
intermediary between programs and the computer hardware,[1][2] although the application code is usually executed
directly by the hardware and frequently makes system calls to an OS function or be interrupted by it. Operating
systems are found on many devices that contain a computer—from cellular phones and video game consoles to web
servers and supercomputers.
Distributed[edit]
A distributed operating system manages a group of distinct computers and makes them appear to be a single
computer. The development of networked computers that could be linked and communicate with each other gave rise
to distributed computing. Distributed computations are carried out on more than one machine. When computers in a
group work in cooperation, they form a distributed system.[5]
Templated[edit]
In an OS, distributed and cloud computing context, templating refers to creating a single virtual machine image as a
guest operating system, then saving it as a tool for multiple running virtual machines (Gagne, 2012, p. 716). The
technique is used both in virtualization and cloud computing management, and is common in large server
warehouses.[6]
Embedded[edit]
Embedded operating systems are designed to be used in embedded computer systems. They are designed to
operate on small machines like PDAs with less autonomy. They are able to operate with a limited number of
resources. They are very compact and extremely efficient by design. Windows CE and Minix 3 are some examples of
embedded operating systems.
Real-time[edit]
A real-time operating system is an operating system that guarantees to process events or data within a certain short
amount of time. A real-time operating system may be single- or multi-tasking, but when multitasking, it uses
specialized scheduling algorithms so that a deterministic nature of behavior is achieved. An event-driven system
switches between tasks based on their priorities or external events while time-sharing operating systems switch tasks
based on clock interrupts.[citation needed]
Library[edit]
A library operating system is one in which the services that a typical operating system provides, such as networking,
are provided in the form of libraries. These libraries are composed with the application and configuration code to
construct unikernels — which are specialised, single address space, machine images that can be deployed to cloud
or embedded environments.
A real-time operating system (RTOS) is an operating system intended for applications with fixed deadlines (real-time
computing). Such applications include some small embedded systems, automobile engine controllers, industrial
robots, spacecraft, industrial control, and some large-scale computing systems.
An early example of a large-scale real-time operating system was Transaction Processing Facility developed
by American Airlines and IBM for the Sabre Airline Reservations System.
Embedded systems that have fixed deadlines use a real-time operating system such
as VxWorks, PikeOS, eCos, QNX, MontaVista Linux and RTLinux. Windows CE is a real-time operating system that
shares similar APIs to desktop Windows but shares none of desktop Windows' codebase.[citation needed] Symbian OS also
has an RTOS kernel (EKA2) starting with version 8.0b.
Some embedded systems use operating systems such as Palm OS, BSD, and Linux, although such operating
systems do not support real-time computing.
Boot Sectors
A sector is a part of the hard disk having length of 512 bytes. A sector is termed as boot
sector because of its location and because this sector is responsible for the further boot
process of the system. This boot sector is generally called Master Boot Record. The
MBR is a 512-byte sector, which is located in the first sector on the disk (sector 1 of
cylinder 0, head 0). As soon as BIOS gets the boot sector, it tends to copy MBR to RAM
and switches the execution authority to it.
· In the MBR the first 446 bytes are the primary boot loader, which is also referred as
PBL.
· The next sixty-four bytes are the partition table, which has the record for each of the
partitions.
· The MBR ends with two bytes that should be 0xAA55. These numbers act as
validation that this sector is the boot sector or Master Boot Record.
The following are the 6 high level stages of a typical Linux boot process.
1. BIOS
• BIOS stands for Basic Input/Output System
• Performs some system integrity checks
• Searches, loads, and executes the boot loader program.
• It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it
depends on your system) during the BIOS startup to change the boot sequence.
• Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
• So, in simple terms BIOS loads and executes the MBR boot loader.
2. MBR
• MBR stands for Master Boot Record.
• It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
• MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446
bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.
• It contains information about GRUB (or LILO in old systems).
• So, in simple terms MBR loads and executes the GRUB boot loader.
3. GRUB
• GRUB stands for Grand Unified Bootloader.
• If you have multiple kernel images installed on your system, you can choose which one to be executed.
• GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default
kernel image as specified in the grub configuration file.
• GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
• Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is
sample grub.conf of CentOS.
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
root (hd0,0)
initrd /boot/initrd-2.6.18-194.el5PAE.img
• As you notice from the above info, it contains kernel and initrd image.
• So, in simple terms GRUB just loads and executes Kernel and initrd images.
4. Kernel
• Mounts the root file system as specified in the “root=” in grub.conf
• Kernel executes the /sbin/init program
• Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps
-ef | grep init’ and check the pid.
• initrd stands for Initial RAM Disk.
• initrd is used by kernel as temporary root file system until kernel is booted and the real root file
system is mounted. It also contains necessary drivers compiled inside, which helps it to access the
hard drive partitions, and other hardware.
5. Init
• Looks at the /etc/inittab file to decide the Linux run level.
• Following are the available run levels
• 0 – halt
• 1 – Single user mode
• 2 – Multiuser, without NFS
• 3 – Full multiuser mode
• 4 – unused
• 5 – X11
• 6 – reboot
• Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
• Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
• If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6
means, probably you might not do that.
• Typically you would set the default run level to either 3 or 5.
6. Runlevel programs
• When the Linux system is booting up, you might see various services getting started. For example, it
might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level
directory as defined by your run level.
• Depending on your default init level setting, the system will execute the programs from one of the
following directories.
• Run level 0 – /etc/rc.d/rc0.d/
• Run level 1 – /etc/rc.d/rc1.d/
• Run level 2 – /etc/rc.d/rc2.d/
• Run level 3 – /etc/rc.d/rc3.d/
• Run level 4 – /etc/rc.d/rc4.d/
• Run level 5 – /etc/rc.d/rc5.d/
• Run level 6 – /etc/rc.d/rc6.d/
• Please note that there are also symbolic links available for these directory under /etc directly. So,
/etc/rc0.d is linked to /etc/rc.d/rc0.d.
• Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.
• Programs starts with S are used during startup. S for startup.
• Programs starts with K are used during shutdown. K for kill.
• There are numbers right next to S and K in the program names. Those are the sequence number in
which the programs should be started or killed.
• For example, S12syslog is to start the syslog deamon, which has the sequence number of 12.
S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog
program will be started before sendmail.
A boot loader is a computer program that loads an operating system or some other system software for the
computer after completion of the power-on self-tests; it is the loaderfor the operating system itself, which has its own
loader for loading ordinary user programs and libraries. Within the hard reboot process, it runs after completion of the
self-tests, then loads and runs the software. A boot loader is loaded into main memory from persistent memory, such
as a hard disk drive or, in some older computers, from a medium such as punched cards, punched tape, or magnetic
tape. The boot loader then loads and executes the processes that finalize the boot. Like POST processes, the boot
loader code comes from a "hard-wired" and persistent location; if that location is too limited for some reason, that
primary boot loader calls a second-stage boot loader or a secondary program loader.
On modern general purpose computers, the boot up process can take tens of seconds, and typically involves
performing a power-on self-test, locating and initializing peripheral devices, and then finding, loading and starting
an operating system. The process of hibernating or sleeping does not involve booting. Minimally, some embedded
systems do not require a noticeable boot sequence to begin functioning and when turned on may simply run
operational programs that are stored in ROM. All computing systems are state machines, and a reboot may be the
only method to return to a designated zero-state from an unintended, locked state.
Boot is short for bootstrap[1][2] or bootstrap load and derives from the phrase to pull oneself up by one's bootstraps.[3] The
usage calls attention to the requirement that, if most software is loaded onto a computer by other software already
running on the computer, some mechanism must exist to load the initial software onto the computer.[4] Early
computers used a variety of ad-hoc methods to get a small program into memory to solve this problem. The invention
of read-only memory (ROM) of various types solved this paradox by allowing computers to be shipped with a start up
program that could not be erased. Growth in the capacity of ROM has allowed ever more elaborate start up
procedures to be implemented.
Network booting
Most computers are also capable of booting over a computer network. In this scenario, the operating system is stored
on the disk of a server, and certain parts of it are transferred to the client using a simple protocol such as the Trivial
File Transfer Protocol (TFTP). After these parts have been transferred, the operating system takes over the control of
the booting process.
As with the second-stage boot loader, network booting begins by using generic network access methods provided by
the network interface's boot ROM, which typically contains aPreboot Execution Environment (PXE) image. No drivers
are required, but the system functionality is limited until the operating system kernel and drivers are transferred and
started. As a result, once the ROM-based booting has completed it is entirely possible to network boot into an
operating system that itself does not have the ability to use the network interface.
The earliest microcomputers, such as the Altair 8800 and an even earlier, similar machine (based on the Intel 8008
CPU) had no bootstrapping hardware as such. When started, the CPU would see memory that would contain
executable code containing only binary zeros—memory was cleared by resetting when powering up. The front panels
of these machines carried toggle switches, one switch per bit of the computer memory word. Simple additions to the
hardware permitted one memory location at a time to be loaded from those switches to store bootstrap code.
Meanwhile, the CPU was kept from attempting to execute memory content. Once correctly loaded, the CPU was
enabled to execute the bootstrapping code. This process was tedious and had to be error-free.
The small program that starts this sequence is known as a bootstrap loader, bootstrap or boot loader. This small
program's only job is to load other data and programs which are then executed from RAM. Often, multiple-stage boot
loaders are used, during which several programs of increasing complexity load one after the other in a process
of chain loading.
System configuration
A system configuration (SC) in systems engineering defines the computers, processes, and devices that compose
the system and its boundary. More general the system configuration is the specific definition of the elements that
define and/or prescribe what a system is composed of.
Alternatively the term system configuration can be used to relate to a model (declarative) for abstract generalized
systems. In this sense the usage of the configuration information is not tailored to any specific usage, but stands
alone as a data set. A properly-configured system avoids resource-conflict problems, and makes it easier to upgrade
a system with new equipment.
Sample Configuration[edit]
The following is a basic SC XML System Configuration:
<system_configuration>
<site name="MyHouse" >
<hosts>
<host_ref name="host1"/>
</hosts>
</site>
<group name="mysql" gid="500"/>
<user name="mysql" uid="500">
<groups>
<group_ref name="mysql"/>
</groups>
</user>
<host name="host1" >
<users>
<user_ref name="mysql">
</users>
<profiles>
<profile_ref name="workstation"/>
</profiles>
</host>
<profile name="workstation" >
<components>
<component_ref name="user-setup" >
<component_ref name="mysql-db" >
</components>
</profile>
<component name="user-setup">
</component>
<component name="mysql-db">
</component>
</system_configuration>
Description: This provides information about a single "site" (MyHouse) and specifies that there is one host with user-
setup and mysql-db components. The host must have an account on it for a user named mysql, with appropriate
parameters. Notice that the configuration schema requires no XML tags that are Windows- or UNIX-specific. It simply
presents data' as standalone information – with no pretense for how the data is to be used.
Usage[edit]
The usage for the model in practical terms falls into several categories: documentation, deployment & operations.
Documentation[edit]
One use of the configuration is to simply record what a system is. This documentation could in turn become quite
extensive, thus complicating the data model. It is important to distinguish between configuration data
and descriptive data. Of course comments can be applied at any level, even in most tools, however the bloating of
the data can reduce its usefulness. For example, the system configuration is not a place to record historical changes,
or descriptions of design and intent for the various elements. The configuration data is simply to be "what it is" or
"what we want it to be", not "how to get it there" or "what it was".
Deployment[edit]
Deployment involves interpreting a configuration data set and acting on that data to realize the configure the system
accordingly. This may simply be a validation of what's there to confirm that the configuration is in effect.
Examples include a Perl library launched from the command line to read the configuration and begin launching
processes on the local or remote hosts to install components. Also while the system is running, there may be
a SystemConfiguration service that provides an interface (i.e. CORBA IDL interfaces) for other system applications to
use to access the configuration data, and perform deployment-like actions.
Operations[edit]
When the system is in operation, there may be uses for the configuration data by specific kinds of services in the
system. For example, a Secnager may access the configuration to acquire the MD5 passwords for the user accounts
that are allowed to login to hosts remotely. A system monitor service (see: system monitoring) may use the data to
determine "what to monitor" and "how to monitor" the system elements. A PresentationManager might use the data to
access menu-items and views based on user access privileges.
Volume (computing)
In the context of computer operating systems, a volume or logical drive is a single accessible storage area with a
single file system, typically (though not necessarily) resident on a single partition of a hard disk. Although a volume
might be different from a physical disk drive, it can still be accessed with an operating system's logical interface.
However, a volume differs from a partition. In Linux systems, volumes are usually handled by the Logical Volume
Manager or the Enterprise Volume Management System and manipulated using mount(8). In NT-based versions
of Microsoft Windows, volumes are handled by the kernel and managed using the Disk Management MMC snap-in or
the Diskpart command line tool.
In Microsoft Windows Server 2008 and onward the term "volume" is used as a superset that includes "partition" as
well.[1][2][3]
It isn't uncommon to see a volume packed into a single file. Examples include ISO9660 disc images (CD/DVD
images, commonly called "ISOs"), and installer volumes for Mac OS X (DMGs). As these volumes are files which
reside within another volume, they certainly are not partitions.
In order to better visualize this concept, one might consider the example of a large library. If a non-fiction work is
originally classified as having the subject "plants", but then has to be moved to the subject "flora", one does not need
to refile the book, whose position on the shelf would be static, but rather, one needs only to replace the index card.
However, to move the book to another library, adjusting index cards alone is insufficient. The entire book must be
moved.
A volume label, sometimes called a volume name, is a unique name assigned to a drive, disc, or other
media.
In Windows, a volume label is not required but it's often useful to give a name to a drive to help identify its
use in the future.
A drive's volume label can be changed at any time but is usually set during the formatting of the drive.
Certain restrictions apply when assigning volume labels depending on which file system is on the drive
- NTFS or FAT:
Volume Label on NTFS Drives:
• Maximum of 32 characters
• No tabs
Notice that you also used relative pathnames to copy the file. You can use both
relative and absolute pathnames with cp. Our login directory is the parent of the
directory tigger; meaning that tigger is one directory down from ours.
Read the cp man page (man cp) for a full list of the options available with cp. But
among the options you can use with cp are:
• -i --interactive. Prompts you to confirm if the file is going to overwrite a file
in your destination. This is a handy option because it can help prevent you from
making mistakes.
• -r --
recursive. Rather than just copying all the files and directories, copies the
whole directory tree, subdirectories and all, to another location.
• -f --force. Copies without prompting you for confirmation that the file should
be overwritten. Unless you're sure you want to force the copy, you probably
don't want to make friends with this option right now.
• -v - verbose. Will show the progress of the files being copied.
Just by using cp alone, you won't see much when the command is executed. Using an
option, such as -i, can make the process a little more useful, because if you want to
copy a file to a location that already has a file with the same name, you'll be asked
first if you really want to overwrite -- meaning replace -- the file that's already there.
Don't be too "forceful"
Remember that among your options is -f (force), which can overwrite files without asking
you if you're certain. Make sure, when you use the force option, that you really want to
overwrite a file.
Now that we have the file sneakers.txt in the tigger directory, let's use cp -i to copy
the file again to the same location.
[newuser@localhost newuser]$ cp -i sneakers.txt tigger
cp: overwrite 'tigger/sneakers.txt'?
To overwrite the file that's already there, press [Y] and then [Enter]. Don't want to
overwrite the file? Now is the time to press [N] and [Enter].
Moving Files
To move files, use the mv command (man mv), which is similar to the cp command,
except that with mv the file is physically moved from one place to another, instead of
being duplicated, as with cp.
Common options available with mv include:
• -i -- interactive. Will prompt you if the file you've selected will overwrite an
existing file in the destination directory. This is a good option, because like
the -i option in cp, you'll be given the chance to make sure you want to replace
an existing file.
• -f --force. Overrides the interactive mode and moves without prompting.
Unless you know what you're doing, this option doesn't play nice; be very
careful about using it until you become more comfortable with your system.
• -v -- verbose. Shows a list of the files being moved.
If you want to move a file out of your home directory and into another directory, you
would type:
mv sneakers.txt tigger
You can also remove more than one file in one command, as in:
rm piglet.txt sneakers.txt
And if you want to combine options, such as forcing a recursive deletion, you can
type:
rm -rf tigger
Tip
To view all ls command options, read the man page by entering man ls at a shell
prompt. To print the man page, enter man ls | col -b | lpr at the prompt.
Enter the command ls -a. Now you an view the hidden "dot" files.
Viewing all the files using the ls -a command can give you plenty of detail, but you can
view still more information by using multiple options.
To see the size of a file or directory, when it was created, and so on, add the long option
(-l) to the ls -a command. This command shows the file creation date, its size,
ownership, permissions, and more.
You do not have to be in the directory whose contents you want to view to use
the ls command. For example, to see what is in the /etc/ directory from your home
directory, type:
ls -al /etc
Note
You can only move files to a directory that already exists: Linux will not create a
new directory with the mv command.
Tip
The interactive, or -i, option for rm causes it to ask if you are sure before
permanently deleting a file or directory. You can make this the default behavior
for rm by editing the .bashrc file. This file is located in your home directory. You
can edit the file with any text editor.
gedit /home/user/.bashrc
Add the following line somewhere in the file. The end of the file is a good
location.
alias rm='rm -i'
Save the file. At the command line, enter the following command.
source .baschrc
Now you will be asked to enter [Y] before deleting a file or directory with rm