0% found this document useful (0 votes)
16 views

Operating System Lecture 2

The document discusses the evolution and organization of computer systems. It describes the components of a modern computer system including the CPU, memory, storage hierarchy from main memory to hard disks and solid state drives. It also covers topics like device controllers, interrupts, input/output structure, direct memory access, and how the components interact through a bus or switch architecture.

Uploaded by

mohamed faisal
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Operating System Lecture 2

The document discusses the evolution and organization of computer systems. It describes the components of a modern computer system including the CPU, memory, storage hierarchy from main memory to hard disks and solid state drives. It also covers topics like device controllers, interrupts, input/output structure, direct memory access, and how the components interact through a bus or switch architecture.

Uploaded by

mohamed faisal
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Operating Systems

By
Dr Tariq
(Lecture 2)

1
Evolution of Computer Systems
Users

Applications

Database System
Operating System
Hardware
Computer-System Organization

 A modern general-purpose computer system consists of one or


more CPUs and a number of device controllers connected
through a common bus that provides access to shared memory.
 Each device controller is in charge of a specific type of device
(for example, disk drives, audio devices, or video displays). Each
device controller has a local buffer.
 CPU moves data from/to main memory to/from local buffers.
 The CPU and the device controllers can execute in parallel,
competing for memory cycles. To ensure orderly access to the
shared memory, a memory controller synchronizes access to the
memory.
Modern Computer System
Computer Startup
 Bootstrap 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
Interrupts
 There are two types of interrupts:
 Hardware -- a device may trigger an interrupt by sending a
signal to the CPU, usually by way of the system bus.
 Software -- a program may trigger an interrupt by executing a
special operation called a system call.
 A software-generated interrupt (sometimes called trap or
exception) is caused either by an error (e.g., divide by zero)
or a user request (e.g., an I/O request).
Storage Structure
 Main memory – the only large storage media that the CPU can access directly
 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
 Disk surface is logically divided into tracks, which are subdivided into sectors
 The disk controller determines the logical interaction between the device and the
computer
 Solid-state disks – faster than hard disks, nonvolatile
 Various technologies
 Becoming more popular
 Tertiary storage
Storage Definition

 The basic unit of computer storage is the bit. A bit can contain one of two values, 0
and 1. All other storage in a computer is based on collections of bits.
 A byte is 8 bits, and on most computers it is the smallest convenient chunk of storage.
 A less common term is word, which is a given computer architecture’s native unit of
data. A word is made up of one or more bytes.
Storage Definition (Cont.)
 Computer storage, along with most computer throughput, is
generally measured and manipulated in bytes and collections
of bytes.
 A kilobyte, or KB, is 1,024 bytes
 a megabyte, or MB, is 1,0242 bytes
 a gigabyte, or GB, is 1,0243 bytes
 a terabyte, or TB, is 1,0244 bytes
 a petabyte, or PB, is 1,0245 bytes
 exabyte, zettabyte, yottabyte
Storage Hierarchy
 Storage systems organized in hierarchy
 Speed
 Cost
 Volatility
 Caching – copying information from “slow” storage into faster
storage system;
 Main memory can be viewed as a cache for secondary storage
 Device Driver for each device controller to manage I/O
 Provides uniform interface between controller and kernel
Storage-device hierarchy
I/O Structure
 A general-purpose computer system consists of CPUs and multiple
device controllers that are connected through a common bus.
 Each device controller is in charge of a specific type of device. More
than one device may be attached. For instance, seven or more
devices can be attached to the small computer-systems interface
(SCSI) controller.
 A device controller maintains some local buffer storage and a set of
special-purpose registers.
 The device controller is responsible for moving the data between
the peripheral devices that it controls and its local buffer storage.
 Typically, operating systems have a device driver for each device
controller. This device driver understands the device controller and
provides the rest of the operating system with a uniform interface
to the device.
Direct Memory Access Structure
 Interrupt-driven I/O is fine for moving small amounts of data but can
produce high overhead when used for bulk data movement such as
disk I/O.
 To solve this problem, direct memory access (DMA) is used.
 After setting up buffers, pointers, and counters for the I/O device, the
device controller transfers an entire block of data directly to or from its
own buffer storage to memory, with no intervention by the CPU.
 Only one interrupt is generated per block, to tell the device driver that
the operation has completed. While the device controller s performing
these operations, the CPU is available to accomplish other work.
 Some high-end systems use switch rather than bus architecture. On
these systems, multiple components can talk to other components
concurrently, rather than competing for cycles on a shared bus. In
this case, DMA is even more effective. The figure in next slide shows
the interplay of all components of a computer system.
How a Modern Computer Works
A von Neumann architecture and a depiction of the interplay of
all components of a computer system.

You might also like