View
219
Download
1
Category
Preview:
Citation preview
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
FUDAMENTALS OF OPERATING SYSTEMS References - Operating System Concepts – 9th Edition courtesy - Silberschatz, Galvin and Gagne
Chapter 1: Introduction
What is an Operating System?A program that acts as an intermediary between a user of a computer and the computer
hardware.
Operating system goals Execute user programs and make solving user problems easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.
Computer System Structure
Computer system can be divided into four components:
Hardware - Provides basic computing resources CPU, memory, I/O devices.
Operating system - Controls and coordinates use of hardware among various applications and
users.
Application programs - Define the ways in which the system resources are used to solve the
computing problems of the users. Examples: Word processors, compilers, web browsers,
database systems, video games, etc.
Users - People, machines, other computers.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Abstract View / Four Components of a Computer System -
Operating System functionResource allocator – manages and allocates resources.
Control program – controls the execution of user programs and operations of I/O devices.
Kernel – the one program running at all times (all else being application programs).
Multiple computers for unique I/O - Operating systems are everywhere
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Computer StartupBootstrap program is loaded at power-up or reboot.
Typically stored in ROM or EPROM, generally known as firmware.
Initializes all aspects of system.
Loads operating system kernel and starts execution.
Computer-system operation One or more CPUs, device controllers connect through common bus providing access to
shared memory.
Concurrent execution of CPUs and devices competing for memory cycles.
Device controller informs CPU that it has finished its operation by causing an interrupt.
Interrupts The normal sequence of the processor may be interrupted by other modules like I/O,
memory etc. The list of common interrupts.
Class DescriptionProgram Generated as a result of an instruction execution. For example, arithmetic
overflow, division by zero etc.
Timer Generated by timer within the processor. It allows OS to perform certain
functions on regular basis.
I/O Generated by I/O controller to indicate any error or normal completion of an
operation.
Hardware Failure Generated by failure like power failure or memory parity error.
The aim of interrupts is to improve the processor utilization. For example, most I/O
devices are slower than the processor. If the processor gives the instruction for WRITE
something on I/O devices, the I/O unit takes two steps for the job –
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
I/O program may copy the data to be written into the buffer etc. and prepare for the
actual I/O operation.
The actual I/O command has to be executed.
Common Functions of Interrupts Interrupt transfers control to the interrupt service routine generally, through the interrupt
vector, which contains the addresses of all the service routines.
Interrupt architecture must save the address of the interrupted instruction.
A trap or exception is a software-generated interrupt caused either by an error or a user
request.
An operating system is interrupt driven.
Storage Structure types Main memory – only large storage media that the CPU can access directly.
o Random access, typically volatile.
Secondary storage – extension of main memory that provides large nonvolatile storage
capacity.
Hard disks – rigid metal or glass platters covered with magnetic recording material.
o Disk surface is logically divided into tracks, which are subdivided into sectors.
o The disk controller determines the logical interaction between the device and the
computer .
Solid-state disks – faster than hard disks, nonvolatile.
o Various other technologies, Becoming more popular.
Storage value The basic unit of computer storage is the bit.
A bit can contain one of two values, 0 and 1.A byte is 8 bits.
All other storage in a computer is based on collections of bits. Given enough bits, it is amazing
how many things a computer can represent: numbers, letters, images, movies, sounds,
documents, and programs.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Symbol Prefix SI Meaning Bytes Binary meaning
k kilo 103 = 10001 1024 B 210 = 10241
M mega 106 = 10002 1024 KB 220 = 10242
G giga 109 = 10003 1024 MB 230 = 10243
T tera 1012 = 10004 1024 GB 240 = 10244
P peta 1015 = 10005 1024 TB 250 = 10245
E exa 1018 = 10006 1024 PB 260 = 10246
Z zetta 1021 = 10007 1024 EB 270 = 10247
Y yotta 1024 = 10008 1024 ZB 280 = 10248
Storage-Device Hierarchy diagram
CachingIn computing, a cache is a hardware or software component that stores data so future requests
for that data can be served faster, the data stored in a cache might be the result of an earlier
computation, or the duplicate of data stored elsewhere.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Device DriverDevice controller to manage I/O. Provides uniform interface between controller and kernel.
Different types of Operating System Structure
Single- and multi-taskingA single-tasking system can only run one program at a time, while
A multi-tasking operating system allows more than one program to be running in concurrency.
This is achieved by time-sharing, dividing the available processor time between multiple
processes that are each interrupted repeatedly in time slices by a task-scheduling subsystem of
the operating system.
Single- and multi-userSingle-user operating systems have no facilities to distinguish users, but may allow multiple
programs to run in cycle.
A multi-user operating system extends the basic concept of multi-tasking with facilities that
identify processes and resources, such as disk space, belonging to multiple users, and the
system permits multiple users to interact with the system at the same time.
DistributedA distributed operating system manages a group of distinct computers and makes them
appear to be a single computer.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Distributed systems use multiple central processors to serve multiple real time application and
multiple users.
Data processing jobs are distributed among the processors accordingly to which one can
perform each job most efficiently.
TemplatedIn an OS, distributed and cloud computing context, templating refers to creating a single virtual
machine image as a guest operating system, then saving it as a tool for multiple running virtual
machines.
The technique is used both in virtualization and cloud computing management, and is common
in large server warehouses.
EmbeddedEmbedded operating systems are designed to be used in embedded computer systems.
They are designed to operate on small machines like PDAs with less autonomy. They are very
compact and extremely efficient by design.
Real-timeA real-time operating system is an operating system that guarantees to process events or
data within a certain short amount of time.
LibraryA library operating system is one in which the services that a typical operating system
provides, such as networking, are provided in the form of libraries.
Multiprogramming (Batch system) - needed for efficiency.
Since several jobs are available on disk, OS can select which job to run; this essentially leads
to job scheduling. Idea is to ensure that CPU is always busy.
A single job may not be able to be keep CPU busy. Multiprogramming allows to keep the CPU
more busy.
Single user cannot keep CPU and I/O devices busy at all times.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Multiprogramming organizes jobs (code and data) so CPU always has one to execute.
Once this job needs an I/O operation operating system switches to another job (CPU and
OS always busy).
A subset of total jobs in system is kept in memory.
One job selected and run via job scheduling. In multiprogramming the prime focus is to maximize the CPU usage.
Memory Layout for Multiprogrammed System
Timesharing (multitasking) - Processor's time which is shared among multiple users
simultaneously is termed as time-sharing.
In time sharing systems the prime focus is on minimizing the response time,
Each user has at least one program executing in memory – process. If several jobs ready to run at the same time - CPU scheduling. If processes don’t fit in memory, swapping moves them in and out to run.
Creating interactive computing.
Desktop Systems Personal computers – computer system dedicated to a single user.
I/O devices – keyboards, mice, display screens, small printers.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
User convenience and responsiveness.
Can adopt technology developed for larger operating system.
May run several different types of operating systems (Windows, MacOS, UNIX, Linux)
Parallel Systems Multiprocessor systems - with more than on CPU in close communication.
Tightly coupled system – processors share memory and a clock; communication usually
takes place through the shared memory.
Network Operating System Network Operating System runs on a server and provides 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.
Clustered Systems Clustering allows two or more systems to share storage.
Provides high reliability.
Asymmetric clustering - one server runs the application while other server’s standby.
Symmetric clustering - all N hosts are running the application.
Handheld Systems Personal Digital Assistants (PDAs)
Cellular telephones
Process ManagementA process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.
Process needs resources to accomplish its task - CPU, memory, I/O, files, Initialization data.
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Process termination requires retrieve of any reusable resources.
Process executes instructions sequentially, one at a time, until completion.
Multi-threaded process has one program counter per thread.
Process Management Activities Creating and deleting both user and system processes.
Suspending and resuming processes.
Providing mechanisms for process synchronization, communication, deadlock handling.
Different types of I/O processing for programsSynchronous I/O After I/O is requested, wait until I/O is done. Program will be idle.
No simultaneous I/O processing, at most one I/O request at a time.
Asynchronous I/O After I/O is requested, control returns to user program without waiting for I/O completion.
Memory Management in OS It handles or manages primary memory.
Memory management keeps track of each and every memory location either it is allocated
to some process or it is free.
It checks how much memory is to be allocated to processes.
It decides which process will get memory at what time.
Allocating and deallocating memory space as needed.
Keeping track of which parts of memory are currently being used and by whom.
Storage ManagementComputer data storage, often called storage or memory, is a technology consisting of computer
components and recording media used to retain digital data.
Each medium is controlled by device (i.e., disk drive, tape drive) - Varying properties include
access speed, capacity, data-transfer rate, and access method (sequential or random).
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
File-System management
o Files usually organized into directories.
o Access control on most systems to determine who can access what.
OS activities include
o Creating and deleting files and directories.
o Backup files onto stable (non-volatile) storage media.
Thread A thread is the smallest unit of processing that can be performed in an OS. In most modern
operating systems, a thread exists within a process - that is, a single process may contain
multiple threads.
A process with two threads of execution, running on one processor.
Protection and Security Protection – any mechanism for controlling access of processes or users to resources
defined by the OS.
Security – defense of the system against internal and external attacks.
Huge range, including denial-of-service, worms, viruses, identity theft, theft of service.
Systems generally first distinguish among users, to determine who can do what.
User interface
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
Each command is typed out after the 'prompt', and then its output appears below, working its
way down the screen.
Every computer that is to be operated by an individual requires a user interface. The user
interface is usually referred to as a shell and is essential if human interaction is to be supported.
Graphical user interfaces
Most of the modern computer systems support graphical user interfaces (GUI).
Examples of computer operating systems Microsoft Windows - PC and IBM compatible operating system. Microsoft Windows is the
most common and used operating system.
Apple MacOS - Apple Mac operating system. The only Apple computer operating system is
MacOS.
Ubuntu Linux - A popular variant of Linux used with PC and IBM compatible computers.
Google Android - operating system used with Android compatible phones.
iOS - Operating system used with the Apple iPhone.
DOS – Disk Operating Systems Software.
System Software
Department of Computer Science, College of Art and Sciences, University of NIZWA
FUDAMENTALS OF OPERATING SYSTEMS - COMP355Week 1
System Software have direct control and access to your computer hardware, and memory
locations.
They perform I/O operations on various memory locations, and control the hardware, to make
the application software do a task.
Computing Environments Traditional computing
Web-Based Computing
Embedded Computing
Free Open Source Operating Systems Linux - is the best-known and most-used open source operating system.
Ubuntu -The most widely used open source data base is Ubuntu. It is a Linux based
operating system and is distributed free along with the source code.
FreeBSD - is an advanced operating system for x86 compatible (including Pentium and
Athlon), AMD64 compatible. It is popular among network developers.
OpenSolaris - is a computer operating system developed by Sun Microsystems. It runs well
on desktops, laptops, servers and data centers. OpenSolaris is GUI based.
ReactOS - It is a free Windows compatible OS that offers the benefits of running Windows
apps natively.
E/OS is a open source emulator of the BeOS, Darwin, DOS, Linux, and Windows API on top
of X, allowing run many unmodified programs to run on Linux, FreeBSD, Mac OS X, Solaris,
Windows and DOS.
FreeVMS is an OpenVMS-like operating system which can run on several architectures like
i386, PPC, Alpha, and many others.
Department of Computer Science, College of Art and Sciences, University of NIZWA
Recommended