You are on page 1of 5

CHAPTER 1 ➢The kernel is the core inner component that

processes data at the hardware level.


What is an Operating System?
• It handles input-output management,
 It is a program (software) that acts as an memory and process management.
intermediary between the user of a computer • Kernel is the one program running at all
and the computer hardware. times (all else being application programs).
 It serves as an interface between the user and ➢The shell is the outer layer that manages the
the hardware interaction between the user and the OS.
o Processors • The shell communicates with the operating
o Main memory system by either taking the input from the
o Disks user or a shell script.
o Printers • A shell script is a sequence of system
o Display commands that are stored in a file.
o Keyboards
Traditional computer system
o Network interfaces
 Memory (CPU, Disk Controller, USB
o Other I/0 devices
Controller, GRAPHIS ADAPTER)
 It provides an environment in which a user
may execute programs.
Types of operating systems
Computer System Structure ● Batch OS
The batch operating system does not have a
 Computer hardware direct link with the computer. A different
Provide basic computing resources (CPU, system divides and allocates similar tasks into
memory, I/O devices). batches for easy processing and faster
response.
 Operating Systems
● The batch operating system is
Acts as an intermediary control and
appropriate for lengthy and
coordinates the use of the hardware among
the various application programs for the timeconsuming tasks. To avoid
various users example: UNIX, LINUX, slowing down a device, each user
Windows, MS DOS prepares their tasks offline and
submits them to an operator.
 System application programs ● Batch operating systems are used
Define the ways in which the system for tasks such as managing payroll
resources are used to solve the computing systems, data entry and bank
problem of the users ( compilers, database statements.
systems, video games, business programs) ● Time-sharing or multitasking OS
➢The time-sharing operating system,
 Users
also known as a multitasking OS,
People, machine and other computers
works by allocating time to a
(compilers, database systems, video games,
particular task and switching between
business programs)
tasks frequently. Unlike the batch
system, the time-sharing system
Operating system functions allows users to complete their work in
the system simultaneously.
➢Booting: An operating system manages the startup
➢It allows many users to be
of a device.
distributed across various terminals
➢Memory management: An operating system to minimize response time
coordinates computer applications and allocates
➢Examples of time-sharing operating
space to different programs installed in the computer.
systems include Multics and Unix.
➢Data security: An operating system protects your ● Distributed OS
data from cyberattacks. This system is based on autonomous
➢Loading and execution: An operating system but interconnected computers
starts and executes a program communicating with each other via
➢Drive/disk management: An operating system communication lines or a shared
manages computer drives and divides disks. network. Each autonomous system
➢Device control: An operating system enables you has its own processor that may differ
to allow or block access to devices. in size and function.
➢User interface: This part of an operating system, ➢A distributed operating system
also known as UI, allows users to enter and receive serves multiple applications and
information. multiple users in real time. The data
➢Process management: The operating system processing function is then
allocates space to enable computer processes, such as distributed across the processors.
storing and sharing information. ➢Distributed operating systems are
Operating systems use two components to used for tasks such as
manage computer programs and applications: telecommunication networks, airline
reservation controls and peer-topeer ● Portals provide web access to internal
networks. systems
● Network OS ● Network computers (thin clients) are like
➢Network operating systems are Web terminals
installed on a server providing users ● Mobile computers interconnect via wireless
with the capability to manage data, networks
user groups and applications. ● Networking becoming ubiquitous – even
➢This operating system enables home systems use firewalls to protect home
users to access and share files and computers from Internet attacks
devices such as printers, security
software and other applications, Computing Environments – Distributed
mostly in a local area network. ● Distributed computing
➢Examples of network operating Collection of separate, possibly heterogeneous,
systems include Microsoft Windows, systems networked together
Linux and macOS X. • Network is a communications path, TCP/IP
● Real-time OS most common
• Local Area Network (LAN)
➢Real-time operating systems
• Wide Area Network (WAN)
provide support to real-time systems
• Metropolitan Area Network (MAN)
that require observance of strict time
• Personal Area Network (PAN)
requirements. The response time
Network Operating System provides features
between input, processing and
between systems across network
response is tiny, which is beneficial for
• Communication scheme allows systems to
processes that are highly sensitive and
exchange messages
need high precision.
• Illusion of a single system
➢These processes include operating
missile systems, medical systems or Computing Environments – Client-Server
air traffic control systems, where ● Client-Server Computing
delays may lead to loss of life and • Many systems now servers, responding to
property. Real-time operating systems requests generated by clients
may either be hard real-time systems • Compute-server system provides an
or soft real-time systems. Hard real- interface to client to request services (i.e.,
time systems are installed in database)
applications with strict time • File-server system provides interface for
constraints. clients to store and retrieve files
➢The system guarantees the
completion of sensitive tasks on time. Computing Environments - Peer-to-Peer
Hard real-time does not have virtual ● Another model of distributed system
memory. Soft real-time systems do not ● P2P does not distinguish clients and servers
have equally rigid time requirements. • Instead all nodes are considered peers
A critical task gets priority over other • May each act as client, server or both
tasks • Node must join P2P network
➢Real-time operating systems are • Registers its service with central lookup
used for tasks such as scientific service on network, or
experiments, medical imaging, • Broadcast request for service and respond
robotics and air traffic control to requests for service via discovery protocol
operations. • Examples include Napster and Gnutella,
● Mobile OS Voice over IP (VoIP) such as Skype
➢Mobile operating systems run
exclusively on small devices such as Computing Environments - Virtualization
smartphones, tablets and wearables. ● Allows operating systems to run applications
The system combines the features of a within other OSes
personal computer with additional • Vast and growing industry
features useful for a handheld device. ● Virtualization – OS natively compiled for CPU,
➢Mobile operating systems start running guest OSes also natively compiled
when a device is powered on to • Consider VMware running WinXP guests,
provide access to installed each running applications, all on native
applications. Mobile operating WinXP host OS
systems also manage wireless • VMM (virtual machine Manager) provides
network connectivity. virtualization services
➢Examples of mobile operating ● Use cases involve laptops and desktops running
systems include Android OS, Apple multiple OSes for exploration or compatibility
and Windows mobile OS. • Apple laptop running Mac OS X host,
Windows as a guest
Computing Environments - Traditional • Developing apps for multiple OSes without
● Stand-alone general purpose machines having multiple systems
• QA testing applications without having I/O devices) may have general request and
multiple systems release code
• Executing and managing compute ➢Accounting -To keep track of which users use how
environments within data centers much and what kinds of computer resources
● VMM can run natively, in which case they are also ➢Protection and security -The owners of
the host information stored in a multiuser or networked
• There is no general purpose host then computer system may want to control use of that
(VMware ESX and Citrix XenServer) information, concurrent processes should not
interfere with each other
Computing Environments – Cloud Computing • Protection - involves ensuring that all access
● Cloud computing environments composed of to system resources is controlled
traditional OSes, plus VMMs, plus cloud management • Security of the system from outsiders
tools requires user authentication, extends to
• Internet connectivity requires security like defending external I/O devices from invalid
firewalls access attempts
• Load balancers spread traffic across • If a system is to be protected and secure,
multiple applications precautions must be instituted throughout it.
A chain is only as strong as its weakest link.
CHAPTER 2
➢Operating systems provide an environment for User Operating System Interface
execution of programs and services to programs and ➢Command Line Interface (CLI)
users ➢CLI allows direct command entry
➢One set of operating system services provides
➢Sometimes implemented in kernel,
functions that are helpful to the user:
sometimes by systems program
▪ User interface - Almost all operating
➢Sometimes multiple flavors
systems have a user interface ( UI)
implemented (i.e. shells)
▪ Varies between Command Line
(CLI ), Graphics User Interface (GUI), ➢Primarily fetches a command from
Batch user and executes it
▪ Program execution - The system must be ➢Sometimes commands built in,
able to load a program into memory and to sometimes just names of programs
run that program, end execution, either ➢If the latter, adding new features
normally or abnormally (indicating error) doesn't require shell modification
▪ I/O operations - A running program may ➢Graphical user Interface (GUI)
require I/O, which may involve a file or an I/O ➢User friendly desktop metaphor
device interface
▪ File system manipulation - The file • Usually mouse, keyboard,
system is of particular interest. Programs and monitor
need to read and write files and directories, • Icons represent files,
create and delete them, search them, list file programs, actions, etc
Information, permission management. • Various mouse buttons over
▪ Communications - Processes may objects in the interface cause
exchange information, on the same computer various actions (provide
or between computers over a network information, options, execute
▪ Communications may be via shared function, open directory
memory or through message passing (known as a folder)
(packets moved by the OS) ➢Many systems now include both CLI
▪ Error detection - OS needs to be and GUI interfaces
constantly aware of possible errors ▪ Microsoft Windows is GUI
▪ May occur in the CPU and memory with CLI command shell
hardware, in I/O devices, in user ▪ Apple Mac OS X is Aqua GUI
program interface with UNIX kernel
▪ For each type of error, OS should underneath and shells
take the appropriate action to ensure available
correct and consistent computing ▪ Unix and Linux have CLI
▪ Debugging facilities can greatly with optional GUI interfaces
enhance the user s and programmer s (CDE, KDE, GNOME)
abilities to efficiently use the system
➢Touchscreen Interfaces
➢Another set of OS functions exists for ensuring the Touchscreen devices require new interfaces
efficient operation of the system itself via resource • Mouse not possible or not desired
sharing • Actions and selection based on
• Resource allocation - When multiple users or gestures
multiple jobs running concurrently, resources must • Virtual keyboard for text entry
be allocated to each of them
• Many types of resources -Some (such as CPU System Calls
cycles, main memory, and file storage) may
have special allocation code, others (such as
➢System calls are interfaces provided by an ➢The kernel
operating system that allow user-level programs to • Consists of everything below the system call
request services or functionality from the kernel, interface and above the physical hardware
which is the core part of the operating system. • Provides the file system, CPU scheduling,
➢These services can include tasks like file memory management, and other operating
operations, process management, memory allocation, system functions; a large number of functions
and input/output operations. for one level
➢System calls act as a bridge between the user-level Layered Structure Approach
applications and the low-level hardware of the ➢ The operating system is divided into a
computer. number of layers (levels), each built on top of
➢Purpose: Enable user programs to perform lower layers. The bottom layer (layer 0), is the
privileged or protected operations like hardware; the highest (layer N) is the user
reading/writing files, creating processes, managing interface.
memory, and more. ➢ With modularity, layers are selected such
➢Mostly accessed by programs via a high level that each uses functions (operations) and
Application Programming Interface (API) rather than services of only lower level layers
direct system call use
Microkernel System Structure
Type of System Calls:
➢ A microkernel system structure is a design
➢File management – (create file, delete file, open,
approach for operating systems where the core
close file, read, write, reposition, get and set file
functionality of the operating system is kept as
attributes)
small and minimal as possible, with most
➢Device management – (request device, release
operating system services provided by separate,
device, read, write, reposition, get device attributes,
user-level processes or modules.
set device attributes, logically attach or detach
devices) ➢ In a microkernel system, the kernel's primary
responsibility is to manage communication and
➢Information maintenance – (get time or date, set
provide essential services, while higher-level
time or date, get system data, set system data, get and
set process, file, or device attributes) functions are delegated to separate
components running in user space.
➢Communications – (create, delete communication
connection, send, receive messages if message
passing model to host name or process name, i.e. Modular Structure
from client to server, transfer status information, ➢ Most modern operating systems implement loadable
attach and detach remote devices) kernel modules
➢Protection – (Control access to resources, Get and ➢Uses object oriented approach
set permissions, Allow and deny user access) ➢Each core component is separate
➢Each talks to the others over known
System Programs interfaces
System programs provide a convenient environment for ➢Each is loadable as needed within the kernel
program development and execution. They can be ➢Similar to layers but with more flexible
divided into: ➢Linux, Solaris, etc
➢File Management/manipulation
➢Status information sometimes stored in a File Hybrid Systems
modification Most modern operating systems actually not one pure
➢Programming language support model
➢Program loading and execution • Hybrid combines multiple approaches to
➢Communications address performance, security, usability needs
➢Background services • Linux and Solaris kernels in kernel address
➢Application program space, so monolithic, plus modular for dynamic
loading of functionality
Operating System Structure • Windows mostly monolithic, plus microkernel
Simple Structure for different subsystem personalities Apple Mac
I.e., MS DOS written to provide the most functionality in OS X hybrid, layered, Aqua UI plus Cocoa
the least space programming environment
• Not divided into modules
• Although MS DOS has some structure, its Debugging is finding and fixing errors, or bugs
interfaces and levels of functionality are not ➢OSes generate log files containing error
well separated information ➢Failure of an application can
generate core dump file capturing
Unix ➢memory of the process
UNIX limited by hardware functionality, the original ➢Operating system failure can generate crash
UNIX operating system had limited structuring. The dump file containing kernel memory
UNIX OS consists of two separable parts: ▪ Beyond crashes, performance tuning
➢Systems programs can optimize system performance
➢Sometimes using trace listings of activities,
recorded for analysis
➢Profiling is periodic sampling of instruction
pointer to look for statistical trends

Kernighan’s Law: Debugging is twice as hard as writing


the code in the first place. Therefore, if you write the
code as cleverly as possible, you are, by definition, not
smart enough to debug it.

Performance Tuning
• Improve performance by removing
bottlenecks
• OS must provide means of computing and
displaying measures of system behavior
• For example, “top” program or Windows Task
Manager

Various ways to structure one as follows:


• Simple Structure
• Layered Structure
• Microkernel System Structure
• Modular Structure
• Hybrid Systems

System Boot When power initialized on system,


execution starts at a fixed memory location
➢Firmware ROM used to hold initial boot code
➢Operating system must be made available to
hardware so hardware can start it
➢Small piece of code bootstrap loader , stored
in ROM or EEPROM locates the kernel, loads it
into memory, and starts it
➢Sometimes two step process where boot
block at fixed location loaded by ROM code,
which loads bootstrap loader from disk
➢Common bootstrap loader, GRUB , allows
selection of kernel from multiple disks, versions,
kernel options
➢Kernel loads and system is then running

You might also like