How To Understand And Understand An Operating System In C Programming



Similar documents
Chapter 1: Introduction. What is an Operating System?

Operating Systems 4 th Class

Types Of Operating Systems

Overview and History of Operating Systems

3 - Introduction to Operating Systems

How To Understand The Principles Of Operating Systems

Operating Systems Overview

Contents. Chapter 1. Introduction

Operating Systems Introduction

Operating Systems. Rafael Ramirez (T, S)

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Operating Systems: Basic Concepts and History

Operating Systems Prof. Ashok K Agrawala

CSC 2405: Computer Systems II

CHAPTER 15: Operating Systems: An Overview

Operating System Tutorial

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Chapter 11 I/O Management and Disk Scheduling

Computers: Tools for an Information Age

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Principles of Operating Systems CS 446/646

1. Computer System Structure and Components

EECS 678: Introduction to Operating Systems

Computer-System Architecture

Chapter 2: OS Overview

Overview of Operating Systems Instructor: Dr. Tongping Liu

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Introduction. System Calls

COURSE OUTLINE Survey of Operating Systems

Why study Operating Systems? CS 372. Why study. Why study. Introduction to Operating Systems

Operatin g Systems: Internals and Design Principle s. Chapter 10 Multiprocessor and Real-Time Scheduling Seventh Edition By William Stallings

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Chapter 1: Introduction. Chapter 1: Introduction. Operating System Concepts, 7th Edition. Objectives

OPERATING SYSTEM - VIRTUAL MEMORY

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Operating Systems. III. Scheduling.

Operating Systems PART -A

Computer Science 4302 Operating Systems. Student Learning Outcomes

Operating System Software

CPU Scheduling. Core Definitions

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Operating System Structures

How To Virtualize A Storage Area Network (San) With Virtualization

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

Networking Operating Systems (CO32010)

Intel DPDK Boosts Server Appliance Performance White Paper

Introduction. What is an Operating System?

CS550. Distributed Operating Systems (Advanced Operating Systems) Instructor: Xian-He Sun

Kernel Optimizations for KVM. Rik van Riel Senior Software Engineer, Red Hat June

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Distributed Systems LEEC (2005/06 2º Sem.)

Embedded Systems. 6. Real-Time Operating Systems

Scaling Networking Applications to Multiple Cores

Chapter 11 I/O Management and Disk Scheduling

Chapter 6, The Operating System Machine Level

Undergraduate Course Syllabus

OPERATING SYSTEMS STRUCTURES

How To Understand The History Of An Operating System

CHAPTER 1 INTRODUCTION

ELEC 377. Operating Systems. Week 1 Class 3

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

Far-western University Central Office, Mahendranagar Operating System

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

Symmetric Multiprocessing

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software

EECS 750: Advanced Operating Systems. 01/28 /2015 Heechul Yun

ICS Principles of Operating Systems

Part A of the Syllabus

Lecture 6: Interrupts. CSC 469H1F Fall 2006 Angela Demke Brown

Chapter 5: System Software: Operating Systems and Utility Programs

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Devices and Device Controllers

IT 342 Operating Systems Fundamentals Fall 2014 Syllabus

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Processes and Non-Preemptive Scheduling. Otto J. Anshus

CSC 341, section 001 Principles of Operating Systems Spring 2015 Monday/Wednesday 1:00 PM 2:15 PM

Have both hardware and software. Want to hide the details from the programmer (user).

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

SYSTEM ecos Embedded Configurable Operating System

CS161: Operating Systems

Client/Server and Distributed Computing

CIS 3515 Mobile Application Development Instructor:

Transcription:

ELEC 377 Operating Systems Thomas R. Dean

Instructor Tom Dean Office:! WLH 421 Email:! tom.dean@queensu.ca Hours:! Wed 14:30 16:00 (Tentative)! and by appointment! 6 years industrial experience

ECE Rep Election/Volunteer

Required Textbooks Operating System Concepts, 9th Ed! Silberschatz, Galvin, Gagne 7th and 8th editions are acceptable. Some Sort of C Reference (not C++) is required - You can use what you feel comfortable with

Notes! You are responsible for what is in the text, what is on the slides and what is said in class.! if you choose to skip a class, make sure you get notes from someone that was there (or from podcast)!!! I have added material not in the textbook

Marking Scheme! 5 Assignments done in C/bash on Linux!! (25% of total mark)! 3 Quizzes! (8% each, 24% of total mark)! Final Exam (51% of total mark)

Assignment Marking Scheme! Questions + Programming Programming Part:! Documentation (2 parts)! 40%! Description of the problem and your solution! Structure and Clarity of Approach! 20%! Code must be well structured, clear and! commented.! Testing and Correctness! 40%! Test cases and output must be included in what is handed in. Must also include a written argument about the completeness of your testing

Quizzes! There will be 3 quizzes, each 20 minutes long! Quizzes will be given in class at the beginning of the lecture! Each quiz will cover the lecture material from the previous quiz up to and including the immediately preceding class. You are responsible for all material covered in class. Some subjects have extra material in class not in the textbook.! The tentative quiz dates are Fridays (Week 3,6 and 9)! Sept 27! Oct 18! Nov 8

Tutorial and Labs! Tutorial and Labs are combined in the Teaching Studio (ILC 213)! One Section, 11:30 Wednesdays (3hrs)! really 2 hours! Teams of two! Please choose a partner by next monday and send me email with your partners name.! most labs are multiple weeks long! important to be prepared! The first lab (tomorrow) is an Orientation Lab, we will go through a simple exercise of modifying the Linux kernel. Even though there are no marks, it is important you be there to make sure that your environment works.

Tutorial and Labs! There will be an extra tutorial this week. This will be an in depth tutorial of C programming for the course. Attendance is optional. However if you have no C programming experience beyond ELEC 278 you should be there.

Why Study Operating Systems?! Sophisticated Users! When programming, operating issues become relevant. Threads, priority, sharing.! Car Driver vs. Airplane Pilot Model Adapted from: Transport Canada Flight Training Manual 3rd ed.

Why Study Operating Systems?! Interaction between Hardware and OS! Modern hardware contains many features needed to support operating system functionality! Memory/Process/IO Protection! Interrupt, Cache and Virtual Memory features Hardware designers need to understand OS

Why Study Operating Systems?! Modern Embedded Systems! There is a continuum between small devices and more sophisticated devices! For small devices such as Interact Terminals, minimal OS support is needed (ELEC 371)! Fly-by-wire systems need more support! Growth in consumer devices (DVRs, LG Fridge)! Informed User! A lot of misinformation out there from all parties.! You may have to choose and recommend for employers and clients

DVR What is it?! Digital Video Player! Customized Guide (record program by name)! Phone network connection for correct time and content guide! Pause live events

DVR Requirements DVR Video In Video Out

DVR Requirements Video In DVR - Remote and other user I/O Video Out

DVR Requirements Video In DVR - Remote and other user I/O - Net: Time and Content Info Video Out Phone /Net

DVR Requirements Video In DVR - Remote and other user I/O - Net: Time and Content Info - Local Storage (organization) Video Out Phone /Net

DVR Operating System! Requirements! Video I/O! User I/O! Networking (on demand)! Storage (file system)! Video Data! Content Info! Operating Software

DVR Operating System! Requirements! Video I/O! User I/O! Networking (on demand)! Storage (file system)! Video Data! Content Info! Operating Software! Everything required for an operating system

DVR Operating System! Requirements! Video I/O! User I/O! Networking (on demand)! Storage (file system)! Video Data! Content Info! Operating Software! Everything required for an operating system rather than develop from scratch, the first DVR (TiVo) adopted an existing operating system (Linux)

What is an Operating System?! A Program that acts as an intermediary between a user and the computer hardware! Goals:! Execute user programs and make solving user programs easier! Make the computer system more easier to use! Use the computer hardware in an efficient manner

Computer System Components User 1 User 2 User N Application 1 Application 2 Application N Operating System Computer Hardware

What is an Operating System? Definitions:! Resource Allocator! Manage and allocate resources! Provide a uniform interface to similar hardware! Control Program! Controls the execution of user programs! Controls operation of I/O devices (i.e. disk)! Kernel! The one program running at all times! IPL Initial Program Load

Single Program Systems! Early Batch Mainframe Systems pool of jobs each run sequentially.! MS-DOS! Single Process at a Time! CPU is idle while waiting for I/O wasted cycles Operating System User Program Area! Minimal hardware/os requirements

Multiprogram Systems! Later Batch Mainframe Systems! Pool of Jobs! More than one program in memory at a time! When one program is doing I/O, another gets the CPU! eliminate wasted cycles! More hardware/os requirements! OS provides I/O routines! Memory management and security! CPU scheduling! Device Allocation

Time Sharing/Interactive! CPU is shared between several programs kept in memory.! programs are swapped between disk and memory.! sometimes only parts of programs are swapped.! Usually more than one user at a time! More hardware/os requirements! Communication with user (terminal, WIMP)! Scheduling differences from batch multiprocessing

Parallel Systems! tightly coupled! processes share memory and I/O! Advantages! Increased throughput! Reliability! Symmetric! Each processor identical, process run on whatever processor is available (may run on more than one during it s lifetime)! Asymmetric! Master slave relationship

Distributed Systems! Distribute computation among several processors! loosely coupled! each process has own memory, I/O devices! communication infrastructure! Advantages! resource sharing/load sharing! reliability! Client Server! Peer to Peer! Clustered Systems

Real Time Systems! Usually in embedded systems! well defined fixed time constraints! Hard real time! hard limits that must be met or the system fails! Soft real time! A missed deadline does not mean system failure, but value of result decreases with time. Example: Real time video

Computer System Structures

Computer System Structures CPU Disk Controller Video Controller Memory Controller Memory

Computer System Structure! CPU and devices execute concurrently! Each controller is in charge of a one or more devices of a similar type! Device controller has some sort of local buffer that is used to communicate data to and from the device! Either CPU or device controller moves data to and from main memory! Interrupt used to indicate the operation is complete

Interrupts! Suspends execution of the current program! (saves current execution location)! Transfers control to the interrupt routine! Determines which controller generated the interrupt! Polling! Vectored Interrupts! Separate routines for each type of interrupt

Interrupts and Traps! Interrupts are asynchronous! They can happen at any time! Traps are like interrupts, but are generated by the program executing.! Division by Zero, other exceptions! Trap instruction to request a service from the operating system (Friday s lecture)! Traps typically use the same mechanism as interrupts for management.

I/O Paradigms! Synchronous I/O! control returns to program only after I/O is complete! wait instruction or polling! more efficient to give the CPU to another process! Common in multi user systems! If no process ready to run, the entire system waits.! Asynchronous! return directly to program! program registers a notification routine to be notified when the I/O is done (or asks later)! Common in single user systems (Windows, Macintosh)

I/O Queues! More than one process may request I/O from a controller (e.g. more than one program reading a file)! If the device is busy, then the I/O request is queued. When the interrupt for that device occurs, the next request is removed from the queue and given to the device controller.! In the example, when one block has been read for one program, the next read request is passed to the disk controller