CS U480: Systems & Networks 1. Introduction Donghui Zhang

Slides:



Advertisements
Similar presentations
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Advertisements

Operating Systems Components of OS
Operating-System Structures
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
Interactive lesson about operating system
OS Components and Structure
COMP1214 Systems & Platforms: Operating Systems Concepts Dr. Yvonne Howard – Rikki Prince – 1.
Operating Systems (CSCI2413) Lecture 2 Overview phones off (please)
Operating System.
Processes Management.
Operating System Structures
CS 345 Computer System Overview
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Chapter 1: Introduction
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Os31 Chapter 3 Operating-System Structures. os32 Outlines System Components Operating System Services System Calls System Programs System Structure Virtual.
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Abhinav Kamra Computer Science, Columbia University 3.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 3: Operating-System Structures.
Lecture By : Rupinder Kaur Lect. IT SRS Govt. Polytechnic college Ludhiana Topic : Overview of Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 3: Operating-System Structures System Components OS Services System.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
Introduction Operating Systems. No. 2 Contents Definition of an Operating System (OS) Role of an Operating System History of Operating Systems Classification.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
UNIX and Shell Programming (06CS36)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz and Galvin  Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services System Calls.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
3.1 Operating System Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
OS, , Part I Operating - System Structures Department of Computer Engineering, PSUWannarat Suntiamorntut.
1 CSE Department MAITSandeep Tayal Operating-System Structures System Components Operating System Services System Calls System Programs System Structure.
UNIX and Shell Programming
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 3 Operating-System Structures Slide 1 Chapter 3 Operating-System Structures.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
System Components Operating System Services System Calls.
Operating System Structure Lecture: - Operating System Concepts Lecturer: - Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 0: Historical Overview.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives To provide a grand tour of the major operating.
Module 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Chapter 3: Operating-System Structures
Applied Operating System Concepts
Module 3: Operating-System Structures
Chapter 1: Introduction
Operating System Structure
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
Chapter 3: Operating-System Structures
Operating System Concepts
Basic Concepts Protection: Security:
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Chapter 2: Operating-System Structures
Introduction to Operating Systems
Chapter 2: Operating-System Structures
Operating System Concepts
Presentation transcript:

CS U480: Systems & Networks 1. Introduction Donghui Zhang

Syllabus Instructor: Donghui Zhang Class page linked from my home page: http://www.ccs.neu.edu/home/donghui

Your Background CSU380: Computer organization C/C++ programming System architecture: Processors, memory, I/O devices Processor architecture: ALU, instruction execution Assembly-level programming C/C++ programming Familiarity with the C language and the standard C library Please consult with me if you are unsure your background is sufficient

Why Programming For CS: must. For IS: also important. A pilot must know how to fly an airplane. For IS: also important. A project manager needs to have technical background. Bill Gates used to be a superb programmer. Guest speaker: Prof. Hafner.

Why C (and not Java) Talked with Mr. Feuer and Prof. Hafner. We provide guidance to what you should learn. (If you say “give us A without any exam or project”…) Most OS are implemented in C. Java hides many low-level details. This is a place to strengthen your C skills.

What is an Operating System? An operating system is a program that acts as an intermediary between a user of a computer and the computer hardware. Goals: Execute user programs and make solving user problems easier. Make the computer system convenient to use. Performance measures: Throughput: The total amount of work done over a period of time. Turnaround: The total time it takes to complete a job.

Concept Map Applications GUI Console OS CPU ALU Registers Memory Peripherals Disks Keyboard Mouse Display

Software Layers Application c = getc() Library read(…) Operating System kb_driver_read(…) Device driver read_device(…)

Compilation vs. Execution During compilation, statements in higher-level languages are converted into machine code During execution, machine code is interpreted by a processor Memory Compiler High-level language program Assembly language Assembler Machine code Link editor Libraries of Executable Shared Libraries Operating System Device Drivers

Evolution of the OS In the beginning Whirlwind at MIT PDP-1 from DEC Altair from MITS Program stored in a hardware patch board or toggled in using switches Program can access all of memory Program starts at location zero Loading programs by hand is slow and error-prone and painful, so . . . n Program Memory

Evolution of the OS: The Loader Create a very short program to load longer programs Toggle in bootstrap loader Primitive loader may load in program or a more complex loader to read from cards or tape Loading from cards is very slow, often took longer to load than to run, wasting (expensive) processor cycles, so . . . n Loader Program Memory

Evolution of the OS: Batch Processing Batch Loader Jobs are spooled on tape While one batch of jobs is running, card reader writes next batch of jobs on tape Jobs are read sequentially from tape into memory Tape is still relatively slow compared to processing Program Memory

The Concept of a Job With the introduction of programming languages, a translator is needed to convert a program into machine code When a program is stored on cards in the programming language, e.g., assembler or Fortran, it must be translated before it can be run Example: To run a program written in Fortran Load (machine code for) Fortran compiler Run compiler: Compiler reads program, writes machine code Load (machine code for) program Run program

Evolution of the OS: Multiprogramming Load next program while previous program is running But now both programs can’t begin at address zero (in fact, starting address isn’t known in advance) Solutions? Programs that perform lots of I/O waste (expensive) processor cycles n Loader Program 2 Program 1 Memory

Evolution of the OS: Multitasking Share execution time among programs When one program starts I/O, let the other run. What is needed to switch from one program to another? A program bug in one program can overwrite another program, or the system programs and data, so . . . n Loader + scheduler System data Program 2 Program 1 Memory

Evolution of the OS: Protection Run programs in separate address spaces System programs need to cross address spaces. System runs in privileged mode. The more programs in memory, the less memory available for each program, so . . . Memory Loader, scheduler, memory mgr Program 1 Program 2 System data Program 3 n

Evolution of the OS: Virtual Memory Address space implemented in both main and secondary memory Broken into pages A program’s address space is a set of pages. The address space for a program may be larger than main memory! Pages are swapped in and out of main memory as needed. Memory Loader, scheduler, memory mgr, resource mgr Disk n

OS Diversity Great diversity of programmable hardware Super computers: simulation, scene generation, data mining Servers: database, web, video Personal: desktop, laptop Embedded: PDA, phone, media device Nature of the OS depends on Application mix Hardware capability Real-time requirements With the proliferation of embedded systems, most processors do not run a general purpose OS

OSes are complex programs developed over many years by many people They confront common problems that reappear in other contexts The problems have been formalized A variety of solutions have been proposed and implemented Choosing a solution requires evaluating tradeoffs of space, time, and complexity OSes are a rich source of well-designed sample programs We will study OSes by exploring common components Understand the motivation for each component Understand the tradeoffs for each implementation

Common System Components Process Management Main-Memory Management File System I/O System Network Management Let’s take a high-level tour of these components

Process Management A process is a program in execution To accomplish its task, a process needs certain resources: CPU time Memory Files I/O devices. The OS is responsible for the following activities in connection with processes: Process creation and deletion Process suspension and resumption Mechanisms for: Process synchronization Inter-process communication

From Program to Process Memory Compiler High-level language program Assembly language Assembler Machine code Link editor Libraries of Executable Shared Libraries Operating System Device Drivers

Memory Management Main memory is a large array of words Each word (or, often byte) has its own address Data in memory is shared by the CPU and I/O devices Main memory is (usually) volatile It loses its contents in the case of system failure. The OS is responsible for the following activities in connection with memory management: Keep track of which parts of memory are currently being used and by whom. Decide which processes to load when memory space becomes available. Allocate and deallocate memory space as needed.

Memory Management (cont.) Loader, scheduler, memory mgr Program 1 Program 2 System data Program 3 n

Secondary-Storage Management Secondary storage is (usually) a large array of blocks Each block has its own address Data is moved between main memory and secondary storage in units of blocks Secondary storage is non-volatile and can be very large Disks are the most common in general purpose systems Memory cards and stick are common on portable devices The OS is responsible for the following activities in connection with secondary storage management: Free space management Storage allocation For disks, scheduling of block transfers

Secondary-Storage Management (cont.) Memory Loader, scheduler, memory mgr, resource mgr Disk n

File Management A file is a collection of related information Files are stored within a file system From the view of most systems, a file is an array of bytes The OS is responsible for the following activities in connections with file management: File creation and deletion Directory creation and deletion Support of primitives for manipulating files and directories Mapping files onto secondary storage. File backup on stable (nonvolatile) storage media

I/O System Management Input/Output refers to the movement of data between main memory and peripheral devices Devices vary widely in their operation and behavior Devices are partitioned into classes to factor common behavior A device driver translates between general OS operations and device-specific commands I/O managements consists of A buffer-caching system A general device-driver interface Drivers for specific hardware devices

I/O System Management (cont.)

Network Management Networking allows distinct computer systems to exchange data Communication takes place using a protocol Networked computers vary widely in their degree of coupling: They may share a common OS and processes may be visible across systems They may share nothing except a communication port Networking allows users to access to non-local resources, allowing: Computation speed-up, through special purpose hardware or parallel processing Availability of data from other systems Enhanced reliability through redundancy

Network Management (cont.)