Operating System-Module-1
Operating System-Module-1
Definition
An operating system is a program that acts as an interface between the user and the
computer hardware and controls the execution of all kinds of programs.
The operating system's job
Your computer's operating system (OS) manages all of
the software and hardware on the computer. Most of the time, there are several
different computer programs running at the same time, and they all need to access
your computer's central processing unit (CPU), memory, and storage. The
operating system coordinates all of this to make sure each program gets what it needs.
5. I/O System Management: One of the main objects of any OS is to hide the
peculiarities of that hardware devices from the user.
10. Job accounting: Keeping track of time & resource used by various job
and users.
11. Communication management: Coordination and assignment of
compilers, interpreters, and another software resource of the various users of
the computer systems.
When an OS is loaded into memory, the kernel is loaded first and remains in
memory until the OS is shut down. After that, the kernel provides and manages the
computer resources and allows other programs to run and use these resources. The
kernel also sets up the memory address space for applications, loads the files with
application code into memory, and sets up the execution stack for programs.
Input-Output management
Memory Management
Process Management for application execution.
Device Management
System calls control
Earlier, all the basic system services like process and memory management,
interrupt handling, etc., were packaged into a single module in the kernel space.
This type of kernel was called the Monolithic Kernel. The problem with this
approach was that the whole kernel had to be recompiled for even a small change.
Types of Kernels
There are many types of kernels that exists, but among them, the two most popular
kernels are:
1. Monolithic
A monolithic kernel is a single code or block of the program. It provides all the
required services offered by the operating system. It is a simplistic design which
creates a distinct communication layer between the hardware and software.
2. Microkernels
Microkernel manages all system resources. In this type of kernel, services are
implemented in different address space. The user services are stored in user address
space, and kernel services are stored under kernel address space. So, it helps to reduce
the size of both the kernel and operating system.
The operating system acts as the manager of these resources and allocates them to
specific programs and users as necessary for their tasks. Therefore we can say an
operating system is a resource allocator. This is the main features of an operating
system.
When a number of computers connected through a network more than one computers
trying for a computer print or a common resource, then the operating system follow
same order and manage the resources in an efficient manner.
Generally, resources sharing in two ways "in time" and "in space". When a resource is
a time-sharing resource, first one of the tasks get the resource for some time, then
another and so on.
For example, a CPU in the time-sharing system. In the time-sharing system, OS fixes
the time slot for the CPU. First one of the processes gets the CPU, when the time slot
expires, the CPU switch to the next process in the ready queue. In this example, the
CPU is a time resource. CPU Scheduling in Operating System
The other kind of sharing is the "space sharing". In this method, the users share the
space of resource. For example, the main memory consisting of several processes at a
time, so the process of sharing the resources.
The main difference between "in time" sharing resources and "in space" sharing
resources is "in time" resources are not divided into units, whereas "in space" sharing
resources are divided into units.
Memory Management
Memory management refers to management of Primary Memory or Main Memory.
Main memory is a large array of words or bytes where each word or byte has its own
address.
Main memory provides a fast storage that can be accessed directly by the CPU. For a
program to be executed, it must in the main memory. An Operating System does the
following activities for memory management −
Keeps tracks of primary memory, i.e., what part of it are in use by whom, what
part are not in use.
In multiprogramming, the OS decides which process will get memory when
and how much.
Allocates the memory when a process requests it to do so.
De-allocates the memory when a process no longer needs it or has been
terminated.
Processor Management
In multiprogramming environment, the OS decides which process gets the processor
when and for how much time. This function is called process scheduling. An
Operating System does the following activities for processor management −
Keeps tracks of processor and status of process. The program responsible for
this task is known as traffic controller.
Allocates the processor (CPU) to a process.
De-allocates processor when a process is no longer required.
Device Management
An Operating System manages device communication via their respective drivers. It
does the following activities for device management −
Keeps tracks of all devices. Program responsible for this task is known as
the I/O controller.
Decides which process gets the device when and for how much time.
Allocates the device in the efficient way.
De-allocates devices.
File Management
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions.
An Operating System does the following activities for file management −
Keeps track of information, location, uses, status etc. The collective facilities
are often known as file system.
Decides who gets the resources.
Allocates the resources.
De-allocates the resources.
Windows is Microsoft's flagship operating system, the de facto standard for home
and business computers. Introduced in 1985, the GUI-based OS has been released
in many versions since then. The user-friendly Windows 95 was largely
responsible for the rapid development of personal computing.
Mac OS is the operating system for Apple's Macintosh line of PCs and
workstations.
Linux is a Unix-like operating system that was designed to provide PC users a free
or low-cost alternative. Linux has a reputation as an efficient and fast-performing
system.
The operating system is responsible for handling many different tasks and is typically
one of the most important programs used on a computer. It manages memory usage
and other resources, hardware connectivity and the proper execution of other
applications. A single task operating system can only run one program or application
at a time. So it is not as useful for a computer or other device intended to run multiple
programs at once.
Even though this type of operating system can connect to other computers through a
network, it is still only being used by a single user. As long as the computer only has
one monitor, keyboard and other input devices, then it is a single-user system.
In the Single-User Single-Tasking operating system, only one user is permitted for
performing a single task at a time. Some functions such as printing a document and
downloading images and videos are performed in one given frame. This operating
system is designed especially for wireless phones as well as two-way messaging
devices. For example, MS-DOS, Palm OS, etc. It has the following advantages:
o Time-saving.
o High productivity in less time frame.
o Less memory is used for performing multiple tasks.
These systems are also known are single application OS as one application is
concentrated at a time. These systems require fewer resources and can do processing
in a queue. The recurring tasks are performed well in these systems, such as making
payroll or employees' salaries.
o Supports one user at a time: In these systems, one user is only active at a
time. So there will be no other user interfering with the applications. And in
these systems, all computer resources are used by user requests.
o Easy to maintain: These systems use fewer resources, and their complexity is
less, making them easy to maintain and debug. Higher resources are needed in
a multi-user operating system, and resources are used most of the time.
o Less chance to damage: These systems include fewer requests to hardware
and software at a time, so they have less chance to damage. These systems do
not make higher load time also.
o Concentrate on one task: In a modern operating system, there are running
multiple tasks at a time. Like many applications and tasks are running
simultaneously, but in single-user OS, only one task runs at a time. So these
systems sometimes give less output result at a time.
o Tasks take longer to complete: As you know, many tasks are waiting for the
CPU if no multiple tasks run at a time. So these systems respond to processes at
a higher time. This will make the system slow, and response time is higher.
o Idle time is higher: If only one task is running and this task doesn't require
memory or I/O use, these devices remain idle. But other tasks need those
devices. So only one task is run at a time, then other tasks have to wait till the
first task is finished. So CPU, memory and disk I/O are not used properly.
Bootloader The bootloader loads all the The bootloader distributes the resources
resources of the CPU in the profile of the CPU based on the priority of the
of a single superuser. users.
Super User A superuser gets all the powers of Superuser does not exist for a multi-user
maintaining the system and making operating system as each entity has
changes to ensure the system runs control over their working.
smoothly.
Performance Only one task at one time gets Schedules different tasks for
performed. performance at any rate.
Example MS-DOS, Windows 95, Windows Mainframes, IBM AS400, Linux & Unix
NT, Windows 2000, Personal Distributed OS, etc.
Computers, etc.
In the early 1950s, General Motors Research Laboratories (GMRL) introduced the
first Single-Stream batch processing systems. It only executed one job at a time, and
data was sent in batches or groups. The batch operating system eliminates the setup
time issue.
Batch processing was very popular in the 1970s. The jobs were executed in batches.
People used to have a single computer known as a mainframe. Users using batch
operating systems do not interact directly with the computer. Each user prepares their
job using an offline device like a punch card and submitting it to the computer
operator. Jobs with similar requirements are grouped and executed as a group to speed
up processing. Once the programmers have left their programs with the operator, they
sort the programs with similar needs into batches.
The batch operating system grouped jobs that perform similar functions. These job
groups are treated as a batch and executed simultaneously. A computer system with
this operating system performs the following batch processing activities:
1. A job is a single unit that consists of a preset sequence of commands, data, and
programs.
2. Processing takes place in the order in which they are received, i.e., first come,
first serve.
3. These jobs are stored in memory and executed without the need for manual
information.
4. When a job is successfully run, the operating system releases its memory.
There are mainly two types of the batch operating system. These are as follows:
Its main role was to transfer control from one job to another. Jobs with similar
requirements were pooled together and processed through the processor to improve
processing speed. The operators were used in the program to create batches with
similar needs. The computer runs the batches one by one when they became available.
This system typically reads a sequence of jobs, each with its control cads and
predefined job tasks.
In the multi-programmed batched system, jobs are grouped so that the CPU only
executes one job at a time to improve CPU utilization. The operating system
maintains various jobs in memory at a time. The operating system selects one job and
begins executing it in memory. Finally, the job must wait for a task to complete, such
as mounting a tape on an I/O operation. In a multiprogramming system, do not sit idle
because the operating system switches to another task. When a job is in the wait state,
and the current job is completed, the CPU is returned.
1. In this case, the CPU executes the jobs in the same sequence that they are sent
to it by the operator, which implies that the task sent to the CPU first will be
executed first. It's also known as the 'first come, first serve'
2. The word job refers to the command or instruction that the user and the
program should perform.
3. A batch operating system runs a set of user-supplied instructions composed of
distinct instructions and programs with several similarities.
4. When a task is successfully executed, the OS releases the memory space held
by that job.
5. The user does not interface directly with the operating system in a batch
operating system; rather, all instructions are sent to the operator.
6. The operator evaluates the user's instructions and creates a set of instructions
having similar properties.
Advantages
There are various advantages of the Batch Operating System. Some of them are as
follows:
1. It isn't easy to forecast how long it will take to complete a job; only batch
system processors know how long it will take to finish the job in line.
2. This system can easily manage large jobs again and again.
3. The batch process can be divided into several stages to increase processing
speed.
4. When a process is finished, the next job from the job spool is run without any
user interaction.
5. CPU utilization gets improved.
Disadvantages
There are various disadvantages of the Batch Operating System. Some of them are as
follows:
1. When a job fails once, it must be scheduled to be completed, and it may take a
long time to complete the task.
2. Computer operators must have full knowledge of batch systems.
3. The batch system is quite difficult to debug.
4. The computer system and the user have no direct interaction.
5. If a job enters an infinite loop, other jobs must wait for an unknown period of
time.
There are various advantages of the multiprogramming operating system. Some of the
advantages are as follows:
Disadvantages
There are various disadvantages of the multiprogramming operating system. Some of
the disadvantages are as follows:
Multiple CPUs are interconnected so that a job can be divided among them for faster
execution. When a job finishes, results from all CPUs are collected and compiled to
give the final output. Jobs needed to share main memory and they may also share
other system resources among themselves. Multiple CPUs can also be used to run
multiple jobs simultaneously.
For Example: UNIX Operating system is one of the most widely used
multiprocessing systems.
In the above figure, the asymmetric processing system shows that CPU n1 acts as a
supervisor whose function controls other following processors.
In this type of system, each processor is assigned a specific task, and there is a
designated master processor that controls the activities of other processors.
For example, we have a math co-processor that can handle mathematical jobs better
than the main CPU. Similarly, we have an MMX processor that is built to handle
multimedia-related jobs. Similarly, we have a graphics processor to handle the
graphics-related job better than the main processor. When a user submits a new job,
the OS has to decide which processor can perform it better, and then that processor is
assigned that newly arrived job. This processor acts as the master and controls the
system. All other processors look for masters for instructions or have predefined tasks.
It is the responsibility of the master to allocate work to other processors.
There are various components of a multi-user operating system. Some of them are as
follows:
Memory
The physical memory present inside the system is where storage occurs. It is also
known as Random Access Memory (RAM). The system may rectify the data that is
present in the main memory. So, every executed program should be copied from
physical storage like a hard disk. Main memory is determined as an important part of
OS because it specifies how many programs may be executed simultaneously.
Kernel
A multi-user operating system makes use of the Kernel component, which is built in a
low-level language. This component is embedded in the computer system's main
memory and may interact directly with the system's H/W.
Processor
The CPU (Central Processing Unit) of the computer is sometimes known as the
computer's brain. In large machines, the CPU would necessitate more ICS. On smaller
computers, the CPU is mapped in a single chip known as a microprocessor.
User Interface
The user interface is the way of interaction between users and all software and
hardware processes. It enables the users to interact with the computer system in a
simple manner.
Device Handler
Each input and output device needs its device handler. The device handler's primary
goal is to provide all requests from the whole device request queue pool. The device
handler operates in continuous cycle mode, first discarding the I/O request block from
the queue side.
Spooler
Spooler stands for 'Simultaneous Peripheral Output on Line'. The Spooler runs all
computer processes and outputs the results at the same time. Spooling is used by a
variety of output devices, including printers.
Several devices, like printers, fax machines, plotters, and hard drives, can be shared in
a multi-user operating system. Users can share their own documents using this
functionality. All users are given a small slice of CPU time under this system.
Multi-Tasking
Multi-user operating systems may execute several tasks simultaneously, and several
programs may also execute at the same time.
Background Processing
Background processing is a term that refers to when commands are not processed but
rather executed "in the background". Usually, other programs interact with the system
in real-time.
Time-Sharing
System
Invisibility
Various functions of the multi-user operating system are hidden from users. It is due
to factors such as the OS being instinctive or happening at the lower end, such as disk
formatting, etc.
There are various examples of multi-user operating systems. Some of them are as
follows:
Unix
A highly dependable open system architecture for small and medium-scale business
computing systems. Because it is based on Open System Architecture, tech giants
including AIX, Solaris, and even Mac OS have their own version of Unix. For
example, the Hospitality industry, Healthcare, etc.
IBM develops an operating system for use on mainframe systems. It's commonly
utilized in enterprise computing, where high-intensity I/O is required. For example,
Banking, Insurance, Aviation business, etc.
Shared Computing
A multi-user OS is a software that operates the servers that support most webmail
apps. A typical webmail application may require the utilization of hundreds of
computers. Each one runs a multi-user operating system capable of supporting various
users at the same time. Because these systems have millions, if not billions, of users
who constantly log on to check their messages, they require operating systems that
can handle a high number of users at once.
Advantages
1. Virus attacks occur simultaneously on all of them as the computers are shared.
As a result, if one machine is affected, the others will be as well.
2. If a virus hits one computer, it spreads to the entire network system
simultaneously, and finally, all computer systems fail.
3. All computer information is shared publicly, and your personal information is
accessible to everyone on the network.
4. Multiple accounts on a single computer may not be suitable for all users. Thus,
it is better to have multiple PCs for each user.
Desktop operating systems use preemptive multitasking. Unix used this form of
multitasking from the beginning. Windows starting using preemptive multitasking with
Windows NT and Windows 95. Macintosh gained preemptive multitasking with OS X.
This type of operating system programs to tell them it’s time to give another program
a turn with the CPU.
Multitasking Operating System Benefits:
In Multitasking Operating System, memory, hard drive, and virtual memory are better
managed. Processor time is also well used as the wait time is less.
Suppose any user is downloading any file from the internet. Now he can do other tasks
on the computer without waiting for the file to download completely.
One process cannot change data of another process in the main memory. Each process
can only use his own space allocated.
If any program generates errors then other programs running on the computer are not
affected by it. For example, if Google chrome crashes then your data in MS Word is
not affected.
CMT can handle multiple users at a time. Every user can run their own programs
independently of other users.
Advantages
Various advantages of multitasking are as follows:
This operating system is more suited to supporting multiple users simultaneously, and
multiple apps can run smoothly without interfering with system performance.
Virtual Memory
Good Reliability
Multitasking operating systems give more flexibility to several users, and they are
happier as a result. On which each user can execute single or multiple programs
simultaneously.
Secured Memory
Time Shareable
All tasks are allotted a specified amount of time so that they do not have to wait for
the CPU.
Background Processing
A multitasking operating system may manage various computer resources like I/O
devices, RAM, hard disk, CPU, and others.
Users can run many programs simultaneously, like an internet browser, games, MS
Excel, PowerPoint, and other utilities.
Disadvantages
Various disadvantages of multitasking are as follows:
Processor Boundation
The system may run programs slowly because of the poor speed of their processors,
and their reaction time might rise when processing many programs. To solve this
problem, more processing power is required.
Memory Boundation
The computer's performance may get slow performance due to the multiple programs
run at the same time because the main memory gets overloaded while loading
multiple programs. Because the CPU is unable to provide different times for each
program, reaction time increases. The primary cause of this issue is that it makes use
of low-capacity RAM. As a result, the RAM capacity can be raised to provide a
solution.
CPU Heat Up
The multiple processors are busier at the same time to complete any task in a
multitasking environment, so the CPU generates more heat.
Advantages of Thread
Threads minimize the context switching time.
Use of threads provides concurrency within a process.
Efficient communication.
It is more economical to create and context switch threads.
Threads allow utilization of multiprocessor architectures to a greater scale and
efficiency.
Types of Thread
Threads are implemented in following two ways −
User Level Threads − User managed threads.
Kernel Level Threads − Operating System managed threads acting on kernel,
an operating system core.
Advantages
Kernel can simultaneously schedule multiple threads from the same process on
multiple processes.
If one thread in a process is blocked, the Kernel can schedule another thread of
the same process.
Kernel routines themselves can be multithreaded.
Disadvantages
Kernel threads are generally slower to create and manage than the user threads.
Transfer of control from one thread to another within the same process requires
a mode switch to the Kernel.
Multithreading Models
Some operating system provide a combined user level thread and Kernel level thread
facility. Solaris is a good example of this combined approach. In a combined system,
multiple threads within the same application can run in parallel on multiple
processors and a blocking system call need not block the entire process.
Multithreading models are three types
For Example,
Let's take an example of airbags provided by carmakers along with a handle in the
driver's seat. When the driver applies brakes at a particular instance, the airbags grow
and prevent the driver's head from hitting the handle. Had there been some delay even
of milliseconds, then it would have resulted in an accident.
o Easy to layout, develop and execute real-time applications under the real-time
operating system.
o The real-time working structures are extra compact, so those structures require
much less memory space.
o In a Real-time operating system, the maximum utilization of devices and
systems.
o Focus on running applications and less importance to applications that are in
the queue.
o Since the size of programs is small, RTOS can also be embedded systems like
in transport and others.
o These types of systems are error-free.
o Memory allocation is best managed in these types of systems.
o Real-time operating systems have complicated layout principles and are very
costly to develop.
o Real-time operating systems are very complex and can consume critical CPU
cycles.
Difference between in GPOS and RTOS
Here are important differences between GPOS and RTOS:
application.
round-robin scheduling.
the system.
be preempted. preempted.
The time sharing system provides the direct access to a large number of users where
CPU time is divided among all the users on scheduled basis. The OS allocates a set
of time to each user. When this time is expired, it passes control to the next user on
the system. The time allowed is extremely small and the users are given the
impression that they each have their own CPU and they are the sole owner of the
CPU. This short period of time during that a user gets attention of the CPU; is known
as a time slice or a quantum.
The concept of time sharing system is shown in figure.
In above figure the user 5 is active but user 1, user 2, user 3, and user 4 are in waiting
state whereas user 6 is in ready status.
As soon as the time slice of user 5 is completed, the control moves on to the next
ready user i.e. user 6. In this state user 2, user 3, user 4, and user 5 are in waiting
state and user 1 is in ready state. The process continues in the same way and so on.
The time-shared systems are more complex than the multi-programming systems. In
time-shared systems multiple processes are managed simultaneously which requires
an adequate management of main memory so that the processes can be swapped in or
swapped out within a short time.
Time-sharing is a technique which enables many people, located at various terminals,
to use a particular computer system at the same time. Time-sharing or multitasking is
a logical extension of multiprogramming. Processor's time which is shared among
multiple users simultaneously is termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of multiprogrammed batch systems, the objective is to
maximize processor use, whereas in Time-Sharing Systems, the objective is to
minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches
occur so frequently. Thus, the user can receive an immediate response. For example,
in a transaction processing, the processor executes each user program in a short burst
or quantum of computation. That is, if n users are present, then each user can get a
time quantum. When the user submits the command, the response time is in few
seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each
user with a small portion of a time. Computer systems that were designed primarily
as batch systems have been modified to time-sharing systems.
Advantages of Timesharing operating systems are as follows −
Problem of reliability.
Question of security and integrity of user programs and data.
Problem of data communication.
Network operating system
Unlike operating systems, such as Windows, that are designed for single users to
control one computer, network operating systems (NOS) coordinate the activities of
multiple computers across a network. The network operating system acts as a director
to keep the network running smoothly.
Did you Know? The first network operating system was Novell NetWare, released
in 1983. After Netware, other network operating systems were released, including
Banyan VINES and Microsoft Windows NT. Some examples of other network
operating systems include Windows 2000, Microsoft Windows XP, Sun Solaris,
and Linux.
There are two basic types of network operating systems, the peer-to-peer NOS and
the client/server NOS:
1. Macintosh OS X
2. Microsoft Windows Server
3. UNIX
4. Linux
consists of numerous computers, nodes, and sites joined together via LAN/WAN
lines. It enables the distribution of full systems on a couple of center processors, and it
supports many real-time products and different users. Distributed operating systems
can share their computing resources and I/O files while providing users with virtual
machine abstraction.
These systems are referred as loosely coupled systems where each processor has its
own local memory and processors communicate with one another through various
communication lines, such as high speed buses or telephone lines. By loosely
coupled systems, we mean that such computers possess no hardware connections at
the CPU – memory bus level, but are connected by external interfaces that run under
the control of software.
11M
225
History of Java
1. Client-Server Systems
2. Peer-to-Peer Systems
3. Middleware
4. Three-tier
5. N-tier
Client-Server System
This type of system requires the client to request a resource, after which the server
gives the requested resource. When a client connects to a server, the server may serve
multiple clients at the same time.
This system allows the interface, and the client then sends its own requests to be
executed as an action. After completing the activity, it sends a back response and
transfers the result to the client.
It provides a file system interface for clients, allowing them to execute actions like file
creation, updating, deletion, and more.
Peer-to-Peer System
The nodes play an important role in this system. The task is evenly distributed among
the nodes. Additionally, these nodes can share data and resources as needed. Once
again, they require a network to connect.
Middleware
Middleware enables the interoperability of all applications running on different
operating systems. Those programs are capable of transferring all data to one other by
using these services.
Three-tier
The information about the client is saved in the intermediate tier rather than in the
client, which simplifies development. This type of architecture is most commonly
used in online applications.
N-tier
When a server or application has to transmit requests to other enterprise services on
the network, n-tier systems are used.
Openness
It means that the system's services are freely displayed through interfaces.
Furthermore, these interfaces only give the service syntax. For example, the type of
function, its return type, parameters, and so on. Interface Definition Languages are
used to create these interfaces (IDL).
Scalability
It refers to the fact that the system's efficiency should not vary as new nodes are added
to the system. Furthermore, the performance of a system with 100 nodes should be the
same as that of a system with 1000 nodes.
Resource Sharing
Its most essential feature is that it allows users to share resources. They can also share
resources in a secure and controlled manner. Printers, files, data, storage, web pages,
etc., are examples of shared resources.
Flexibility
Transparency
It is the most important feature of the distributed operating system. The primary
purpose of a distributed operating system is to hide the fact that resources are shared.
Transparency also implies that the user should be unaware that the resources he is
accessing are shared. Furthermore, the system should be a separate independent unit
for the user.
Heterogeneity
The components of distributed systems may differ and vary in operating systems,
networks, programming languages, computer hardware, and implementations by
different developers.
Fault Tolerance
Fault tolerance is that process in which user may continue their work if the software
or hardware fails.
OSF/1
It's compatible with Unix and was designed by the Open Foundation Software
Company.
Micros
The MICROS operating system ensures a balanced data load while allocating jobs to
all nodes in the system.
DYNIX
Locus
It may be accessed local and remote files at the same time without any location
hindrance.
Mach
There are various applications of the distributed operating system. Some of them are
as follows:
Network Applications
Telecommunication Networks
DOS is useful in phones and cellular networks. A DOS can be found in networks like
the Internet, wireless sensor networks, and routing algorithms.
Parallel Computation
DOS is the basis of systematic computing, which includes cluster computing and grid
computing, and a variety of volunteer computing projects.
The real-time process control system operates with a deadline, and such examples
include aircraft control systems.
Advantages
There are various advantages of the distributed operating system. Some of them are as
follow:
1. It may share all resources (CPU, disk, network interface, nodes, computers, and
so on) from one site to another, increasing data availability across the entire
system.
2. It reduces the probability of data corruption because all data is replicated across
all sites; if one site fails, the user can access data from another operational site.
3. The entire system operates independently of one another, and as a result, if one
site crashes, the entire system does not halt.
4. It increases the speed of data exchange from one site to another site.
5. It is an open system since it may be accessed from both local and remote
locations.
6. It helps in the reduction of data processing time.
7. Most distributed systems are made up of several nodes that interact to make
them fault-tolerant. If a single machine fails, the system remains operational.
Disadvantages
There are various disadvantages of the distributed operating system. Some of them are
as follows:
1. The system must decide which jobs must be executed when they must be
executed, and where they must be executed. A scheduler has limitations, which
can lead to underutilized hardware and unpredictable runtimes.
2. It is hard to implement adequate security in DOS since the nodes and
connections must be secured.
3. The database connected to a DOS is relatively complicated and hard to manage
in contrast to a single-user system.
4. The underlying software is extremely complex and is not understood very well
compared to other systems.
5. The more widely distributed a system is, the more communication latency can
be expected. As a result, teams and developers must choose between
availability, consistency, and latency.
6. These systems aren't widely available because they're thought to be too
expensive.
7. Gathering, processing, presenting, and monitoring hardware use metrics for big
clusters can be a real issue.
Google takes a different approach with Android, which is open source. This means
that mobile device OEMs (original equipment manufacturers) can customize the
Android source code and customize it to fit their devices. Android runs on the Linux
kernel.
There are other mobile operating systems available, but their adoption rates are well
below those of iOS and Android. These other operating systems include KaiOS,
Sailfish OS and Huawei's Harmony OS.
KaiOS, based on the discontinued Mozilla Firefox OS, runs mostly on dumb phones --
also known as feature phones. These mobile devices have very limited computing
power, but the latest version of KaiOS can bring more comprehensive feature sets to
these devices such as an app store and the Google Assistant.
Sailfish OS is based on multiple open source projects and runs mostly on smartphones
and tablet computers from Jolla, which developed the operating system, and Sony
mobile devices. Sailfish OS and KaiOS both run on the Linux kernel.
Huawei's Harmony OS, initially released in August 2019, can also run on IoT devices.
Huawei's devices typically run Android operating system, but Harmony OS may
replace Android on these devices in the future. Harmony OS runs on a microkernel
that Huawei developed.
There are numerous mobile operating systems that are no longer commonly
supported. The BlackBerry 10 operating system, which succeeded BlackBerry OS in
2013, has extended support available but for a small install base. Nokia's Symbian
operating system received its last update in 2013 and is no longer supported.
Many mobile OSes offer a native web browser application, which allows users to
search the internet and visit webpages. Mobile operating systems also offer
application stores, which allow users to download and interface with mobile
applications. Several mobile operating systems also have native GPS (global
positioning system) applications that allow users to search for locations, follow step-
by-step directions and, in some cases, share location with different devices. The GPS
feature, of course, relies on the mobile device's hardware and can't run without that
support.
While some native applications come with mobile operating systems such as iOS and
Android, the mobile app stores open up new possibilities for users. In some cases, the
applications add new features and improved user interface (UI) for websites that are
accessible via a web browser, but other applications bring new functionality to the
mobile devices.
Other common mobile operating system features include native email applications
that allow users to link their work and personal email accounts, a calendar application
that users can keep track of tasks, meetings and events, and a contacts library to
organize and search for contact information.
Most mobile operating systems -- other than Android -- are tied to specific hardware
with little flexibility. Users can jailbreak or root devices, however, which allows them
to install another mobile OS or unlock restricted applications.
Program execution
I/O operations
File System manipulation
Communication
Error Detection
Resource Allocation
Protection
Program execution
Operating systems handle many kinds of activities from user
programs to system programs like printer spooler, name servers, file
server, etc. Each of these activities is encapsulated as a process.
I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding
driver software. Drivers hide the peculiarities of specific hardware
devices from the users.
Communication
In case of distributed systems which are a collection of processors
that do not share memory, peripheral devices, or a clock, the
operating system manages communications between all the
processes. Multiple processes communicate with one another
through communication lines in the network.
Error handling
Errors can occur anytime and anywhere. An error may occur in CPU,
in I/O devices or in the memory hardware. Following are the major
activities of an operating system with respect to error handling −
The OS constantly checks for possible errors.
The OS takes an appropriate action to ensure correct and
consistent computing.
Resource Management
In case of multi-user or multi-tasking environment, resources such
as main memory, CPU cycles and files storage are to be allocated to
each user or job. Following are the major activities of an operating
system with respect to resource management −
Protection
Considering a computer system having multiple users and
concurrent execution of multiple processes, the various processes
must be protected from each other's activities.
As can be seen from this diagram, the processes execute normally in the user
mode until a system call interrupts this. Then the system call is executed on a
priority basis in the kernel mode. After the execution of the system call, the
control returns to the user mode and execution of user processes can be
resumed.
Process Control
These system calls deal with processes such as process creation, process
termination etc.
File Management
These system calls are responsible for file manipulation such as creating a file,
reading a file, writing into a file etc.
Device Management
These system calls are responsible for device manipulation such as reading from
device buffers, writing into device buffers etc.
Information Maintenance
These system calls handle information and its transfer between the operating
system and the user program.
Communication
These system calls are useful for interprocess communication. They also deal
with creating and deleting a communication connection.
Some of the examples of all the above types of system calls in Windows and
Unix are given as follows −
There are many different system calls as shown above. Details of some of those
system calls are as follows −
open()
The open() system call is used to provide access to a file in a file system. This
system call allocates resources to the file and provides a handle that the
process uses to refer to the file. A file can be opened by multiple processes at
the same time or be restricted to one process. It all depends on the file
organisation and file system.
read()
The read() system call is used to access data from a file that is stored in the file
system. The file to read can be identified by its file descriptor and it should be
opened using open() before it can be read. In general, the read() system calls
takes three arguments i.e. the file descriptor, buffer which stores read data and
number of bytes to be read from the file.
write()
The write() system calls writes the data from a user buffer into a device such as
a file. This system call is one of the ways to output data from a program. In
general, the write system calls takes three arguments i.e. file descriptor, pointer
to the buffer where data is stored and number of bytes to write from the buffer.
close()
The close() system call is used to terminate access to a file system. Using this
system call means that the file is no longer required by the program and so the
buffers are flushed, the file metadata is updated and the file resources are de-
allocated.
SIMPLE STRUCTURE
It is the most straightforward operating system structure, but it lacks definition
and is only appropriate for usage with tiny and restricted systems. Since the
interfaces and degrees of functionality in this structure are clearly defined,
programs are able to access I/O routines, which may result in unauthorized
access to I/O procedures.
o There are four layers that make up the MS-DOS operating system, and
each has its own set of features.
o These layers include ROM BIOS device drivers, MS-DOS device drivers,
application programs, and system programs.
o The MS-DOS operating system benefits from layering because each
level can be defined independently and, when necessary, can interact
with one another.
o If the system is built in layers, it will be simpler to design, manage, and
update. Because of this, simple structures can be used to build
constrained systems that are less complex.
o When a user program fails, the operating system as whole crashes.
o Because MS-DOS systems have a low level of abstraction, programs
and I/O procedures are visible to end users, giving them the potential
for unwanted access.
o Because there are only a few interfaces and levels, it is simple to develop.
o Because there are fewer layers between the hardware and the applications, it
offers superior performance.
o The entire operating system breaks if just one user program malfunctions.
o Since the layers are interconnected, and in communication with one another,
there is no abstraction or data hiding.
o The operating system's operations are accessible to layers, which can result
in data tampering and system failure.
MONOLITHIC STRUCTURE
The monolithic operating system controls all aspects of the operating
system's operation, including file management, memory management,
device management, and operational operations.
The core of an operating system for computers is called the kernel (OS). All
other System components are provided with fundamental services by the
kernel. The operating system and the hardware use it as their main
interface. When an operating system is built into a single piece of hardware,
such as a keyboard or mouse, the kernel can directly access all of its
resources.
LAYERED STRUCTURE
The OS is separated into layers or levels in this kind of arrangement. Layer 0
(the lowest layer) contains the hardware, and layer 1 (the highest layer)
contains the user interface (layer N). These layers are organized
hierarchically, with the top-level layers making use of the capabilities of the
lower-level ones.
o Work duties are separated since each layer has its own functionality, and
there is some amount of abstraction.
o Debugging is simpler because the lower layers are examined first, followed
by the top layers.
MICRO-KERNEL STRUCTURE
The operating system is created using a micro-kernel framework that strips
the kernel of any unnecessary parts. Systems and user applications are used
to implement these optional kernel components. So, Micro-Kernels is the
name given to these systems that have been developed.
Each Micro-Kernel is created separately and is kept apart from the others. As
a result, the system is now more trustworthy and secure. If one Micro-Kernel
malfunctions, the remaining operating system is unaffected and continues to
function normally.
We can develop a virtual machine for a variety of reasons, all of which are
fundamentally connected to the capacity to share the same underlying
hardware while concurrently supporting various execution environments, i.e.,
various operating systems.
Disk systems are the fundamental problem with the virtual machine
technique. If the actual machine only has three-disc drives but needs to host
seven virtual machines, let's imagine that. It is obvious that it is impossible
to assign a disc drive to every virtual machine because the program that
creates virtual machines would require a sizable amount of disc space in
order to offer virtual memory and spooling. The provision of virtual discs is
the solution.
The result is that users get their own virtual machines. They can then use
any of the operating systems or software programs that are installed on the
machine below. Virtual machine software is concerned with programming
numerous virtual machines simultaneously into a physical machine; it is not
required to take into account any user-support software. With this
configuration, it may be possible to break the challenge of building an
interactive system for several users into two manageable chunks.
o Due to total isolation between each virtual machine and every other
virtual machine, there are no issues with security.
o A virtual machine may offer an architecture for the instruction set that
is different from that of actual computers.
o Simple availability, accessibility, and recovery convenience.