ITFN 2601 Introduction to Operating Systems Lecture 2 Computer Hardware Review OS Concepts Overview.

Slides:



Advertisements
Similar presentations
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Advertisements

Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Operating System Structure
Introduction CSCI 444/544 Operating Systems Fall 2008.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Chapter 1: Introduction
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
1 CIS450/IMSE450/ECE478 Operating Systems Winter 2003 Professor Jinhua Guo.
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 7 Interupts DMA Channels Context Switching.
Figure 1.1 Interaction between applications and the operating system.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Chapter 1 Introduction 1.1 What is an operating system
1 What is an operating system? CSC330Patricia Van Hise.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Operating Systems What do you have left on your computer after you strip away all of the games and application programs you bought and installed? Name.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Computer Organization
CS 6560 Operating System Design Lecture 1. Overview 1.1 What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4.
Computer Processing of Data
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
1 CS503: Operating Systems Spring 2014 Dongyan Xu Department of Computer Science Purdue University.
4 Linking the Components. © 2005 Pearson Addison-Wesley. All rights reserved Figure 4.1 This chapter focuses on how the hardware layer components are.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
1 Operating System Overview. 2 Today’s Objectives Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental.
Operating Systems: History, Hardware & Concepts Ch Tuesday, January 16, 2007.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 1 Introduction 1.1 What is an operating system
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
1 Introduction. 2 A computer system consists of –hardware –system programs –application programs.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
ITFN 3601 Operating Systems Computer Hardware Review OS Concepts Overview.
1.1 Operating System Concepts Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computer Science/Ch.3 Data Manipulation 3-1 Chapter 3 Data Manipulation.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
Motherboard A motherboard allows all the parts of your computer to receive power and communicate with one another.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
1 Advanced Operating Systems - Fall 2009 Lecture 2 – January 12, 2009 Dan C. Marinescu Office: HEC 439 B.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Lecture on Central Process Unit (CPU)
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
Advanced Operating Systems Introduction and Overview.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Operating Systems: History, Hardware & Concepts Ch 1.4 & 1.5 Thursday, January 18, 2007.
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real.
CT101: Computing Systems Introduction to Operating Systems.
Introduction to Operating Systems Concepts
Operating System Overview
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Today’s agenda Hardware architecture and runtime system
Presentation transcript:

ITFN 2601 Introduction to Operating Systems Lecture 2 Computer Hardware Review OS Concepts Overview

Agenda Flavors of OS Hardware Review OS Concepts Overview System Calls Various OS Approaches

Flavors of OS Mainframe Server Multiprocessor Personal Computer Real-Time Embedded Smart Card

Mainframe OS High-end I/O capacity disks Gigabytes of data High-end web servers B2B (business to business) E-commerce High-speed VR/FMV Rendering Many small, simultaneous jobs

Server OS Large personal computers (kahuna, zidane, etc.) Print, file servers for small businesses Web servers Can load balance these to increase performance UNIX, Linux, Win2000 Server OS

Multiprocessor OS Connect multiple computers together Share/distribute jobs among multiple machines/processors Specialized protocols for managing communication Win2000 Advanced Server

Personal Computer OS Focus on single user, multiple jobs What you’re running on your machine Win9x, Win2000 Pro, Linux

Real-Time OS Time dominates these machines’ specs Data collection from production lines, factory machinery Hard real-time: time critical in all instances Soft real-time: OK to drop occasionally

Embedded OS Personal Digital Assistants TVs, microwaves, mobile phones Very small OS, embedded on chip PalmOS, WinCE

Smart Card OS Credit card sized devices Specialized OS for specialized purposes E-payment cards (e-cash cards) Some JVM coming into play

Hardware Review CPU Memory Display Controller Keyboard Controller Floppy Controller Hard Disk Controller Display Keyboard Floppy Hard Disk Bus

Hardware Review Processors Memory I/O Devices Bus

Processors Brain of the computer Fetch, decode, execute cycle Registers Program Counter (PC) Stack Pointer (SP) Pipelining improves performance, but complexities of “rolling back” appear Kernel vs. User Mode (enables establishing limitations of instruction set available)

Memory Trade off of speed vs. cost/size Registers (on processor) Cache (processor) Cache (mainboard) Main Memory Disk Other Network Cache/Machines Tape Speed decreases Cost increases

I/O Devices Typically consist of two parts: Controller Device Controller manages & presents the API of the device to the OS The software that “talks” to the controller is called a device driver

Memory Allocation We need a protective and fair way of allocating and resizing memory blocks for processes/jobs Two sections of memory Code (typically static) Data (volatile) OS Program Code User 1 Data User 2 Data Limit Base Limit Base Limit Base

Computer Memory The CPU is often referred to as the brain of the computer. This is where all the actual computing is done. The chipset supports the CPU. It usually contains several "controllers" which govern how information travels between the processor and other components in the system. Some systems have more than one chipset.

Computer Memory The memory controller is part of the chipset, and this controller establishes the information flow between memory and the CPU. A bus is a data path in a computer, consisting of various parallel wires to which the CPU, memory, and all input/output devices are connected. The memory bus runs from the memory controller to the computer's memory sockets

Computer Memory Memory speed is sometimes measured in Megahertz (MHz), or in terms of access time - the actual time required to deliver data - measured in nanoseconds (ns). A computer's system clock resides on the motherboard. It sends out a signal to all other computer components in rhythm, like a metronome. Cache memory is a relatively small amount (normally less than 1MB) of high speed memory that resides very close to the CPU. Cache memory is designed to supply the CPU with the most frequently requested data and instructions.

Invoking Device Actions Busy wait – execute a kernel-level system call and wait (ties up the processor  ) Ask the device to generate an interrupt (signal that it’s done or failed) Doesn’t tie up the processor Adds complexity DMA – Direct Memory Access Bypasses the use of the processor Allows the device to write directly to memory once the “rules of the road” are established

Bus Communication “highway” for all data to travel upon Multiple buses exist in modern machines Cache (fastest) Local (on mainboard –other busses connect to it) Memory PCI (successor of ISA - high-speed I/O) SCSI (high-speed scanners & disks) USB (slow peripherals) IDE (disks, etc.) ISA (slowest – legacy)

OS Concepts Processes Deadlock Memory Management I/O Files Security

Processes Defined as a “program in execution” AKA a “job” Contain Instructions (code segment) SP, PC, registers, file handles Data segment Processes can spawn subprocesses & threads The OS must ensure fairness & protection, timeslicing & managing multiple processes at a time

Deadlock Two or more processes “stalemated” because they can’t make progress Process A Has resource 1 Waiting on resource 2 Process B Has resource 2 Waiting on resource 1

Memory Management Providing protection of one process’ memory section from another process (security) Providing a fair allocation of memory to multiple processes Swapping memory to disk as needed

Input/Output All OS must manage I/O devices Two categories: Device independent Device dependant (device drivers)

Files System calls Create, remove, read, write, etc. Directories & subdirectories Create, remove, rename, move, etc.

Security Allocate permissions Directories Files Example UNIX policies to consider: Read, Write, Execute User, Group, World

System Calls Services that the OS provides to the user Set of API that user-level programs may invoke Flavors of System Calls UNIX Win32

UNIX System Calls pid = fork()creates child process exit()terminates process fd = open(file, …)opens file s = mkdir(name, mode)creates directory s = chmod(name, mode)sets file/dir permissions s = kill(pid, signal)sends signal to process

Win32 System Calls CreateProcess(…)creates new process ExitProcess(…)terminates process CreateFile(…)opens file CreateDirectory(…)creates directory

Approaches to OS Monolithic Virtual Machines Client-Server (microkernel)

Monolithic OS Architecture OS written as a set of procedures Each procedure has well-defined interface (parameters) Very little structure or information hiding

Virtual Machine OS Architecture Replicate the hardware within software Trap OS calls and translate/handle them Breaks down if you make direct I/O calls Slow Other approach: JVM (define an alternate instruction set and translate to various OS)

Client-Server OS Architecture Implement as much as possible in user- level modules The OS is as small as possible It only serves to translate and message pass OS-level calls to service processes

Summary Various levels of OS complexities/sizes exist (mainframe to smart cards) Important to know your hardware Processors, memory, I/O, buses Important topics in OS forthcoming Processes, deadlock, mem mgmt, files, etc. System calls provide an API to user-level programs Varied OS architecture approaches Monolithic, VM, client-server

FIN