Operating System - Material
Operating System - Material
UNIT-I
INTRODUCTION TO OPERATING SYSTEM
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
2
An OS performs many functions. These are also called “Roles of OS” some
important functions of an OS are
1) Process Management
2) Memory Management
3) Resource Management
4) I/P Management
5) Security and Data Integrity
6) File Management
7) Error handling
8) Command Interpretation
9) Communication
10) Job Scheduling
1.Process management:-
A process is a program under execution. The main objective of process
management is to manage the processes submitted to the computer to
“Minimize” the Ideal time of the processors. This module is responsible for
creation of a process, deletion of a process, scheduling of system
resources, and communication among processer. The major activities of os
with respect to process management are:
2.Memory Management:-
This module takes care of the main memory opt computer. This main
memory provides storage area that can be accessed directly by the CPU. It
indicates that a program to be executed, it must be in main memory. The
major activities of OS for memory management are:
Keep track of which part of memory is currently using by which
program.
It decides which processors are located into memory when memory
is available.
It allocates and deal locates memory based on the requirement.
3.Resource Management:-
The OS is responsible for allocating memory, CPU time and Input/output
Resources to each pro0grame to be executed. While one program is
executing. The os schedules the resources for other programs also. The os
schedules the resources to make the best use of them.
4.I/O Management:-
The OS also manages the I/O of a computer system. So, data flows
among the computers. Terminates, Printers, etc. The application programs
use the os extensively to handles I/O devices based on the requirement.
6.File Management:-
The file management of OS takes care of file related activities. This
module is responsible for organizing, storing, retrieval (Access), naming,
sharing and protection of files. A computer can store files on the
secondary storage to provide long term storage.
E.g.: Magnetic tapes, Magnetic disc, Optical disc.
The major activities of operating system for file, management are
The creation and deletion of files.
The creation and deletion of Directories (folders).
The support of primitives for manipulating files and directories.
The mapping of files on to secondary storage.
The backup of files on permanent storage media.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
4
7.Error Handling:-
An error may cause malfunctioning of computer system. OS constantly
monitors the computer for detecting the error (observation). So, the users
are free from worry of errors.
8.Command Interpretation:-
This module serves as an interface for the uses to communicate with
the computer. There are two main categories of user interface supported
by os. They are:
CLI (Command Line Interface).
GUI (Graphical User Interface).
9.Communication:-
This module is used to provide the communication between the
processors. So, the processors are able to exchange the information. The
user program may be customized to the specifics of the hardware for
communication of processors.
10.Job Scheduling:-
Sometimes multiple jobs may be executed in the computer system.
In this situation, the os decides and maintains the order of jobs to be
executed. Automatic switching from one job to another job can be
maintained by the os. There are some jobs scheduling algorithms to
decide the order.
E.g.:
* FCFS – First come First Serve.
* SJF – Shortest job first.
* Priority.
* Round Robin.
This type of OS is designed to work only one user at a time with the
computer. In this OS, most of the time the CPU will be idle. This single
user os are of 2 types.
o Single user single tasking os.
E.g.: Ms-DOS.
o Single user multi tasking os.
E.g.: Ms-Windows.
b)Multi User OS:-
In
NOTE : this
Time slice is the period of time to execute by the CPU. type
many users can perform multi programming (Multi-Tasking) at a time. So,
the users can share the resources and peripherals very efficiently.
Mainframe computers, Mini computers are widely using the multi user os.
E.g.: UNIX, LINUX, Windows NT, Solaris, Novel.
c)Batch Processing Systems:-
Sometimes, it is required to process more number of jobs as a batch. For
this purpose, Batch processing systems were developed. The CPU executes
one job after another job without wasting the processors time. A job runs
from beginning to the end without any interrupts from the user. A number of
jobs called a batch and all jobs are waiting in a que for execution. Then, the
computer will process the jobs one by one automatically. Batch processing is
using still in appropriaqte3 situations.
E.g.: Payroll Systems, Mailing labor addresses, etc.
d)Online processing OS:-
The online processing is the direct access method. It is also called
Random Access Processing. The online processing system allows
transactions data to be stored and given under CPU control. Different users
can access the computer system from local or remote terminals.
The Operating System must identify the terminal and check the user
authentication (Illegal, without Vermilion) finally, load any program needed
and log Program = Process = Job off the user at the end.
MS – DOS MS - WINDOWS
Ms-Windows is GUI (graphical
Ms-Dos is CUI (character user
user interface) operating
interface) operating system.
system.
The users must have minimum The user need not have any
computer knowledge to work computer knowledge to work
with Ms-Dos. with windows operating system.
It is a 16 bit operating system. It is a 32 bit operating system.
a)Windows XP Embedded:-
This was developed by Microsoft Company. It is based on the Windows
XP professional operating system. This is the most commonly using
embedded operating system for many electronic devices. It provides “Do-
it-yourself” kit for device manufactures.
b)Pocket PC OS:-
It is a specific type of operating system also developed by Microsoft
Company. It is used as Palm operating system on PDA’s. These devices
are mainly used for business and corporate market rather than consumer.
The latest version provides more security to access the from a business
network. It also gives the ability to the system administrators to manage
and control a personal computer or server via wireless network
connections.
c)Symbian:-
It is found in “smart” cell phones from Nokia and Sony ericssion. It
provides the features such as touch screens, games, multimedia functions
and internet connectivity. The symbian operating system also provides the
options to play the games and view the color web sites. With a full browser
in the high speed mobile network.
There are some other embedded operating systems which are currently
using. They are:-
Windows CE.NET.
Palm os.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
9
Windows CE.NET:-
It is a windows embedded product. But it is not based on the windows
desktop products. It was designed especially for embedded devices as a
real-time operating system. It is a small os, but it support wireless
communication, multimedia and web-browsing. It also allows using Ms-
WORD, Ms-EXECL and Ms-OP. For automotive market, there is a separate
version called “WINDOWS AUTOMOTIVE”.
Palm OS:-
The palm operating system is the standard os for palm brand PDA’s and
also other handheld devices. For several years it was the most popular
embedded os for handheld devices. But, nowadays only palm and Sony
companies making PDA’s with palm os. The palm os is continuously using
in other system along with PDA’s such as cell phones, and other small
devices.
Process:-
A process is a program under execution. All programs can be stored
in hard disk. Whenever, a user want to execute any program then, the
operating system allocates the required resources such as memory, CPU
(processor), I/O Devices and others. Now the program is able to execute
only one process at a time. But, it is also possible to execute more
processes at a time by using “multi processor system”.
A process can have many states when it needs to execute. The states of a
process are shown below:-
New Born state.
Ready state.
Running state.
Blocked state.
Terminated state.
A process in the new state will goes to ready state if the operating
system allocates the required resources. If there are more than one
process to be executed then they must be wait in a “ready queue”.
Now, the operating system selects one process and executes it. This
selection is based on job scheduling algorithm.
c) Running state:-
A process will be moved to running state from the ready state. In
this state, the process is going to be executed to produce the results.
d) Blocked state:-
If any required resources are not available in the running state.
Then, the process must wait until the resource is available. This is
called “Blocked State”.
E.g.: Printer is not available.
e) Terminated state:-
The process will be terminated in two possible conditions. They
are:-
Normal Termination:- After successful execution of a process,
it will produces the outputs and terminated. This is called
normal termination.
Abnormal Termination:- Sometimes, the process will be
terminated due to lack of required resources. This is called
abnormal termination.
NOTE:-
The major advantage of process termination is to release
the allocated resources. The process states are shown
below:
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
11
Folder:-
A folder is a container is which we can put all other files. Folder also
contains sub folders. The operating system like windows help us to manage
and store our files systematically in a folder normally, a folder can be
represented by using the following icon.
All the folders look like same but, different titles. It is very easy to create
folders and sub-folders are MS-Windows operating system.
The organization of files and folders is as follows:-
FFOLDER
Documents
Folders and sub folders can keep our files organized in a logical way. A
good folder structure mimics the way we work. There are some tips for good
folder structure management .They are:-
*create a template
*think of folder names as keywords
*Keep folder names as unique.
*Make a chit sheet
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
13
Step 2:- Right click the mouse pointer. It displays many options.
Step 3:- Select security and sharing option. It displays many options.
Unit -II
OVER VFIEW OF POPULAR OPERATING SYSTEM
1.DOS- Disc Operating System
DOS was developed some decades ago. DOS stands for (Disc Operating
System) and Still DOS used for various reasons. IBM Company developed
DOS for the first time and called it as “PC DOS”. DOS was become popular in
1980’s.
Later, Microsoft Company also developed DOS called MS-DOS. This
version of DOS was used on millions of IBM compatible PCs.
Disc operating system also suffered from some weakness.
Eg1: It supports only one user at a time.
Eg2: It could run only one program at a time.
Eg3: It had no built in support for networking.
Even though there are many drawbacks with DOS but, still it is used by
many computers. The reasons are its “size” and “simplicity”. it does not
require more memory and powerful computers. So, it is used as embedded of
for some devices.
DOS used command line interface to the users wants to learn dos
commands to work with it.
DOS provides two types of commands such as;-
Internals commands.
External commands.
2.Windows XP:-
Windows XP operating system was developed by Microsoft Corporation. It
was released on OCT 2001. In this operating system, the desktop has a more
3 dimensional look with rounded corners and more shadings.
Windows XP is also provides brighter colour features. It is available in
different products such as:-
Digital media support.
Advanced networking and communications.
Advanced mobile computing.
Digital media support:-
Windows XP provides windows media players 9 to play videos and audios
for multimedia projects. It is also used as digital broad cast support to the
users.
Advanced networking and communications:-
Windows XP supports universal plug and play. This enables the computers
to find and use the connected hardware without configuring the system or
install drivers. It also makes use of the Internet connection sharing. So, a
single user a can connect multiple computers to the internet by using a
single connection.
Advanced mobile computing:-
Windows XP OS provides a feature called “automatic configuration”. By using
this feature, we can connect XP based mobile devices such as laptop to the
desktop PC. It is also possible to connect our cellular telephones to the
desktop PC by using windows XP OS.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
15
Performance center:-
This is a new look that gives information on their performance characteristics
of a computers. It also provides trouble shoot performance issues.
Backup and restore:-
This feature makes it possible keep our information safe from user errors,
hardware failures and other issues that can last the data .The system restore
feature can reverse system changes.
Network map:-
This feature displays feature connectivity graphically. By observing the
networking map, we can see which connection is working.
Windows ready boast:-
It is a new feature comes with windows VISTA. With this feature, we can use
USB flash as RAM to extend the system memory. It increases the
performance of a system.
Windows media center:-
For a large number of users, the personal computer becomes a source of
entertainment. the users can enjoy by sitting back with a remote control in
the hand. The windows media center provides us to enjoy live and record TV,
Music, Photo, Videos, Online entertainment on a single device.
7.Windows 7:-
This operating system was developed by Microsoft Company. This is the
advanced version of windows XP OS. There are more no of new
enhancements (Additional features) in windows operating system.
Features of windows 7:-
Some important features supported y windows 7 OS are listed below:-
1) User state migration tool
2) Branch cache
3) Direct Access
4) User account control
5) Windows troubles hooting platform
6) App locker
7) Problem steps recorder
Notification center:-
Before IOS file notifications were delivered in a separate window and after
dismissing it could not be visible. In IOS 5, apple introduced notification
center which allows the users to view the history of notification. While
closing, a red, badge appears on the icon. When we open the app, red
badges will be cleared.
Accessibility:-
IOS offers some accessibility features for the users with vision and hearing
disabilities.
Multitasking:-
Multitasking for IOS was first released in JUNE 2010 with IOS 4. Only some
specific devices such as Iphone 4, iphone 3g and ipod touch 3g are able to
multi task.
Switching applications:-
From IOS 4.2 and IOS 6.x double clicking the home button activities the
application pictures a scrollable interface appears from the bottom moving
the contents of the screen up. Now, the users can switch to any application.
Task completion:-
This feature allows apps to continue a certain task after it has been
suspended. Up to IOS 4.0, apps can request for minutes to complete a task in
the back ground. But now, this does not extend to back ground to complete
the task.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
23
UNIT III
FUNCTIONS OF OPERATING SYSTEM
1. MULTI PROCESSING
It is the use of the two or more processors (C.P.Us) within a single
computers system. The multi processor is a within a computer system in
which the resources are shared such as main memory, input and output
devices. Sometimes, this multi processor is also called “tightly coupled
system it states that multiple process can be executed parallel in multi
processing environment there are mainly two types of systems. They are:
This type of tightly coupled multi processor system also called SMP
system (Systematic Multi Processing)
Eg: IBM p690 regatta
Flynn’s taxonomy:-
The multi processor systems are classified by Flynn and they are called
Flynn’s taxonomy of computers. They are:
1. SISD
2. SIMD
3. MISD
4. MIMD
SISD:
SISD stands for “single instructions stream single data stream”.
In this computer, one processor sequentially process instructions. Each
instruction processes one data item.
Eg: RISC Computers
SIMD:
SIMD stands for “Single Instruction Stream Multiple Data
Stream”. In this computer, each instruction performs parallel calculations on
multiple data items. SIMD multiprocessing is well suited for parallel
processing or vector processing. It increases the performance of a computer
in terms of time required to complete a task.
MISD:
It stands for “Multiple Instruction Single Data Steam”. It provides
the advantage of “redundancy”. In this multiple processing, units perform
the same operation on the same data. As it provides “fail safe” feature, the
MISD computers are very expensive.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
25
MIMD:
It stands for “Multiple Instruction Stream, Multiple Data
Stream”. This type of systems is used in parallel execution of multiple
instructions on different sets of data. It is very easy to implement MIMD
multi processing systems.
In these systems, processing is divided in to multiple threads and each
thread has its own hard ware processor stated. One drawback of MIMD
system is issue of deadlock.
2. DATA SAFETY
Data will be stored in the hard disc in a computer system. Most of the
internal parts of a disc are moving to provide the data to the user. So, there
is a high chance of failure of hard disc. Consequently, the data will be lost in
order to overcome this problem, data safety is provides by using RAID
technology.
RAID stands for “Redundant Array of Independent Disc”.
Fault tolerance
Striping the data on to multiple discs.
Migrating the same data to other discs.
Parity to rebuild the data if one disc fails.
Hot space is added to the disc array.
Hot swap.
RAID levels:-
RAID can be classified in to different levels based on its operation. Some
of the most commonly used RAID levels are:
1) RAID 0
2) RAID 1
3) RAID 5
4) RAID 6
5) RAID 10
RAID 0:-
This type of RAID technology is useful when “performance of a
computer is the main factor”. RAID level 0 does not provide any type of
redundancy. So, even if one disc drive fails, our data is at risk.
RAID level o does not provide mirroring and parity. It is shown below :
Chunk 1
Chunk3
Chunk6
chunk 8
Chunk 4
Chunk 2
Chunk 5
Chunk 7
Disc 1 Disc 2
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
26
RAID level 1:
In this RAID level, all data in the drive is duplicated to another drive. It
is very useful where “fault tolerance” is the main factor. The minimum
number of discs is 2 and the maximum no of discs are 32. In this RAID level,
Disc2 does not support for striping and parity. It is shown below:-
Chunk 1 Chunk 1
Chunk 3 Chunk 3
Chunk 6
Chunk 6
Chunk 8 6
Chunk 8 1
3
8
Disc 1 Disc 3
Disc 2
RAID level 5:
It supports “striping“. So, the data is spread across number of discs
used in the array. It also provides clarity for data redundancy.
RAID level 5 is the best cost effective solution for both performance
and redundancy. Striping method always improves the performance and
parity method provides redundancy. RAID level 5 required minimum 3 discs
and maximum 32 discs based on its controller. Data reading rate is much
better than writing rate in RAID level 5.
RAID level 6:
It is very similar to RAID level 5 but one more advantage is included.
The added advantage is that it provides “double parity” to achieve more
redundancy even if two discs will be failed at one time, the data can be
created again.
3. DATA SECURITY
Security problem:
Sometimes the data can be damaged by violating the rules. It is also
possible to steal the information intentionally by unauthorized people. Some
of the most types of violations are
Breach of confidentiality
Breach of integrity
Breach of availability
Theft of service
Denial of service
Sometimes, the information may be theft by some attacks. The most
common attacks are:
Managing in which the attacker guessed to be a third
party.
Reply attack in which repeating a valid transmission.
In order to predicting the attacks from the above situations we have to
provide the security to the systems at 4 levels. They are:
1) Physical level data of security
2) Human level security
3) Operating system level security
4) Network level security
There are some common threats to the modern systems including the
following:
1) Trojan horse
2) Trapdoor
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
28
3) Logic bomb
4) Stack over flow & buffer overflow
5) Viruses
Trojan horse:
It is a programme that securely performs some malicious operations.
Some Trojan horse programs are more dangerous when we open them.
Eg : * long search parts
*login emulator
The solutions for Trojan horse programs are:
Print out the statistics on log outs
Press ctrl+Alt+Del to login
Trap door:
A trap door is a programme which can be inserted as a security hole in
the system. Later it will access the system. So, this operation can be
performed by hackers. Even backup tapes also contain a copy of cleverly
hidden trap doors.
Logic bomb:
The logic bomb is a programme code which damages data. It was
designed to damage the data but sometimes the data will be lost due to
some events.
Eg;- dead man switch.
This logic bomb was designed to check every day login detail of a
person. If any person don’t login for a long time, then the logic bomb will be
a switched of and opened a security hole and causes other problems.
Viruses:
It is a program embedded in another programme. It will be distributed
and input other programs in the computer system. Viruses are more likely
infect the entire system than OS. The viruses are delivered to the system in
a virus dropper programme. The common ways to send the Viruses are via
e-mail and unsafe downloads.
Viruses will be distributed in many forms. Some of them are:
Macro
Source code
Encrypted
Boot
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
29
Domains:
A domain is different from work group. In a domain, all the computers
are based on centralized authentications. The properties of a domain also
differ from works groups. The computers in the office and corporate networks
are on domains. The common properties of a domain are:
Some top level domains were created in the development of internet. Later,
sub domains also created.
5. ACTIVE DIRECTORY
It is a service developed by Micro Soft Company for windows domain
network. Now, it is included in many windows server OS.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
30
Certificate services:
“Active Directory Services Certificate” works on private/public key
information. It can create, validate and revoke public key certificates for
internal use of the origination.
These certificates can be used to encrypt files, emails and network
traffic. The ADCS require ADDS infrastructure.
Federation services:
Active directory federation services are abbreviated as ADFS. It is a
single “sign on” service. With this service, users may use several web
based services or network services. Its purpose is to extend the ADDS. The
federation services were based on the concept of “federation identity”.
6. LOAD BALANCING
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
31
Multi-programming level
The above diagram shows that when multi programming level increases,
automatically processor utilization reduces. This is due to there is a less
chance to block all the resident processors.
When average resident processors Insufficient, the no of page faults rise
dramatically and processor utilization will be collapsed.
The solution for multi programming level transmitting is available in 5
different manages. They are:-
i. Page fault frequency algorithm.
ii. L=S criterion.
iii. Clock page replacement algorithm.
Page-fault frequency algorithm:
This algorithm is also called as “working set algorithm”. It states that
only the process whose resident set is sufficiently large are allowed to
execute. This policy dynamically determines the no of active programs to
provide the sufficient resident set for each process.
L =S criterion:
This process was suggested by Denning. This technique adjusts the
multi programming level so that the “meantime between page faults =
the mean time required to process a page a fault”. In this approach,
the processor utilization well is max.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
32
Process suspension:
The load balancing also can be done by process suspension of the
degree of multi programming. It is to be reduced, one or more the currently
resident processes must be suspended. There are 6 possibilities to suspend a
process. They are:-
* Lowest process.
* Faulting process.
* Lost process.
* Process with smallest set.
* Longest process.
* Process with the largest execution window.
In order to balance the load, the policy chosen based on the design in OS
and characteristics of a program to be executed.
7. DEFRAGMENTATION
The process of reducing the amount of fragmentation is known as
“defragmentation process”, it organizes the files physically the mass storage
devices. It also creates larger regions of free spaces using “compaction”.
Some defragmentation utilities try to spaces using keep the smaller files
within a single directory together.
Defragmentation is very useful and relevant to file systems on
electromagnetic disc drives. The defragmentation is explained in the
following is concerns.
1) Causes of defragmentation.
2) Offline defragmentation.
3) User performs an issue.
4) Defragmentation and optimizing.
Causes of defragmentation:
Defragmentation occurs when a file system can’t allocate enough
contiguous space to store a complete file as a single unit. In this case,
defragmentation is required to allocate sufficient space to store the entire
space. There are 3 options since the space is immediately following and is no
longer available. They are:
1) Move the files when it can be created as contiguous file system
in the disk.
2) Move all the files until opens sufficient space to make it
contagious again.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
33
Offline defragmentation:
The presence of immovable files can lead to defragmentation. These
files can be moved safely when OS is not present.
User and performance issues:
In a wide range of multi user OS, an ordinary user can’t defragment the
small disks. Additionally NTFS file systems are designed to decrease the
livelihood of the system file. In modern systems, hardware such as hard disk,
RAM and cache memory are improved to increase the performance of
defragmentation.
Defragmentation and optimization:
Running most defragment portions and optimizers can increase the Micro
Soft shadow copy services. It is used to delete some of the oldest list of
points. It can be done even the optimizers defragmenters on windows API.
8. FAULT TOLERANCE
The fault tolerance is the ability of the system to deal with mal function. A
fault is system is some deviation from the expected behavior of the system.
The faults will occur due to many factors such as hard ware failures, software
bugs (errors), user and network problems. The faults of a system can be
classified into 3 types they are.
1) Transient faults.
2) Intermittent faults.
3) Permanent faults.
Transient faults:
The transient faults will occur once disappear. Network message does
not reach its destination but, it will reach when it is retransmitted. It is an
example of transient faults.
Intermittent faults:
This type of faults is characterized by a fault occurring and then
vanishing again reoccurring then vanishing this type of faults can be the
most annoying of component faults.
Eg:-loose connection.
Permanent faults:
This permanent fault continues until the faulty component is repaired
and replaced.
Eg:- disk head crashes
Software bugs:
The fault tolerance can be described by the following factors.
1) Approaches to faults.
2) Achieving fault tolerance.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
34
3) Levels of availability.
Approaches to faults:
When we are designing the systems we must try to minimize the
presence of faults. The fault avoidance is a process through design and
validation steps. This process can include formal validation code inspection,
testing and using robust hardware.
It is a type of backup in which the files are backed up without all the
changes. This can occur because the data files are modified. The database
running 24 hours a day 7 days a week, then we have no chance to perform
inconsistent backups of the entire database.
Media recovery:
The recovery that takes up backup and redoes the changes is known as
media recovery. It updates a backup to either the current or a specified clear
time. The possible media recovery techniques are:
Complete recovery.
Incomplete recovery.
Data file recovery.
Block media recovery.
UNIT IV
1. Introduction to Linux
Linux is a UNIX-base operating system. Its original creator was a Finnish
student name “Linus Torvalds”. Although it is being “open source” it has
changed a great deal since its original conception. It is free to download and
use. Any changes to it are open for all to adopt, and as a result it has
developed into a very powerful OS that is rapidly gaining in popularity
worldwide.
In 1991, hardware was expanding rapidly, and DOS was the king of
operating systems. Software development was slower with DOS. Mac OS was
better but much pricier than PCs. UNIX was growing, but expensive to use.
Linus Torvalds was a Helsinki university student who liked playing around
with software and computers. In 1991, he announced the creation of a new
core operating system and named it as Linux. It is now one of the most
useful Operating systems for the PC and suitable for businesses with small IT
budgets. Linux is free to use and install. It is more reliable than almost all
other systems, running for many months and even years without a reboot
being necessary.
2. History of Linux
A brief history of Linux Development:
In 1969, a team of developers of Bell Labs started a project to make
common software for all the computers and named it as 'Unix'. It was simple
and elegant, used 'C' language instead of assembly language and its code
was recyclable. As it was recyclable, a part of its code now commonly called
'kernel'. It was used to develop the operating system and other functions
and could be used on different systems. Also its source code was open
source. Initially, Unix was only found in large organizations like government,
university, or larger financial corporations with mainframes and
minicomputers.
Linux falls under the category of the Layered Architecture OS, consists of
following layers:
Hardware layer
Kernel
Shell/GCC
Application Software
Users
These layers are shown in the following diagram:
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
39
Unix Expansion:
In eighties, many organizations like IBM, HP and other companies
started creating their own Unix. It results in a mess of Unix dialects. Then in
1983, Richard Stallman developed GNU project with the goal to make it
freely available Unix like operating system and to be used by everyone. But
his project failed in gaining popularity. Many other Unix like operating system
came into existence but none of them was able to gain popularity.
Evolution of Linux
In 1991, Linus Torvalds a student at the university of Helsinki, Finland,
thought to have a freely available academic version of Unix started writing
its own code. Later this project became the Linux kernel. He wrote this
program especially for his own PC. He did it on MINIX using GNU C compiler.
GNU C compiler is still the main choice to compile Linux code but other
compilers are also used like Intel C compiler.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
40
He started it just for fun but ended up with such a large project. Firstly
he wanted to name it as 'Freax' but later it became 'Linux'.
He published the Linux kernel under his own license and was restricted to
use as commercially. Linux uses most of its tools from GNU software and are
under GNU copyright. In 1992, he released the kernel under GNU General
Public License.
Linux Today
Today, supercomputers, smart phones, desktop, web servers, tablet,
laptops and home appliances like washing machines, DVD players, routers,
modems, cars, refrigerators, etc use Linux OS.
Cost – The most obvious advantage of using Linux is the fact that it is free to
obtain. Linux distribution can be installed on any number of computers,
without paying any fee.
Security – The security aspect of Linux is much stronger than that of
Windows. The Linux operating system has been available since the early
nineties and has managed to stay secure.
Choice (Freedom) – The power of choice is a great Linux advantage.
With Linux, we have the power to control just about every aspect of the
operating system. Two major features we have control of are our desktops
look and feel by way of numerous Window Managers, and the kernel.
Software – There are so many software choices when it comes to doing any
specific task. Regular users and programmers contribute applications all the
time. Sometimes it is a simple modification or feature enhancement of a
already existing piece of software. Sometimes, it is a brand new application.
In addition, software on Linux tends to be packed with more features and
greater usability than software on Windows. Best of all, the vast majority
of Linux software is free and open source.
Hardware – Linux is perfect for those old computers with barely any
processing power or memory we have sitting in our garage or basement
collecting dust. Install Linux and use it as a firewall, a file server, or a backup
server. There are endless possibilities.
Ex: Old 386 or 486 computers with barely any RAM run Linux without any
issue.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
41
4. Features of Linux
Important features of Linux Operating System
The following are some of the important features of Linux Operating System:
Portable
Open Source
Multi-User
Multiprogramming
Hierarchical File System
Shell
Security
Live CD/USB
Graphical user interface (X Window System):
customized keyboards
Application Support
The above features are described below:
Portable – Portability means software can works on different types of
hardware in the same way. Linux kernel and application programs support
their installation on any kind of hardware platform.
Open Source – Linux source code is freely available and it is community
based development project. Multiple teams can works in collaboration to
enhance the capability of Linux operating system. This Linux OS is
continuously evolving.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
42
5. Linux Distributions
The most popular Linux Distributions are:
Ubuntu
Linux Mint
openSUSE
Mageia
PC Linux OS
Netrunner
LXLE
Bodhi Linux
elementaryOS
Manjaro Linux
Korora
Arch Linux
Fedora
KaOS
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
43
1. Ubuntu
5. Mageia
Mageia is a distribution created from Mandriva Linux by its former
employees in 2010. It uses the RPM package management system and offers
many desktop environments like KDE, GNOME, LXDE, XFCE, Mate, Cinnamon
and RazorQt. They can be installed either from the Mageia DVD or from the
repositories. Current stable version is Mageia 4. Mageia provides helpful tools
for system setup and customization.
This is the best distribution for users who want to try a new Linux
distribution that is user-friendly and supports many Des.
6. PC Linux OS
PC Linux OS, or PCLOS for short, has a reputation of a simple
distribution that supports a lot of hardware out-of-the-box, including some
old devices. It comes in two lightweight flavors – LXDE and Mate. The
standard KDE desktop called FullMonty, is a customized KDE edition with
many pre-installed applications.
This is the best distribution for beginners who want the newest
software, users who don’t want to spend too much time setting up their
system
7. Netrunner
Netrunner is a Linux distribution created in 2010 that comes in two
editions: Standard and Rolling. It is focused on providing the best KDE
experience and comes with many useful applications pre-installed (Firefox,
Skype, Steam, Gimp…).
This is the best distribution for users who want a simple and beautiful
KDE-only distribution.
8. LXLE
LXLE is a new player on the Linux distribution scene, but it is already
collecting praise and satisfied users. It is a lightweight Ubuntu-based
distribution with LXDE as its main desktop environment. The goal of LXLE is
to ensure a seamless transition to users who are switching from OS X or
Windows by providing different desktop layouts that “mimic” the appearance
of other operating systems. It is optimized for old computers and comes in
both 32- and 64-bit versions.
This is the best distribution for users switching from OS X and
Windows, and those who want to revive their old PCs.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
45
9. Bodhi Linux
Bodhi Linux offers only a few basic applications by default, and lets the
users choose what they want to install through the AppCenter. Bodhi uses a
lightweight desktop environment not seen in many other distributions. Bodhi
is based on Ubuntu LTS.
This is the best distribution for old computers, users who just want a
basic set of apps.
10. elementaryOS
ElementaryOS is another Ubuntu-based distribution, and it puts
simplicity, beauty and harmonious design above everything else.
ElementaryOS has its own file manager and its own desktop environment
called Pantheon with core components such as dock (floorboard),
application launcher (Slingshot).
This is the Best distribution for old computers, users who want a Linux
distribution that looks like OS X.
11. Manjaro Linux
Manjaro Linux takes the incredible power of Arch Linux. The default DE
is the lightweight, reliable XFCE, but KDE, GNOME and Cinnamon versions
are also available. Manjaro offers automatic hardware detection and driver
support, use of multiple kernels, and its own repositories with tested
software.
This is the best distribution for users who want the latest software.
12. Korora
Korora is based on Fedora, but provides multimedia codecs and third-
party repositories to make the setup process easier for new users. It comes
in GNOME, KDE, Cinnamon, Mate, and XFCE editions with beautiful icons and
a simple desktop layout. The purpose of Korora is to make Fedora more
appealing to a wider audience by including popular applications like Firefox,
VLC, Google Chrome and Dropbox by default. This is the best distribution
for new users who want to try a user-friendly version of Fedora, experienced
users who want multimedia support out-of-the-box.
13. Arch Linux
Arch Linux is a powerful Linux distribution, but with great power comes great
responsibility. Installation and setup of Arch Linux requires relatively
advanced knowledge. Among the best things about this distribution are the
official forums and wiki where we can get help for any kind of problem we
encounter.
This is the best distribution for advanced users, average users who want to
learn more about Linux, users who prefer a minimalist setup.
14. Fedora
Fedora is often referred to as a “bleeding-edge” distribution. It means that it
is focused on innovation and latest technologies. It comes in three main
editions: Workstation, Server and Cloud. The default DE, is GNOME.
Fedora is an RPM distribution with its own repositories. A particularly
important feature is Security-Enhanced (SE) Linux.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
46
This is the best distribution for advanced users who want to test the latest
software, users who value system security.
15. KaOS
KaOS is a young Linux distribution. The latest stable version from February
2015 brings the newest from KDE – namely, a complete switch to Plasma 5.
Apart from KDE applications, KaOS offers its own software manager called
Octopi and the lightweight QupZilla as the default web browser. KaOS is a
rolling release distribution and it only works on 64-bit systems.
This is the best distribution for average and advanced users who want to test
Plasma 5.
6. Basic Linux Commands
cd – changes directories
Usage: cd [DIRECTORY]
eg. cd prabhat
cp sample_copy.txt target_dir
who b
who q
Archival Commands
Network Commands
ssh – SSH client (remote login program)
“ssh is a program for logging into a remote machine and for
executing commands on a remote machine”
Usage: ssh [options] [user]@hostname
eg. ssh X
[email protected]
Advanced Commands
reboot – reboot the system
Usage: reboot [OPTION]
eg. Reboot
UNIT- V
1. Introduction to Android
Applications
These are the basics of Android applications:
•Android applications are composed of one or more application components
(activities, services, content providers, and broadcast receivers)
•Each component performs a different role in the overall application
behavior, and each one can be activated individually (even by other
applications)
•The manifest file must declare all components in the application and should
also declare all application requirements, such as the minimum version of
Android required and any hardware configurations required
•Non-code application resources (images, strings, layout files, etc.) should
include alternatives for different device configurations (such as different
strings for different languages)
3. History of Android and various versions of Android OS
The word Android is nearly becoming a household name. Android is a
mobile operating system designed to counter the problem of handling
networks and the wireless devices. Various versions of this operating system
have come into the market since its inception in 2008. There were two Pre-
commercial Android release between 2007 and 2008 called
Android Alpha and Beta. Android beta was released on 5 November 2007, a
date popularly celebrated as Android’s “birthday.
Each version of Android since 1.5 has been developed with a specific
codename which are chosen alphabetically, and have thus far all been
dessert items (sweet/sugary foods). Some codenames are associated with
more than one version number, while others are limited to only a specific
one. Here is a brief history of the Android Operating System, version and
features. The versions of Android OS are listed below:
Android 1.0
Android 1.1
Android 1.5 Cupcake
Android 1.6 Donut
Android 2.0/2.1 Éclair
Android 2.2 Froyo
Android 2.3 Gingerbread
Android 3.0 Honeycomb
Android 4.0 IceCream Sandwich
Android 4.1 Jelly Bean
Android 4.4 KitKat
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
54
Android 1.0
This was where the dream began, this was the first commercial version
of Android and it was released in September 2008. It opened up the Android
market and people started recognizing this new operating system. The first
commercially available Android device was the HTC Dream. Gmail
synchronization with the Gmail applications, calendar sync, contacts sync,
Google maps, SMS, MMS, IM support, media player, YouTube player, Wi-Fi and
Bluetooth support. Notifications also appear in the Status bar, with options to
set ringtone.
Android 1.1
Released on 9th February 2009. This Android version didn’t have an
official name but was internally called “Petit Four“ This update didn’t
really bring many new features to the previous version, it only changed the
Android API, resolved bugs and glitches with an improved overall
performance.
Android 1.5 Cupcake
Released 30th April 2009, this was the first version that officially got a
codename based on a dessert item (“Cupcake“). The major features of this
OS included widget support, soft keyboard with text prediction. Cupcake also
delivered video watching and recording capabilities, the uploading of videos
to YouTube and Picasa, Stereo Bluetooth (aka A2DP) support that allows
wireless music streaming to compatible headphones or speakers.
Android 1.6 Donut
Donut brought more major features enhancements the biggest of
which was Google Maps with turn-by-turn navigation and an expanded
gesture framework. searching and ability to view app screenshots in Android
Market got easier and Android Market became a friendly place to shop for
apps. Other added features include , text-to-speech apps and Updated
technology support for CDMA/EVDO (802.1x, VPN)
Android 2.0/2.1 Éclair
Released 26th October 2009, the OS got better enhancements such as
support for multiple accounts, better Google maps navigation, new camera
features, such that allows phones take pictures with flash support, digital
zoom, scene mode, , multiple resolution and screen sizes. It also got a new UI
and a Microsoft Exchange email support, with combined inbox to browse
email from multiple accounts in one page. The 2.1 version came in January
2010 with just an update to the UI and minor adjustments to the API and bug
fix
Android 2.2 Froyo
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
55
Things are broken. Things are unfinished. This is very bleeding edge.
It's also very, very cool.
These design principles were developed by and for the Android User
Experience Team to keep users' best interests in mind. For Android
developers and designers, they continue to underlie the more detailed
design guidelines for different types of devices.
Consider these principles as you apply your own creativity and design
thinking. Deviate with purpose.
The goals of designing Android OS are mainly classified in to three
different categories. They are:
Enchant Me
Simplify My Life
Make Me Amazing
Enchant Me
Get to know me
Learn peoples' preferences over time. Rather than asking them to make
the same choices over and over, place previous choices within easy reach.
Simplify My Life
Keep it brief
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
58
Use short phrases with simple words. People are likely to skip sentences if
they're long.
Make Me Amazing
People feel great when they figure things out for themselves. Make your
app easier to learn by leveraging visual patterns and muscle memory from
other Android apps. For example, the swipe gesture may be a good
navigational shortcut.
Sprinkle encouragement
Break complex tasks into smaller steps that can be easily accomplished.
Give feedback on actions, even if it's just a subtle glow.
Dalvik and the Android run time sit on top of a Linux kernel that
handles low-level hardware interaction including drivers and memory
management, while a set of APIs provides access to all of the under- lying
services, features, and hardware.
Dalvik Virtual Machine Dalvik is a register-based virtual machine that’s
been optimized to ensure that a device can run multiple instances efficiently.
It relies on the Linux kernel for threading and low-level memory
management.
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik virtual machine.
Rather than use a traditional Java virtual machine (VM) such as Java ME (Java
Mobile Edition), Android uses its own custom VM designed to ensure that
multiple instances run efficiently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-
level functionality including security, threading, and process and memory
management.
All Android hardware and system service access is managed using Dalvik as
a middle tier. By using a VM to host application execution, developers have
an abstraction layer that ensures they never have to worry about a particular
hardware implementation.
The Dalvik VM executes Dalvik executable files, a format optimized to
ensure minimal memory foot- print. The .dex executables are created by
transforming Java language compiled classes using the tools supplied within
the SDK.
Understanding Application Priority and Process States
The order in which processes are killed to reclaim resources is
determined by the priority of the hosted applications. An application’s
priority is equal to its highest-priority component.
Where two applications have the same priority, the process that has
been at a lower priority longest will be killed first. Process priority is also
affected by inter-process dependencies; if an application has a dependency
on a Service or Content Provider supplied by a second application, the
secondary application will have
at least as high a priority as the
application it supports.
All Android applications
will remain running and in
memory until the system needs its
resources for other applications.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
61
Active Processes
Active (foreground) processes are those hosting applications with
components currently interacting with the user. These are the processes
Android is trying to keep responsive by reclaiming resources. There are
generally very few of these processes, and they will be killed only as a last
resort.
Active processes include:
Activities in an “active” state; that is, they are in the foreground and
responding to user events. You will explore Activity states in greater
detail later in this chapter.
Activities, Services, or Broadcast Receivers that are currently executing
an on Receive event handler.
Services that are executing an onStart, onCreate, or onDestroy event
handler.
Visible Processes:
Visible Processes visible, but inactive processes are those hosting “visible”
Activities. As the name suggests, visible Activities are visible, but they aren’t
in the foreground or responding to user events. This happens when an
Activity is only partially obscured (by a non-full-screen or transparent
Activity). There are generally very few visible processes, and they’ll only be
killed in extreme circumstances to allow active processes to continue.
Started Service Processes:
Processes hosting Services that have been started. Services support
ongoing processing that should continue without a visible interface. Because
Services don’t interact directly with the user, they receive a slightly lower
priority than visible Activities. They are still considered to be foreground
processes and won’t be killed unless resources are needed for active or
visible processes.
Background Processes
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
62
Processes hosting Activities that aren’t visible and that don’t have any
Services that have been started are considered background processes. There
will generally be a large number of background processes that Android will
kill using a last-seen-first-killed pat- tern to obtain resources for foreground
processes.
Empty Processes
To improve overall system performance, Android often retains
applications in memory after they have reached the end of their lifetimes.
Android maintains this cache to improve the start-up time of applications
when they’re re-launched. These processes are rou- tinely killed as required.
How to use memory efficiently
Android manages opened applications which are running in the
background, so officially you shouldn’t care about that. This means that it
closes the applications when the system needs more memory. However,
most android users are not very satisfied with how it does its things because
sometimes it leaves too many processes running which causes sluggishness’
in everyday performance. We can use advanced task killer/task
managerand it does its job very well.
that, reacting to either a command from a web interface or via text. Popular
remote wipe and lock apps include Cerberus and Avast Mobile Security.
6. Keep all sensitive data behind an extra encryption layer
Keeping sensitive information logged in a generic note on a phone or
tablet is a bad idea. There are plenty of apps that will store information
behind a double wall of password protection and encryption. Top picks
include mSecure and File Hide Expert.
7. Be aware of SMS threats
Premium SMS threats are partly responsible for the surge in Android
malware. The Bad threat, which was brought to light earlier this year, can
send premium rate SMS texts, install other malicious apps and execute other
code. If there is mysterious activity on a phone bill, check it is not down to
this type of attack.
8. Use the Chrome browser
Since Android 4.1 was introduced, phones and tablets have come with
the stock Android browser as well as Chrome installed as standard. Chrome is
marginally more secure than the stock version, having been subject to fewer
publicized insecurities in recent months. It is also likely that Chrome for
Android is being more keenly worked on, its pre-installed status marking it
out as the future default browser for Android.
9. Put a lock on your lock screen
Simple but necessary, anyone with a concern about Android security
should put some lock screen protection on their phone. Virtually all Androids
come with optional security measures pre-installed, accessed in the security
submenu of settings.
10. Stolen phone? Check out Plan B
Many have done it – had a phone lost or stolen just before planning to
buy phone insurance or install a phone tracker. There is one last point of call.
Try to install Plan B to the phone from the Google Play website and, if
successful, it will automatically send the location of the device to the Gmail
account linked to it.
9. Android File and Directory Structure
Most people are familiar with the file layout on Windows and are happy
navigating the Windows file System. Windows uses a drive letter for each
physical drive/partition.
e.g. C: drive
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
67
What you are seeing looks like a list of folders/directories, but all of
them are actually partitions. The file manager doesn’t differentiate between
a partition and a directory. Most of the partitions are not normally visible on
our android tablet.
We will see a folder called sdcard which again is actually a partition.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
68
The sdcard partition is the main storage area for user data and
files. It also contains App settings and data.
The sdcard partition exists even though you may not have an external
sdcard.
It is called as the”internal partition”.
We can also transfer files between our device and a PC using this method.
Android File Associations:
Android will use an App to open a particular file type. Suppose, if we
try to open a pdf file it will normally use Adobe reader to open the file.
To open a file we will normally need to locate the file using a file
manager.
Just press the file to open it.
If the file type doesn’t already have an App associated with it you
should be prompted to choose between the available Apps.
The option to use that App sets it as the default App.
If we set it as the default App you will not be prompted again unless
you remove the association
To remove an association you need to remove it from the App itself.
So if the pdf files open with adobe reader and you want to change that:
1. Go to Settings>Apps>Select Adobe reader,
2. Then go to the Launch by default section
3. and Clear defaults
The next time you try to open a pdf file you will be promoted to choose an
App.
Android File Managers
If you search the Google play store you will find many file managers.
Which App is the most suitable depends on what you want to do. You should
bear in mind that more features/functionality isn’t always better.
File managers like ESF have lots of functionality including:
Built in FTP client
Task Manager
Cloud storage client
etc
However for many this is a bit of an overkill, and so you might consider
installing one of the simpler file managers like file manager and Astro file
manager.
See my tutorial using the Astro file manager.
I B.Com (CA) – II Semester Fundamentals Of Operating Systems
69
File Downloads
When you download a file using Google chrome or another browser App it is
stored in the download directory.
You can access the directory contents through a shortcut in the Apps folder
(if provided).
You can also use a file manager to locate it the folder called download. It is
under your primary storage (called sdcard)