0% found this document useful (0 votes)
967 views45 pages

Applied Operating System

The document discusses operating systems, defining them and describing their goals and components. It explains the types of operating systems and services they provide, as well as computer system organization and interrupt handling. Finally, it outlines different computer architectures, processor systems, and computing environments.

Uploaded by

Cheese Burger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
967 views45 pages

Applied Operating System

The document discusses operating systems, defining them and describing their goals and components. It explains the types of operating systems and services they provide, as well as computer system organization and interrupt handling. Finally, it outlines different computer architectures, processor systems, and computing environments.

Uploaded by

Cheese Burger
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

APPLIED OPERATING

SYSTEM
MODULE 1
INTRODUCTION TO
OPERATING SYSTEM
Upon completion of this module, the student will be able to:

• Define the operating system (OS) and its goals;


• Demonstrate the abstract view of the components of a computer
system;
• Enumerate the types of OS and services provided by the OS;
• Explain the organization and operation of computer system;
• Discuss interrupt, its types and interrupt handling;
• Give different computer architectures, processor systems and
computing environments;
• An Operating System (OS) is a
program or system software that acts
as an interface between the user and
the computer hardware and controls
the execution of all kinds of
programs.
• It is not possible for the user to use
any computer or mobile device
without having an operating system.
1. Execute user programs and make solving user problems
easier.
2. Make the computer system convenient to use.
3. Use the computer hardware in an efficient manner.
• Computer hardware – CPU, memory and I/O
devices, provides the basic computing
resources.
• Application programs – are used to solve the
computing problems of the users such as word
processors, games and business programs .
• Users – who utilize a computer or network
service trying to solve different problems.
• Operating Systems – controls and coordinates
the use of the hardware among the various
application programs for the various users.
1. User Interface
2. Program Execution
3. File system manipulation
4. Input / Output Operations
5. Communication
6. Resource Allocation
7. Error Detection
8. Accounting
9. Security and protection
1. User Interface (UI).
Refers to the part of an
OS, or device that allows
a user to enter and
receive information.

Types of UI:
• Command line interface
• Batch based interface
• Graphical User Interface
2. Program Execution. The OS must have the capability to load a
program into memory and execute that program.
3. File system manipulation. Programs need has to be read and
then write them as files and directories. File handling portion of
OS also allows users to create and delete files by specific name
along with extension, search for a given file and / or list file
information.
4. Input / Output Operations. A program which is currently
executing may require I/O, which may involve file or other I/O
device. The OS is responsible for reading and/or writing data
from I/O devices such as disks, tapes, printers, keyboards, etc.
5. Communication. Process needs to swap over information with
other process. Processes executing on same computer system
or on different computer systems can communicate using
operating system support.
6. Resource Allocation The OS manages the different computer
resources such as CPU time, memory space, file storage space,
I/O devices, etc. and allocates them to different application
programs and users.
7. Error Detection The operating system should be able to detect
errors within the computer system (CPU, memory, I/O, or user
program) and take the appropriate action.
8. Job Accounting. OS keeps track of time and resources used by
various tasks and users, this information can be used to track
resource usage for a particular user or group of user.
9. Security and Protection. Protection is any mechanism for
controlling access of processes or users to resources defined by
the OS. Security is a defense of the system against internal and
external attacks (denial-of-service, worms, viruses, identity theft,
theft of service)
Kernel is the central part of an OS which
manages system resources and is always
resident in memory. It also acts like a bridge
between application and hardware of the
computer. It is also the first program that
loads after the bootloader.

Bootloader is a program that loads and starts


the boot time tasks and processes of an OS.
It also places the OS of a computer into
memory.
Operating systems are there from the very first computer
generation and they keep evolving with time.

Types of operating systems which are most commonly used:


1. Batch operating system
2. Time-sharing operating systems
3. Distributed operating system
4. Network operating system
5. Real-time operating system
6. Handheld operating system
1. Batch Operating System (BOS)
• The user of a BOS never directly interacts
with the computer.
• Every user prepares his or her job on an
offline device like a punch card and submit
it to the computer operator.
• To speed up processing, jobs with similar
needs are batched together and run as a
group.
• The programmers leave their programs with
the operator then operator sorts the programs
with similar requirements into batches.
2. Time-sharing Operating System
• Time-sharing or multitasking is logical extension in which CPU
switches jobs so frequently that users can interact with each job while
it is running, creating interactive computing.
• 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. Response time should be < 1 second
• Each user has at least one program executing in memory
• If several jobs ready to run at the same time  CPU scheduling
• If processes don’t fit in memory, swapping will take place
• Examples: Unix, Linux, Multics and Windows
3. Distributed Operating System
• Distributed systems use multiple central processors to serve
multiple real-time applications and multiple users. Data processing
jobs are distributed among the processors accordingly.
• The processors communicate with one another through various
communication lines (such as high-speed buses or telephone lines).
These are referred as loosely coupled systems or distributed
systems. Processors in a distributed system may vary in size and
function. These processors are referred as sites, nodes, computers,
and so on.
• Examples: Telecom Network, WWW, Cloud Computing, etc.
4. Network Operating System (NOS)
• A NOS runs on a server and provides the server the capability to
manage data, users, groups, security, applications, and other
networking functions.
• The primary purpose of the network operating system is to allow
shared file and printer access among multiple computers in a
network, typically a local area network (LAN), a private network or
to other networks.
• Examples: Microsoft Windows Server 2003, Microsoft Windows
Server 2008, UNIX, Linux, Mac OS X Server, Novell NetWare, and
BSD/OS (Berkeley Software Design).
5. Real-time Operating System (RTOS)
• RTOS is an operating system intended to serve real-time
systems/applications that process data as it comes in, mostly
without buffer delay.
• The time interval required to process and respond to inputs is very
small. This time interval is called response time.
• Real-time systems are used when there are time requirements
are very strict like missile systems, air traffic control systems,
robots, etc.
• Examples: LynxOS, OSE, QNX, RTLinux, VxWorks, Windows CE
6. Handheld Operating System
• It is also known as Mobile OS which is built exclusively for a
mobile device, such as a smartphone, personal digital assistant
(PDA), tablet, wearable devices or other embedded mobile OS.
• Examples: Android, Symbian, iOS, BlackBerry OS and Windows
Mobile.
• One or more CPUs, device controllers connect through common
bus providing access to shared memory.
• Concurrent execution of CPUs and devices completing for
memory cycles.
• I/O devices and the CPU can execute concurrently.
• Each device controller is in charge of a particular device type.
• Each device controller has a local buffer.
• CPU moves data from/to main memory to/from local buffers.
• I/O is from the device to local buffer of controller.
• Device controller informs CPU that it has finished its operation
by causing an interrupt.
• Interrupt is a signal emitted by hardware or software when a
process or an event needs immediate attention.
• It alerts the processor temporarily to a high priority process
requiring interruption of the current working process and then return
to its previous task.
• Types of Interrupts:
• Hardware interrupt
• Software interrupt
• An operating system is interrupt driven.
• Hardware interrupt is a signal created and sent to the CPU that
is caused by some action taken by a hardware device.
Example: When a key is pressed or when the mouse is
moved.

• Software Interrupt arises due to illegal and erroneous use of an


instruction or data. It often occurs when an application software
terminates or when it requests the operating system for some
service.
Example: stack overflow, division by zero, invalid opcode, etc.
These are also called traps.
• The operating system preserves the state of the CPU by
storing registers and the program counter
• Determines which type of interrupt has occurred:
• Polling – operating system sends signal to each devices
asking if they have a request
• Vectored interrupt system – requesting device sends
interrupt to the operating system.
• Separate segments of code determine what action should be
taken for each type of interrupt
• Dual-mode operation allows OS to protect itself and other system
components
• User mode and kernel mode
• Mode bit provided by hardware
• Provides ability to distinguish when system is running user
code(1) or kernel code(0)
• Some instructions designated as privileged, only executable in
kernel mode
• System call changes mode to kernel, return from call resets it to
user
• A system call is a way for programs to interact with the OS. A
computer program makes a system call when it makes a request
to the OS‘s kernel.
Single-Processor System
• There is one main CPU capable of executing a general-
purpose instruction set, including instructions from user
processes.
Multiprocessor System
• Also known as parallel-system or multicore.
• First appeared in servers and now in smartphones and
tablet computers.
• Most systems use a single general-purpose processor (PDAs
through mainframes)
• Most systems have special-purpose processors as well
• Multiprocessors systems growing in use and importance
• Also known as parallel systems or tightly-coupled systems
• Advantages include
• Increased throughput
• Economy of scale
• Increased reliability – graceful degradation or fault tolerance
• Two types
• Asymmetric Multiprocessing
• Symmetric Multiprocessing
Advantages:

1. Increased throughput. Increasing the number of processor,


expect to get more work done in less time.
2. Economy of scale. It can cost less than equivalent multiple
single-processor systems because they can share peripherals,
mass storage and power supplies.
3. Increased reliability. Functions can be distributed properly
among several processors. If one processor fails, the other
processor can pick-up the task.
The multiprocessor systems in use today are of two types.
1. Asymmetric multiprocessing. Each processor is assigned a
specific task. A boss processor controls the system and the
other processors either look to the boss for instructions or have
predefined tasks. Boss-worker relationship.
2. Symmetric multiprocessing(SMP). The most commonly used.
In which each processor performs all tasks within the operating
system. All processors are peers and no boss-worker
relationship.
The difference between symmetric and asymmetric may result
from either hardware or software.
• A recent trend in CPU design is to
include multiple computing cores on
a single chip. Such multiprocessor
systems are termed multicore.
They can be more efficient than
multiple chips with single core.
• A dual-core design with two cores
on the same chip. Each core has its
own register set as well as its own
local cache.
• Like multiprocessor systems, but multiple systems working
together
• Usually sharing storage via a storage-area network (SAN)
• Provides a high-availability service which survives failures
• Asymmetric clustering has one machine in hot-standby
mode
• Symmetric clustering has multiple nodes running
applications, monitoring each other
• Some clusters are for high-performance computing (HPC)
• Traditional computer - blurring over time
• Office environment
• PCs connected to a network, terminals attached to
mainframe or minicomputers providing batch and
timesharing
• Now portals allowing networked and remote systems
access to same resources
• Home networks
• Used to be single system, then modems
• Now firewalled, networked
• Mobile computing
• Refers to computing on handheld smartphones and tablet
computers.
• Distributed system
• It is a collection of physically separate, possibly
heterogeneous computer systems that are networked to
provide users with access to the various resources that the
system maintains.
• Network operating system is an operating system that
provides services across the network.
• Client-Server Computing
• Dumb terminals succeeded by smart PCs
• Many systems now servers, responding to requests
generated by clients
• Compute-server provides an interface to client to
request services (i.e. database)
• File-server provides interface for clients to store and
retrieve files
• Another model of distributed system
• P2P does not distinguish clients and servers
• Instead all nodes are considered peers
• May each act as client, server or both
• Node must join P2P network
• Registers its service with central lookup service on
network, or
• Broadcast request for service and respond to requests
for service via discovery protocol
• Examples: Napster and BitTorrent
• Virtualization
• It is a technology that allows operating systems to run as
applications within other operating system.
• It is one member of the class software that also includes
emulation. Emulation is used when the source CPU type is
different from the target CPU type.
• Example: virtual machine, OracleVirtualBox
• Cloud Computing
• It is a type of computing that delivers computing, storage
and even applications as a service across a network.
• It is a logical extension of virtualization.
• Public cloud – cloud available via the Internet
• Private cloud – cloud run by a company for that
company’s own use
• Hybrid cloud – cloud that includes both public and
private
• Cloud Computing Service Models
• Software as a service(SaaS) –
one or more applications available
via the Internet
• Platform as a service(PaaS) –
software stack ready for application
use via the Internet
• Infrastructure as a service(IaaS)
– servers or storage available over
the Internet
• Open Source operating systems are released under a
license where the copyright holder allows others to study,
change as well as distribute the software to other people.
• Counter to the copy protection and Digital Rights
Management (DRM) movement
• Started by Free Software Foundation (FSF), which has
“copyleft” GNU Public License (GPL)
• Examples: GNU(GNU’s Not Unix)/Linux, BSD UNIX
(including core of Mac OS X), and Sun Solaris
• Siberschatz, A. (2018). Operating System Concepts,
Wiley.
• Tomsho, G. (2019). Guide to Operating Systems,
Cengage Learning.

You might also like