Secure Operating Systems Lesson 3: OS Structures.

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 421, Operating Systems Operating-System Structures.
Advertisements

Chap 2 System Structures.
Operating System Structure
Operating-System Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 2: Operating-System Structures
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Common System Components
CS4315A. Berrached:CMS:UHD1 Operating System Structures Chapter 3.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
1 Chapter 2: Operating System Structures Dr. İbrahim Körpeoğlu Last Update: Sep 30, 2011 Bilkent University Department.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 2: System Structures Operating System Services.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: System Structures Operating System Services User Operating System Interface.
3.1 Operating System Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
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.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
Chapter 2. System Structures
Introduction to Operating Systems Prepared by: Dhason Operating Systems.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Programs (p73) System programs provide a convenient environment.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
2.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 2: System Structures To describe the services an operating system provides.
1 Chapter 2: Operating-System Structures. 2 Operating System Services User Operating System Interface System Calls Types of System Calls System Programs.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
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.
Chapter 3: Operating-System Structures
Introduction to Operating Systems Concepts
Topic 2 (Textbook - Chapter 2) Operating-System Structures
Chapter 2: Operating-System Structures
Computer System Structures
Module 3: Operating-System Structures
Operating System Structures
Kernel Design & Implementation
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Lecture 4: Operating System Structures
Chapter 2: System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: System Structures
Chapter 3: Operating-System Structures
Chapter 2: Operating-System Structures
Operating Systems Lecture 3.
Outline Chapter 2 (cont) OS Design OS structure
Chapter 2: Operating-System Structures
OPERATING SYSTEMS STRUCTURES
System calls….. C-program->POSIX call
Chapter 2: Operating-System Structures
Presentation transcript:

Secure Operating Systems Lesson 3: OS Structures

What Services Does an OS provide?  An environment for the execution of programs… which means what?  Right: a set of APIs that allow a programmer to leverage services controlled by the OS

User-facing  The GUI  Program Execution  I/O Operations  File-system manipulation  Comms  Error Detection

Under the Hood  Resource Allocation  Accounting  Protection and Security

The OS Interface  Of course, the GUI  But also the command interpreter and shell Compare and contrast Unix and Windows on this  The Interface to programs is the API This requires a change in domain The API isn’t (usually) the same as the underlying system call  Let’s walk through a simple fopen() Why is this an OS function? How does it relate to the OS? Why?

Example: CreateFileA?W  HANDLE WINAPI CreateFile( _In_ LPCTSTR lpFileName, _In_ DWORD dwDesiredAccess, _In_ DWORD dwShareMode, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _In_ DWORD dwCreationDisposition, _In_ DWORD dwFlagsAndAttributes, _In_opt_ HANDLE hTemplateFile );

How the Call Works  Three ways Often, via the stack Or via registers Or via a pointer to a block of memory

The Confused Deputy  We’ll look at this in much more detail later, but the OS can be thought of as being deputized by an application to do work for hire  This is a risky proposition

System Programs/Utilities  May not need more privilege  Handle things like: File management Status information File modification Programming language support Program loading and execution Comms – Message passing and Shared Memory

OS Design Goals  Perhaps where we fail most is when we set our design goals: poor goals lead to a bad design, and no wonder it doesn’t work  Performance – especially worst case – is often overlooked  We tend to “hand wave” over requirements in the OS

Mechanisms and Policies  Mechanisms are how something gets done  Policies define what to do…  Easily to confuse; when we mix them, we end up with inflexible systems

OS Structure  Simple layers, like MSDOS Application Programs Resident Programs MS-DOS Devices ROM BIOS

Or Layers (like Unix) The Users Shells and Commands System Call Interface SignalsFile SystemCPU Scheduling Kernel Interface to Hardware Terminal ControllersDevice ControllersMemory Controllers

Microkernels  A large kernel is dangerous from a security perspective (why?)  Possible solution is the microkernel Move everything you can from the lowest domain The kernel focuses on message passing Makes it easier to expand But performance can be problematic

Modular Kernels  A standard form for kernel loadable modules  Runtime loading allows you to add when you need things…  Problem: if you load my code into your kernel… yes… ahem…

OS Debugging  A tricky business (think about it!)  VMs can help  Core Dump: dump as much state as able at a critical error point  OS debugging has a number of challenges related to complexity, concurrence and attribution Typically, we do some type of remote debugging

Assignment  Read Chapter 2 of OSC  Read “Protection” by Butler Lampson  A word to the wise – don’t behind on the reading, because there’s a lot of it. I’ll set less assignments based on that, but the material will be on the final.

Questions & Comments  What do you want to know?