Download presentation
1
Chapter 1: Introduction
2
Chapter 1: Introduction
What Operating Systems Do Computer-System Organization Computer-System Architecture Operating-System Structure Operating-System Operations Process Management Distributed Systems Computing Environments
3
Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization
4
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
5
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 Word processors, compilers, web browsers, database systems, video games Users People, machines, other computers
6
Four Components of a Computer System
7
The operating system’s Role
User View: Single User (personal computer) OS designed for ease of use , with some attention paid to performance. Multiple User’s (mainframe or minicomputer) OS designed to maximize resource utilization. Workstations users connected to networks of other workstations and servers OS designed to compromise between individual usability and resource utilization. Handheld computers (Single user & may connected to networks) Their operating systems are designed mostly for individual usability and performance per unit of battery life is important as well. Embedded computers If the computers have little or no user view, OS is designed primarily to run without user intervention (minimize usability)
8
The operating system’s Role (cont.)
System View: OS is a resource allocator Manages all resources (e.g. CPU time, memory space, file-storage space, I/O devices…etc) Decides between conflicting requests for efficient and fair resource use. It is important when many users access the same mainframe or minicomputer OS is a control program Controls execution of programs to prevent errors and improper use of the computer It is especially concerned with the operation and control of I/O devices.
9
Operating System Definition
No universally accepted definition Operating System Definition: It is a software that manage the computer hardware and provide an environment for application programs to run “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program
10
Computer-System Organization
Computer-System Operation Storage Structure I/O Structure
11
Computer System Organization
Computer-system operation A general-purpose computer system consists of One or more CPU Multiple device controllers that are connected through a common bus RAM connecting to CPU and device controllers through common bus Each device controller is responsible of a specific type of device (e.g. disk drives, audio devices, and video displays). The CPU and the device controllers can execute concurrently, competing for memory cycles . So, a memory controller is provided whose function is to synchronize access to the memory.
12
Computer-system operation
13
Computer System Operation (cont.)
Computer Startup: bootstrap program is loaded at power-up or reboot Typically stored in ROM or EEPROM, generally known as firmware Initializes all aspects of system Loads operating system kernel and starts execution ROM : read-only memory, computer memory on which data has been prerecorded. Once data has been written onto a ROM chip, it cannot be removed and can only be read. EEPROM: electrically erasable programmable read-only memory. EEPROM is a special type of PROM that can be erased by exposing it to an electrical charge. EEPROM retains its contents even when the power is turned off. firmware: Firmware is software that is embedded in a piece of hardware. You can think of firmware simply as "software for hardware.“ Typical examples of devices containing firmware are embedded systems (such as traffic lights, consumer appliances, mobile phones, and digital cameras ) The firmware contained in these devices provides the control program for the device. Firmware is held in non-volatile memory
14
Computer System Operation (cont.)
Interrupt: It is a signal that gets the attention of the CPU It generated from either the hardware or the software Hardware interrupts by sending a signal to the CPU through system bus. Software interrupts by executing a special operation called a system call. A trap is a software-generated interrupt caused either by an error or a user request The interrupt is signal that gets the attention of the CPU and is usually generated when I/O is required. For example: hardware interrupts are generated when a key is pressed or when the mouse is moved. Software interrupts are generated by a program when I/O is required.
15
Storage Structure Main memory – only large storage media that the CPU can access directly Secondary storage – extension of main memory that provides large nonvolatile storage capacity Magnetic 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
16
Storage Structure (cont.)
All forms of memory provide an array of words. Each word has its own address. Interaction is achieved through a sequence of load or store instructions to specific memory addresses. The load instruction>>> moves a word from RAM to CPU’s register The store instruction>>> moves the content of a CPU’s register to RAM CPU automatically loads instructions from main memory for execution.
17
Storage Structure (cont.)
Typical instruction-execution cycle : Fetches an instruction from memory and stores that instruction in the instruction register . The instruction is decoded and may cause operands to be fetched from memory and stored in some internal register. the instruction on the operands is executed the result may be stored back in memory.
18
Storage Structure (cont.)
Storing programs and data in RAM permanently is impossible because: RAM is too small to store all needed programs and data permanently. RAM is volatile storage device that loses its contents when power is turned off.
19
Storage Hierarchy Storage systems organized in hierarchy Speed Cost
size Volatility Caching It is copying information into faster storage system. Caches can be installed to improve performance where a large access-time or transfer-rate disparity exists between two components. The design of a complete memory system must balance all the factors just discussed: It must use only as much expensive memory as necessary while providing as much inexpensive, nonvolatile memory as possible.
20
Storage-Device Hierarchy
More expensive and faster volatile can be volatile or non volatile Non-volatile
21
I/O Structure Storage (e.g. hard disk) is only one of many types of I/O devices within a computer. A large portion of OS code is dedicated to managing I/O, because of: Its importance to the reliability and performance of a system The varying nature of the devices.
22
I/O Structure (cont.) 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. Operating systems have a device driver for each device controller. This device driver understands the device controller
23
I/O Structure (cont.) Typical I/O operation: (method #1)
The device driver loads the appropriate registers within the device controller. The device controller, examines the contents of these registers to determine what action to take (such as “read “a character from the keyboard”). The controller starts the transfer of data from the device to its local buffer. Once the transfer of data is complete, the device controller informs the device driver via an interrupt that it has finished its operation. The device driver then returns control to the operating system, possibly returning the data or a pointer to the data if the operation was a read. This form of 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.
24
I/O Structure (cont.) Direct memory access I/O operation: (method #2)
This method is used to solve the problem of moving bulk data without causing OS overhead >>>> (to improve performance) What is direct memory access (DMA) ? 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, rather than the one interrupt per byte generated for low-speed devices. While the device controller is performing these operations, the CPU is available to accomplish other work.
25
Computer-System Architecture
Single-processor systems It has one CPU capable of executing a general-purpose instruction set, including instructions from user processes. Most systems use a single processor (PDAs through mainframes) Almost all systems have other special-purpose processors The use of special-purpose microprocessors is common and does not turn a single-processor system into a multiprocessor.
26
Computer-System Architecture
About special-purpose processors : They may come in the form of device-specific processors, such as disk, keyboard controllers Special-purpose processors run a limited instruction set and do not run user processes. Special-purpose processors types: Managed by the operating system— e.g. A disk-controller microprocessor receives a sequence of requests from CPU and implements its own disk queue and scheduling algorithm). This arrangement relieves CPU of the overhead of disk scheduling (advantage) special-purpose processors that are low-level components built into the hardware. Os cannot communicate with these processors; they do their jobs autonomously.
27
Computer-System Architecture
MULTIPROCESSOR SYSTEMS Also known as parallel systems, tightly-coupled systems have two or more processors in close communication, sharing the computer bus and some times the clock, memory, and peripheral devices. Advantages include: Increased throughput more work is performed Economy of scale Multiprocessor systems can cost less than equivalent multiple single-processor systems, because they can share peripherals, mass storage, and power supplies. Increased reliability the failure of one processor will not halt the system, only slow it down.
28
Computer-System Architecture
MULTIPROCESSOR SYSTEMS – (CONT.): Two types Asymmetric Multiprocessing Each processor is assigned a specific task. master-slave relationship A master processor controls the system; It schedules and allocates work to the slave processors. Symmetric Multiprocessing (SMP) Each processor performs all tasks within the operating system. All CPUs are peers Each processor has its own set of registers & cache All processors share physical memory.
29
Symmetric Multiprocessing Architecture
30
Computer-System Architecture
SMP pros (++): many processes can run simultaneously —N processes can run if there are N CPUs—without causing a significant deterioration of performance SMP Cons (--): OS must carefully control I/O to ensure that the data reach the appropriate processor. since the CPUs are separate, one may be sitting idle while another is overloaded, resulting in inefficiencies. All modern operating systems—including Windows, Mac OS X, and Linux—now provide support for SMP.
31
Computer-System Architecture
Multi-cores chips. It is a recent trend in CPU design is to include multiple computing cores on a single chip. Processors were originally developed with only one core. The core is the part of the processor that actually performs the reading and executing of the instruction. Single-core processors can only process one instruction at a time Multi-cores chips can be more efficient than multiple chips with single cores because: on-chip communication is faster than between-chip communication one chip with multiple cores uses significantly less power than multiple single-core chips.
32
A Dual-Core Design Dual-core processor contains two cores (Such as Intel Core Duo). Multi-core systems are especially well suited for server systems such as database and Web servers.
33
Computer-System Architecture
Clustered Systems: they are systems composed of two or more individual systems linked together. ……(definition) Represent another type of multiple-CPU system Like multiprocessor systems, clustered systems have multiple CPUs Clustered systems differ from multiprocessor systems, in that they are composed of two or more individual Clustering is usually used to provide high-availability service. service will continue even if one or more systems in the cluster fail
34
Operating System Structure
Multiprogramming environment: Single program cannot keep CPU and I/O devices busy at all times Multiprogramming increases CPU utilization by organizing jobs (code and data) so that the CPU always has one to execute. Multiprogramming idea is as follows: The operating system keeps several jobs in memory simultaneously . One job selected and run via job scheduling. When it has to wait (for I/O for example), OS switches to another job Eventually, the first job finishes waiting and gets the CPU back. As long as at least one job needs to execute, the CPU is never idle. RAM is too small to accommodate all jobs, the jobs are kept initially on the disk in the job pool. This pool consists of all processes residing on disk awaiting allocation of main memory.
35
Memory Layout for Multiprogrammed System
36
Operating System Structure
Time sharing (or multitasking) system: It is a logical extension of multiprogramming. In time-sharing systems, the CPU executes multiple jobs by switching among them, but the switches occur so frequently that the users can interact with each program while it is running. Time sharing requires an interactive computer system The response time should be short ( less than one second) amount of time it takes from when a request was submitted until the first response is produced. system that provides direct communication between the user and the system.
37
Operating System Structure
A time-shared operating system allows many users to share the computer simultaneously. each user is given the impression that the entire computer system is dedicated to his use. Each user has at least one separate program in memory. A process : is a program loaded into memory and executing
38
Computing Environments
Traditional Computing Client–Server Computing Peer-to-Peer Computing Web-Based Computing
39
Computing Environments
Traditional computing Office environment In past >>> PCs connected to a network or terminals attached to mainframe Remote systems access was difficult Portability was achieved by using laptops Now>>> Web portals allowing remote systems access Hand-held computers are used to provide portability Wireless networks is more common and efficient Home environment In past >>> Used to be single computer, with slow modem Now >>> multiple computers with fast inexpesive internet connection
40
Computing Environments (Cont)
Client-Server Computing Dumb terminals supplanted by smart PCs Many systems now servers, responding to requests generated by clients Server systems can be categorized as: Compute-server system provides an interface to which a client can send a request to perform an action the server executes the action and sends back results to the client. (e.g. database servers ) File-server system provides interface for clients to store and retrieve files
41
Computing Environments (Cont)
Client-server Structure
42
Peer-to-Peer Computing
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
43
Web-Based Computing Web has become popular PCs most prevalent devices
More devices becoming networked to allow web access (e.g. handheld PDA, smart phones….etc) New category of devices is appeared: load balancers The Web has increased the complexity of devices because their users require them to be Web-enabled. is a physical unit that directs computers to individual servers in a network, based on factors such as server processor utilization
44
End of Chapter 1
45
Some Helpful Notes Some terminologies : Usability = ease of use
Utilization= efficiency Performance= speed Synchronize = manage the timing System overhead = more work must be performed by the system (e.g. more load) Distributed System: refers to multiple computer systems working on a single problem. In distributed computing, a single problem is divided into many parts, and each part is solved by different computers. As long as the computers are networked, they can communicate with each other to solve the problem.
46
Some Helpful Notes (cont.)
Load & store operations between RAM & CPU is different from Load & store operations between RAM & storage devices Between RAM & CPU : The load instruction>>> moves a word from RAM to CPU’s register The store instruction>>> moves the content of a CPU’s register to RAM Between RAM & Storage Devices : The load instruction>>> moves a word from storage device to RAM. The store instruction>>> moves a word from RAM to storage device .
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.