Operating System Foundations Lecture #2. Operating System Functions Processor Hard- disk Memory Frame -buffer Sound -card Printer Mouse Application.

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
OPERATING SYSTEM OVERVIEW
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Figure 1.1 Interaction between applications and the operating system.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
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.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
System Calls 1.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Implementing Processes and Process Management Brian Bershad.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
COP 4610 Introduction to Operating Systems. Chapter 1 - Introduction OS - Layer between the hardware and user programs (Figure 1.1) OS - The ultimate.
Lecture Topics: 10/29 Architectural support for operating systems –timers –kernel mode –system calls –protected instructions.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
4P13 Week 2 & 3 Talking Points 1. Kernel Processes 2.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Operating Systems Engineering Based on MIT (2012, lec3) Recitation 2: OS Organization.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
12/2/091 What is an Operating System Andy Konwinski CS61CL Dec 2, 2009 Lecture 13 UCB CS61CL F09 Lec 13.
Processes 2 Introduction to Operating Systems: Module 4.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
© D. J. Foreman, Structure of an O/S. © D. J. Foreman, Overview  Required functionality –Handle interrupts –Manage resources Processes.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Memory Management Paging (continued) Segmentation
Operating Systems CMPSC 473
Protection of System Resources
Lecture Topics: 11/1 Processes Process Management
Day 08 Processes.
Day 09 Processes.
Overview of today’s lecture
CS 286 Computer Organization and Architecture
CS703 - Advanced Operating Systems
Memory Management Paging (continued) Segmentation
Computer-System Architecture
Module 2: Computer-System Structures
Direct Memory Access Disk and Network transfers: awkward timing:
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Architectural Support for OS
Computer Organization
Processes Hank Levy 1.
Processes and Process Management
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
Module 2: Computer-System Structures
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Processes David Ferry CSCI 3500 – Operating Systems
Operating Systems: A Modern Perspective, Chapter 6
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Architectural Support for OS
Processes Hank Levy 1.
Module 2: Computer-System Structures
Department of Computer Science
Module 2: Computer-System Structures
Memory Management Paging (continued) Segmentation
Presentation transcript:

Operating System Foundations Lecture #2

Operating System Functions Processor Hard- disk Memory Frame -buffer Sound -card Printer Mouse Application

Operating System Functions Processor Hard- disk Memory Frame -buffer Sound -card Printer Mouse Application Operating System

OS Functions OS as layer of protection Process 1 Process 2 Process 3 Protect Memory I/O

OS Protection Don’t let any single application hog the processor Only the OS manages the clock Set timers Kick out a process when the time expires Take control of the processor every so often when there are system-wide things to do (I/O, memory management, scheduling).

OS Protection Privileged Instructions Only access via a “privilege mode” Make a distinction between User and “supervisor” mode Only supervisor mode can mask interupts Only supervisor mode can access memory management structures Only supervisor mode can do I/O

Operating Systems Functions OS as Abstraction Layer System Call Interface Systems Calls For interacting with Hardware and other processes open(file, read_rights) read (file_id, block_number) alarm(up_call, seconds) send_message(socket_id, message)

Scheduling Processor ALU Main Memory Application Operating System Scheduler

Scheduling Process number Current state Program Counter CPU Registers Memory Mapping Misc Info (open files, name of executable, devices owned) Next and prev PCB

Context Switching Process A Process BOS Save state A Restore state B Save state B Restore state A

Memory Management Process 1 Process 2 Process 3 0x0000 0x00F0 0x00FF 0x0FFF Process1 From To 0x0dfff 0xfdfff Process2 ………… Process3

Memory Management An alternative way and intuitively easier to understand Process 1: Memory Segment 1,2 Process 2: Segment 3 Process 3: Memory segment 7,8,9 Every memory access is checked in hardware to verify that you are only accessing your own memory segment OS provides IPC!

I/O Operating System as a multiplexer of I/O devices Protect Resources, yet let processes share them Privilege Mode User Mode System Calls, Interrupts Set User mode (privilges Instruction)

I/O Open(device, rights) Privileged Instruction Process -- > Open Devices Table