Chapter - 3 - Introduction To Operating Systems

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

Operating System

Concepts

Chapter 3
Introduction to Operating Systems

Reference: OPERATING SYSTEM CONCEPTS NINTH EDITION ABRAHAM SILBERSCHATZ Yale


University PETER BAER GALVIN Pluribus Networks GREG GAGNE Westminster College, Wiley
GENERAL DEFINITION
• An OS is a program which acts as an interface
between computer system users and the computer
hardware. It provides a user-friendly environment in
which a user may easily develop and execute
programs. Otherwise, hardware knowledge would be
mandatory for computer programming. So, it can be
said that an OS hides the complexity of hardware
from uninterested users.
• The OS manages these resources and allocates them
to specific programs and users. With the management
of the OS, a programmer is rid of difficult hardware
considerations.
• Another aspect for the usage of OS is that; it is used
as a predefined library for hardware - software
interaction and this is why, system programs apply to
the installed OS since they cannot reach hardware
directly.
• With the advantage of easier programming provided
by the OS, the hardware, its machine language and
the OS constitutes a new combination called as a
virtual (extended) machine.
DIFFERENT TYPES OF OPERATING SYSTEMS
• Windows
Windows is a commercial OS that uses windows to execute programs: each
program has its own window, and you can have several programs open at the same
time. Windows is the most popular OS for home PCs, and there are several versions of
it. The newest version is Windows 10.

• Linux and Unix


Linux is an open-source OS, which means that its program code is freely available
to program developers.

• Mac OS X
Apple’s Mac computers have their own operating system, OS X. Most of the same
programs are available for computers that use OS X as for PCs.

• Android
Android is an operating system designed for phones and other mobile devices.
Android is not available for desktop computers, but in mobile devices, it is an
extremely popular operating system: more than a half of all mobile devices in the
world run on Android.
USER INTERFACES
• A user interface (UI) is the part of an operating system, program or device that the
user uses to input and receive data.
• The text user interface (TUI, see the image to the left below) shows text, and its
commands are usually written from the keyboard to the command line.
• The graphical user interfaces (GUI, right-hand image below) are carried out by
clicking and moving buttons, icons and menus with the mouse.
• The Batch interface (BI): commands and directives to control those commands are
entered into files and those files are executed

NETWORK OPERATING SYSTEMS


• Use of the networks required OSs appropriate for them. In network systems, each
process runs in its own machine. The OS can access to other machines. By this way,
file sharing, messaging, etc. became possible.

DISTRIBUTED OPERATING SYSTEMS


• Distributed systems are similar to networks. However in such systems, there is no
need to exchange information explicitly, it is handled by the OS itself whenever
necessary.
OPERATING SYSTEM SERVICES

• User interface:
Command line interface (CLI)
Batch interface (BI)
Graphical user interface (GUI)
 
• Program Execution:
• The system must be able to load a program into memory and run that program. The
program must be able to end its execution, either normally or abnormally.

• I/O operations:
• A running program may require I/O, which may involve file or an I/O device. For
efficiency and protection, users cannot control I/O devices directly. Therefore, the
OS must provide a means to do I/O.
• File System Manipulation:
Programs need to be read and write files and directories. Create and delete files by
name, search for a given file and list file information. Some programs include
permissions management to allow or deny access to files or directories based on file
ownership.

• Communications:
Process needs to exchange information ith other process, processes executing on same
computer system or on different computer systems. Communication may be
implemented via shared memory or through message passing.
 
• Message passing:
It is the process of sending the packets of information from one process to other
process.
There are many circumstances in which one process needs to exchange information
with another process. Such communication may occur between processes that are
executing on the same computer or between processes that are executing on different
computer systems tied together by a computer network. Communications may be
implemented via shared memory, in which two or more processes read and write to a
shared section of memory, or message passing.
• Error Detection:
Errors may occur in CPU, memory hardware, I/O devices and in the user program.
For each type of error, the OS should take the appropriate action to ensure correct
and consistent computing. Debugging facilities can greatly enhance the user’s and
programmer’s abilities to use the system efficiently.
• Resource Allocation:
When there are multiple jobs running at the same time, resources must be allocated
to each of them.
Resources: CPU cycles, main memory, file storage and I/O devices.
CPU scheduling routines: to determine how best to use the CPU. Routines to allocate
printers, modems, USB storage drives and other peripheral devices 
• Accounting:
Keeping a track of which users are using how much and what kinds of computer
resources can be used for accounting or simply for accumulating usage statistics.
Usage statistics reconfigure the system to improve computing services 
• Protection and Security:
Protection involves ensuring that all access to system resources is controlled. To make
a system secure, the user needs to authenticate himself or herself to the system
COMMAND INTERPRETER
Main function is to get and execute the user- specified commands like create, delete,
list, print, copy, Execute, and so on. Some operating systems include the command
interpreter in the kernel. Others, such as Windows and UNIX, treat the command
interpreter as a special program. On systems with multiple command interpreters to
choose from, the interpreters are known as shells. Third-party shells and free user-
written shells are also available. Most shells provide similar functionality, and a user’s
choice of which shell to use is generally based on personal preference. The main
function of the command interpreter is to get and execute the next user-specified
command.
Two ways to implement the commands:
1) Command interpreter itself contains the code to execute the command
2) Implementing most commands through system programs (ex: rm file.txt)
CHOICE OF INTERFACE
The choice of whether to use a command-line or GUI interface is mostly one of
personal preference. System administrators or power users who have deep
knowledge of a system frequently use the command-line interface. For them, it
is more efficient, giving them faster access to the activities they need to
perform. These shell scripts are very common on systems that are command-
line oriented
Whereas other users use GUI for more flexible, more common tasks can be
done in GUI, by the advanced tasks cannot be in GUI.

SYSTEM CALLS
Provide an interface to the services made available by an OS available as
routines written in C and C++, assembly language

API
Application developers design programs according to an application
programming interface. API specifies a set of functions that are available to an
application programmer, including the parameters that are passed to each
function and the return values the programmer can expect
BIOS
• The BIOS, an acronym for Basic Input/Output System and also known as
the System BIOS, ROM BIOS or PC BIOS) is a type of firmware used to perform
hardware initialization during the booting process.
 
• The fundamental purposes of the BIOS in modern PCs are to initialize and test the
system hardware components, and to load a boot loader or an operating system from
a mass memory device. The BIOS additionally provides an abstraction layer for the
hardware, i.e., a consistent way for application programs and operating systems to
interact with the keyboard, display, and other input/output (I/O) devices. Variations
in the system hardware are hidden by the BIOS from programs that use BIOS
services instead of directly accessing the hardware. 
WORKING OF BIOS
• There are three separate layers that communicate with each other through different
interfaces. The diagram to the right is of that layered division:
• In our layered system, the application is the highest level. It cannot directly interact
with the hardware.
1. The application can only communicate with the operating system through
the API or Application Program Interface. The API is a set of common functions that
the application calls upon to get the operating system to do what it wants.
 
2. The operating system then communicates to the BIOS what it needs to carry out the
application's request. The operating system never communicates directly with the
hardware.

3. The BIOS layer allows the operating system to support all manners of hardware.
Each piece of hardware comes with its own BIOS and/or driver, which become part of
the system's BIOS.

Therefore, the BIOS layer is dynamic and changes to match the computer's hardware
configuration. It serves to mask the differences between different hardware by
presenting a common interface to the operating system
KERNELS
• In computing, the kernel is a computer program that manages input/output
requests from software, and translates them into data processing instructions for
the central processing unit and other electronic components of a computer. The
kernel is a fundamental part of a modern computer's operating system
• A kernel connects the application software to the hardware of a computer
• The critical code of the kernel is usually loaded into a protected area of memory,
When a process makes requests of the kernel, the request is called a system call
FUNCTIONS OF KERNELS:

Memory Management:
The kernel has full access to the system's memory and must allow processes to safely
access this memory as they require it.
 
Device management:
To perform useful functions, processes need access to the peripherals connected to
the computer, which are controlled by the kernel through device drivers. A device
driver is a computer program that enables the operating system to interact with a
hardware device. A kernel must maintain a list of available devices.

System calls
In computing, a system call is how a program requests a service from an operating
system's kernel that it does not normally have permission to run. They use a machine-
code instruction that causes the processor to change mode.
BATCH Processing
• Batch processing is a technique in which Operating System collects one programs
and data together in a batch before processing starts.
MULTITASKING
• Multitasking refers to term where multiple jobs are executed by the CPU
simultaneously by switching between them. Switches occur so frequently that the
users may interact with each program while it is running.
MULTIPROGRAMMING
• When two or more programs are residing in memory at the same time, then sharing
the processor is referred to the multiprogramming. Multiprogramming assumes a
single shared processor. Multiprogramming increases CPU utilization by organizing
jobs so that the CPU always has one to execute.
INTERACTIVITY
• Interactivity refers that a User is capable to interact with computer system.
Operating system does the following activities related to interactivity.
• OS provides user an interface to interact with system.
• OS managers input devices to take inputs from the user. For example, keyboard.
• OS manages output devices to show outputs to the user. For example, Monitor.
• OS Response time needs to be short since the user submits and waits for the result.
 
REAL TIME SYSTEM
• Real time systems represents are usually dedicated embedded systems. Operating
system does the following activities related to real time system activity.
• In such systems, Operating Systems typically read from and react to sensor data.
• The Operating system must guarantee response to events within fixed periods of
time to ensure correct performance.
DISTRIBUTED ENVIRONMENT
• Distributed environment refers to multiple independent CPUs or processors in a
computer system. Operating system does the following activities related to
distributed environment.
 
SPOOLING
• Spooling is an acronym for simultaneous peripheral operations online. Spooling
refers to putting data of various I/O jobs in a buffer. This buffer is a special area in
memory or hard disk which is accessible to I/O devices. Operating system does the
following activities related to distributed environment

You might also like