You are on page 1of 22

Year: 2021-2022

Spring Semester

Operating Systems

Dr. Wafaa Samy

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.1 Modified by Dr. Wafaa Samy
Chapter 1: Introduction (Part 1)

Operating System Concepts – 10h Edition


Silberschatz, Galvin and Gagne ©2018 Modified by Dr. Wafaa Samy
Textbook

 Operating Systems Concepts (10th edition)


by A. Silberschatz, P. B. Galvin and G.
Gagne, John Wiley& Sons, 2018.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.3 Modified by Dr. Wafaa Samy
Grading

 Final Exam 50
 Midterm Exam 20
 Course Work 30
• Quizzes
 4 quizzes
• Activities
 Sections attendance
 Assignments
 Practical exam (Linux and Windows)
• Bonus
 Answering questions in lectures

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.4 Modified by Dr. Wafaa Samy
Chapter 1: Introduction

 What Operating Systems Do


 Computer-System Organization
 Storage Structure
 Computer-System Architecture
 Operating-System Operations
 Resource Management
 Security and Protection
 Virtualization
 Distributed Systems
 Computing Environments
 Free/Libre and Open-Source Operating Systems

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.5 Modified by Dr. Wafaa Samy
What Operating Systems Do?

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.6 Modified by Dr. Wafaa Samy
What is an Operating System?
 An operating system (OS) is software that manages a
computer’s hardware, and
 A program that acts as an intermediary between a user of a
computer and the computer hardware.
• Operating systems are everywhere like cars, smart
phones, personal computers, enterprise computers, etc.
• Operating Systems Examples: DOS, Unix/Linux, Mac OS,
Windows 3.x/9x/NT/2000/XP/Vista/7/8/10, Android, iOS, etc.
 An operating system simply provides an environment within
which other programs can do useful work.
 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.
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.7 Modified by Dr. Wafaa Samy
Computer System Structure
 Computer system can be divided into four components:
• Hardware – provides the basic computing resources for the
system:
 Central Processing Unit (CPU), memory, Input/Output (I/O)
devices.
• Operating system
 Controls the hardware and coordinates its use among the
various application programs for the various users.
• Application programs – define the ways in which the
system resources are used to solve the computing problems
of the users:
 Examples of applications: Word processors, compilers, web
browsers, database systems, video games, etc.
• Users
 People, machines, other computers.
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.8 Modified by Dr. Wafaa Samy
Four Components of the Computer System

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.9 Modified by Dr. Wafaa Samy
Dynamic View of System Components

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.10 Modified by Dr. Wafaa Samy
What Operating Systems Do

 Depends on the point of view:


1. Top Down View (User view).
2. Bottom Up View (System view).

 Depends on the type of system:


workstation, server, mobile device,
embedded system, etc.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.11 Modified by Dr. Wafaa Samy
What Operating Systems Do
 User view: The user’s view of the computer varies according to the
interface being used.
 Many computer users sit with a laptop or in front of a PC, the OS is
designed mostly for ease of use, performance and security.
• Users want convenience, ease of use and good performance.
• They don’t care about resource utilization (how h/w & s/w are shared).
 Users of dedicate systems such as workstations have dedicated
resources but frequently use shared resources from servers.
 Shared computer such as mainframe must keep all users happy.
 Mobile devices like smartphones and tablets are resource poor,
optimized for usability and battery life.
• Mobile user interfaces such as touch screens, and voice recognition.
 Some computers have little or no user interface, such as embedded
computers in home devices and automobiles.
• Run primarily without user intervention.
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.12 Modified by Dr. Wafaa Samy
What Operating Systems Do (Cont.)
 System view: From the computer’s point of view, the operating
system is the program most intimately involved with the hardware.
 OS is a resource allocator making efficient use of hardware (HW):
• A computer system has many resources: CPU time, memory space,
storage space, I/O devices, and so on.
• There are numerous and possibly conflicting requests for resources.
• The operating system acts as the manager of the computer
resources. It must decide how to allocate resources to specific
programs and users so that it can operate the computer system
efficiently and fairly.

 OS is a control program for managing execution of user programs


and controlling the various I/O devices to prevent errors and
improper use of the computer.
• e.g. Memory protection if a process tries to access a memory address
that does not belong to this process.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.13 Modified by Dr. Wafaa Samy
Operating System Definition
 No universally accepted definition of what is part of the operating
system.
 A simple viewpoint is that it includes “Everything a vendor ships
when you order an operating system”.
• But the features included varies wildly from one system to another.
• Some systems take up less than a megabyte of space, whereas
others require gigabytes of space and are based entirely on graphical
windowing systems.
 A more common definition, is that the OS is “The one program
running at all times on the computer” called the kernel, part of
the operating system. Along with the kernel, there are
 Everything else is either: two other types of programs.
• A system program (ships with the operating system, but not part of
the kernel) , or
• An application program, all programs not associated with the
operating system.
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.14 Modified by Dr. Wafaa Samy
Computer System Organization

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.15 Modified by Dr. Wafaa Samy
Computer System Organization

 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. a memory controller synchronizes access to the
memory.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.16 Modified by Dr. Wafaa Samy
Devices and Device Controllers
 A computer system contains many I/O devices and
their respective controllers like:
• Graphics adapter
• DVD-ROM controller
• Disk controller
• USB controller
• Network card
• Sound card
• etc.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.17 Modified by Dr. Wafaa Samy
Computer-System Operation

 I/O devices and the CPU can execute concurrently.


 Each device controller is in charge of a particular
device type (for example, a disk drive, audio device,
or graphics display).

 Each device controller has a local buffer and a set


of special-purpose registers.

 I/O is from the device to local buffer of controller. The


controller moves the data between its controlled
device(s) and its buffer.

 CPU moves data from/to main memory to/from local


buffers.
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.18 Modified by Dr. Wafaa Samy
Device Drivers

 Each device controller type has an operating system


device driver to manage it.

 Interaction with a device controller is managed


through a device driver.

 Device drivers are part of the operating system, but


not necessarily part of the OS kernel.

 The device driver manages I/O and provides uniform


interface between the device controller and kernel.
• Device-driver layer hides differences among I/O
controllers from kernel.

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.19 Modified by Dr. Wafaa Samy
A Kernel I/O Structure

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.20 Modified by Dr. Wafaa Samy
Interacting with Device Controllers

 When interacting with a device controller, the CPU


can wait for a response by polling the status
register(s) (i.e. by periodically checking whether the
status of the device has changed).

 Problem with polling: The CPU is busy waiting for


some event to happen. CPU utilization will be low.

 Solution: Interrupts.

 Device controller informs CPU that it has finished its


operation by causing an interrupt (i.e. alert the
CPU to events that require attention).

Operating System Concepts – 10th Edition


Silberschatz, Galvin and Gagne ©2018 1.21 Modified by Dr. Wafaa Samy
Operating System Concepts – 10th Edition
Silberschatz, Galvin and Gagne ©2018 1.22 Modified by Dr. Wafaa Samy

You might also like