Architectural Support for A More Secure Operating System

Size: px
Start display at page:

Download "Architectural Support for A More Secure Operating System"

Transcription

1 Architectural Support for A More Secure Operating System Edward L. Bosworth, Ph.D. TSYS Department of Computer Science Columbus State University Columbus, GA

2 A Few Comments The term Secure Operating System is not used in current academic literature. The favored terms are: 1. More secure operating system, 2. Trusted operating system. This avoids the significant and important question, What is Security?.

3 Two Approaches Trusted Operating System Define a logical trust model, and a series of tests that determine compliance with that trust model. Design a system to implement that model. More Secure Operating System Develop hardware and software systems that will demonstrably increase the OS security, without having a security or trust goal in mind. More secure is better. Both approaches achieve their effect by denying access to 1. Certain classes of instructions, and 2. Certain segments of memory and sensitive files.

4 Privileged Instructions Computer instructions are usually divided into two classes: user instructions and privileged instructions. User instructions are those that are not privileged. Instructions can be labeled as privileged for a number of reasons. Confusion Instructions such as input / output instructions can cause difficulties if executed directly by the user. Consider output to a shared print device. Security Instructions such as memory management can cause severe security problems if executed by the user. I can directly read and corrupt your program memory.

5 Protection Rings One of the earliest protection mechanisms These are also called access modes. In an architecture that supports protection rings, the CPU is always executing in one of these rings or privilege levels. These modes are used in controlling access to memory, I/O devices, and other system resources.

6 Rings of Protection The simple security models in a computer call for rings of protection. The protection rings offered by the Pentium 4 architecture (IA 32) are fairly typical. Attempts to read data at higher (less protected) rings are permitted. Attempts to read data at lower (more protected) rings are not permitted and cause traps to the operating system.

7 Architectural Support for Protection Rings There is always a special register, often called Program Status Register, with a bit field indicating the current ring. A two bit field would indicate four protection rings. We need a trap instruction, to allow a user program to access services provided only by programs with more privilege. We need a Change Mode Instruction for use by the operating system. Scenario of the Change Mode Instruction: 1. The User Program generates a trap, signaling the O/S, 2. The O/S processes the trap and allows the processing, and 3. The O/S must change to a higher protection to execute the service.

8 The PSW (Program Status Word) Often called the PSL (Program Status Longword), as with the VAX 11/780. Not really a word or longword, but a collection of bits associated with the program being executed. Some bits reflect the status of the program under execution. N Z V C the last arithmetic result was negative the last arithmetic result was zero the last arithmetic result caused an overflow the last arithmetic result had a carry out The security relevant parts of the PSW relate to the protection ring that is appropriate for the program execution. The VAX 11/780 and the Pentium 4 each offered four protection rings. The ring number was encoded in a two bit field in the PSW. The VAX stored both the ring for the current program and the previous program in the PSW. This allowed a program running at kernel level (level 00) to determine the privilege level of the program that issued the trap for its services.

9 Efficient Protection Rings These comments based on early work with the MULTICS operating system. MULTICS was first implemented on a GE 645 that emulated the protection rings in software. Procedure calls that crossed protection rings took excessive time. Code was inappropriately placed in the kernel to avoid this time penalty. Later implementations of a Honeywell Level 68 computer, with hardware support of protection rings, allowed better placement of code modules.

10 Commercialization of the Protection Rings Early computers had operating systems tailored to the specific architecture. Examples of this are the IBM 360 and OS/360; VAX 11/780 and VMS. More modern operating systems, such as UNIX, are designed to run on many hardware platforms, and so use the lowest common denominator of protection rings. This figure shows the IA 32 protection rings as intended and as normally implemented. The problem here is that any program that executes with more than user privileges must have access to all system resources. This is a security vulnerability.

11 The Superuser Fallacy This is my own term. Most operating systems implement only two protection rings or privilege levels, loosely called User and Superuser. As a result, any system utility (such as a print spooler) that requires more than simple user privileges must have access to all system resources. This violates the principle of least privilege.

12 SPOOLING: A Context for Discussing O/S Services The term SPOOL stands for System Peripheral Operation On Line. Direct access to a shared output device can cause chaos. The Spooling approach calls for all output to be to temporary files. The print manager has sole control of the shared printer and prints in order of closing the files.

13 Privileges: User vs. SPOOL A User Program must be able to create a file and write data to that file. It can read files in that user s directory, but usually not in other user s directory. It cannot access the shared printer directly. The Print Manager must be able to: Read a temporary file in any user s directory and delete that file when done. Access a printer directly and output directly to that device. It should not be able to create new files in any directory. The Print Manager cannot be run with Level 3 (Application) privilege, as that would disallow direct access to the printer and read access to the user s temporary files. Under current designs, the Print Manager must be run with Superuser Privileges, which include the ability to create and delete user accounts, manage memory, etc. This violates the principle of least privilege, which states that an executing program should be given no more privileges than necessary to do its job. We need at least four fully implemented rings of privilege, as well as specific role restrictions within a privilege level.

14 Memory Segmentation Memory paging divides the address space into a number of equal sized blocks, called pages. The page sizes are fixed for convenience of addressing. Memory segmentation divides the program s address space into logical segments, into which logically related units are placed. As examples, we conventionally have code segments, data segments, stack segments, constant pool segments, etc. Each segment has a unique logical name. All accesses to data in a segment must be through a <name, offset> pair that explicitly references the segment name. For addressing convenience, segments are usually constrained to contain an integral number of memory pages, so that the more efficient paging can be used. Memory segmentation facilitates the use of security techniques for protection. All data requiring a given level of protection can be grouped into a single segment, with protection flags specific to giving that exact level of protection. All code requiring protection can be placed into a code segment and also protected. It is not likely that a given segment will contain both code and data. For this reason, we may have a number of distinct segments with identical protection.

15 Segmentation and Its Support for Security The segmentation scheme used for the MULTICS operating system is typical. Each segment has a number of pages, as indicated by the page table associated with the segment. The segment can have a number of associated security descriptors. Modern operating systems treat a segment as one of a number of general objects, each with its Access Control List (ACL) that specifies which processes can access it.

16 More on Memory Protection There are two general protections that must be provided for memory. Protection against unauthorized access by software can be provided by a segmentation scheme, similar to that described above. Each memory access must go through each of the segment table and its associated page table in order to generate the physical memory address. Direct Memory Access (DMA) provides another threat to memory. In DMA, an input device (such as a disk controller) can access memory directly without the intervention of the CPU. It can issue physical addresses to the MAR and write directly to the MBR. This allows for efficient Input / Output operations. Unfortunately, a corrupted device controller can write directly to memory not associated with its application. We must protect memory against unauthorized DMA. Some recent proposals for secure systems provide for a NoDMA Table that can be used to limit DMA access to specific areas of physical memory.

17 Securing Input and Output Suppose that we have secured computing. How can we insure that our input and output are secure against attacks such as key logging and screen scraping? Input Sequence. Suppose that we want to input an A. We press the shift key and then the A key. The keyboard sends four scan codes to the keyboard handler, operating in user mode. This might be 0x36, 0x1E, 0x9E, 0xB6 for pressing the Shift Key, then pressing the A key, then releasing the A key, then releasing the Shift Key. This sequence is then translated to the ASCII code 0x41, which is sent to the O/S. Either the scan codes or the ASCII code can be intercepted by a key logger. Output Sequence. When the program outputs data, it is sent to the display buffer. The display buffer represents the bit maps to be displayed on the screen. While it does not directly contain ASCII data (just its pictures ), it does contain an image that can be copied and interpreted. This is called screen scraping.

18 Protecting the Code under Execution We can wrap the CPU in many layers of security so that it correctly executes the code. How do we assure ourselves that the code being executed is the code that we want? More specifically, how do we insure that the code being executed is what we think it is and has not been maliciously altered? One method to validate the code prior to execution is called a cryptographic hash. One common hash algorithm is called SHA 1 for Secure Hash Algorithm 1. This takes the code to be executed, represented as a string of 8 bit bytes, and produces a 20 byte (160 bit) output associated with the input. The hardware can have another mechanism that stores what the 20 byte hash should be. The hardware loads the object code, computes its SHA 1 hash, and then compares it to the stored value. If the two values match, the code is accepted as valid.

19 What Is a Cryptographic Hash? First, we begin with the definition of a hash function. It is a many to one function that produces a short binary number that characterizes a longer string of bytes. Consider the two characters AC with ASCII codes and One hash function would be the parity of each 8 bit number: 0 and 1 (even and odd). Another would be the exclusive OR of the sequence of 8 bit bytes. A C The hash function must be easy to compute for any given input. A cryptographic hash function has a number of additional properties. 1. A change of any single bit in the input being processed changes the output in a very noticeable way. For the 160 bit SHA 1, it changes about 80 of the bits. 2. While it is easy to compute the SHA 1 hash for a given input, it is computationally infeasible to produce another input with the identical 20 byte hash. Thus, if a code image has the correct hash output; it is extremely probable that it is the correct code image and not some counterfeit.

20 Terms Related to Security In order to follow the current research, we must define a few terms. Object Reference Monitor VM (Virtual Machine) VMM (Virtual Machine Monitor) MVMM (Measured Virtual Machine Monitor) RTM (Root of Trust for Measurement) Auditable Security Kernel

21 This definition is almost obvious. An Object An object is any asset that can be accessed, including memory, I/O devices, the CPU, etc. Data structures, such as the page tables and segment tables, are also objects. This is a logical abstraction that allows the designer to devise a uniform strategy for accessing these assets and protecting them.

22 Reference Monitor A reference monitor is code associated with an object that is invoked upon every reference to that object. Every change of data, authorization, or state must go through the RM. A security kernel is defined as the hardware and software to realize the reference monitor abstraction.

23 Auditable Security Kernel The security kernel is that part of the OS kernel that enforces the security policies. As seen above, it is responsible for implementing the reference monitor model. The Security Kernel must be designed to a formal security model. The Security Kernel must be small enough to be audited ; i.e., undergo a formal verification of its compliance to the model.

24 Virtual Machine In information security, a VM (Virtual Machine) is defined as an efficient isolated duplicate or a real machine. Popek and Goldberg, This is not the common definition of Virtual Machine as used by authors of books on Computer Architecture. Duplicate the VM acts as if it were the real machine and provides all its services. Isolated the VM isolates a user program from the OS and all other user programs. All physical assets of the real machine are virtualized, not directly accessed or controlled by a user program. Virtual memory is one of the assets of the real machine that are virtualized.

25 Precise Definition of Virtual Memory Virtual memory is a mechanism for translating logical addresses (as issued by an executing program) into actual physical memory addresses. This definition alone provides a great advantage to an Operating System, which can then allocate processes to distinct physical memory locations according to some optimization. Secondary Storage Although this is a precise definition, virtual memory has always been implemented by pairing a fast DRAM Main Memory with a bigger, slower backing store. Originally, this was magnetic drum memory, but it soon became magnetic disk memory. The invention of time sharing operating systems introduced another variant of VM, now part of the common definition. A program and its data could be swapped out to the disk to allow another program to run, and then swapped in later to resume.

26 VM: Virtualized Assets Virtual Memory all accesses to memory go through a standard virtual memory system with page and segment tables. DMA I/O is an important exception. If all memory references must go through the page management of the OS, then direct access to memory is almost impossible. This increases security and allows the OS to set aside selected memory pages as protected. I/O Devices are virtualized, with the user program having no direct I/O access. For example, all print requests might be managed by a Print Spooler, which first writes the data to disk and then prints from the disk file. Spoolers can be written with security rules to prevent disclosure of sensitive data System Registers all accesses to these cause trap instructions.

27 VMM: Virtual Machine Monitor The VM approach to secure computing is based on the creation of multiple isolated execution environments. The VMM is used to manage these multiple environments and control all access to sensitive system resources. The VMM is not the same as the OS, which might be one of the VMM clients executing in its own virtual machine.

28 Measured Virtual Machine Monitor Measured code is that code for which a recognized cryptographic hash has been computed and published. A MVMM is a Virtual Machine Monitor that has been measured. Cryptographic hashing provides a very strong assurance that the code is authentic. The trust issue is now focused on determining the trust level of the software developer.

29 Root of Trust for Measurement Launching a MVMM: 1. Load the MVMM 2. Compute its cryptographic hash 3. Compare to published value and report OK if the two values match. 4. Start the VMM. This task cannot be trusted to the VMM or any hardware under its control. The RTM is a separate hardware device, under the control of its own ROM.

30 Security Implications of DMA Almost all access to memory is based on the virtual memory system, managed by the VMM. Direct Memory Access I/O presents a problem. Efficiency issues dictate that it use physical memory addresses. These can be translations of virtual addresses that are done prior to the I/O. The solution is the NoDMA table, based on a new chip that can block DMA by memory page. The NoDMA table is managed by the VMM.

31 Trusted I/O Channels We must have at least two trusted channels for I/O: the keyboard and the monitor. Input from the keyboard and mouse will be encrypted scan codes (not ASCII) that are sent to a trusted handler. Output to the monitor is through a TGTT (Trusted Graphics Translation Table) that is an exception to the NoDMA table. The secure screen must be always on top and easily identifiable. It must be hard to spoof.

32 Commercial Ventures Intel is sponsoring research on its Safer Computing Initiative, based on technology developed under the LT or LaGrande Technology project. Microsoft is sponsoring the NGSCB, the Next Generation Secure Computing Base. Much has been promised, but little delivered. This is difficult work.

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs

Chapter 5 (Part II) Large and Fast: Exploiting Memory Hierarchy. Baback Izadi Division of Engineering Programs Chapter 5 (Part II) Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Virtual Machines Host computer emulates guest operating system and machine resources Improved isolation of multiple

More information

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Virtual Memory. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Virtual Memory Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Precise Definition of Virtual Memory Virtual memory is a mechanism for translating logical

More information

Virtual machines are an interesting extension of the virtual-memory concept: not only do we give processes the illusion that they have all of memory

Virtual machines are an interesting extension of the virtual-memory concept: not only do we give processes the illusion that they have all of memory Virtual machines are an interesting extension of the virtual-memory concept: not only do we give processes the illusion that they have all of memory to themselves, but also we give them the illusion that

More information

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy

Chapter 5 B. Large and Fast: Exploiting Memory Hierarchy Chapter 5 B Large and Fast: Exploiting Memory Hierarchy Dependability 5.5 Dependable Memory Hierarchy Chapter 6 Storage and Other I/O Topics 2 Dependability Service accomplishment Service delivered as

More information

Announcement. Exercise #2 will be out today. Due date is next Monday

Announcement. Exercise #2 will be out today. Due date is next Monday Announcement Exercise #2 will be out today Due date is next Monday Major OS Developments 2 Evolution of Operating Systems Generations include: Serial Processing Simple Batch Systems Multiprogrammed Batch

More information

John Wawrzynek & Nick Weaver

John Wawrzynek & Nick Weaver CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory John Wawrzynek & Nick Weaver http://inst.eecs.berkeley.edu/~cs61c From Previous Lecture: Operating Systems Input / output (I/O) Memory

More information

Chapter 3 Process Description and Control

Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The concept of process

More information

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. OS and Computer Architecture Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components Last class: OS and Architecture Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation

More information

Module 3: Operating-System Structures

Module 3: Operating-System Structures Module 3: Operating-System Structures System Components Operating-System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation Operating

More information

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy COMPUTER ARCHITECTURE Virtualization and Memory Hierarchy 2 Contents Virtual memory. Policies and strategies. Page tables. Virtual machines. Requirements of virtual machines and ISA support. Virtual machines:

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures 1 Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture Last 2 Classes: Introduction to Operating Systems & C++ tutorial User apps OS Virtual machine interface hardware physical machine interface An operating system is the interface between the user and the

More information

Introduction. CS3026 Operating Systems Lecture 01

Introduction. CS3026 Operating Systems Lecture 01 Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

Module 3: Operating-System Structures. Common System Components

Module 3: Operating-System Structures. Common System Components Module 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1 Common

More information

Operating systems and security - Overview

Operating systems and security - Overview Operating systems and security - Overview Protection in Operating systems Protected objects Protecting memory, files User authentication, especially passwords Trusted operating systems, security kernels,

More information

Operating systems and security - Overview

Operating systems and security - Overview Operating systems and security - Overview Protection in Operating systems Protected objects Protecting memory, files User authentication, especially passwords Trusted operating systems, security kernels,

More information

A Survey on Virtualization Technologies

A Survey on Virtualization Technologies A Survey on Virtualization Technologies Virtualization is HOT Microsoft acquires Connectix Corp. EMC acquires VMware Veritas acquires Ejascent IBM, already a pioneer Sun working hard on it HP picking up

More information

Xerox FreeFlow Print Server. Security White Paper. Secure solutions. for you and your customers

Xerox FreeFlow Print Server. Security White Paper. Secure solutions. for you and your customers Xerox FreeFlow Print Server Security White Paper Secure solutions for you and your customers Executive Summary Why is security more important than ever? New government regulations have been implemented

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #2 After A.S.Tanenbaum, Modern Operating Systems, 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD INTRODUCTION Operating systems structure OPERATING SYSTEM

More information

Operating-System Structures

Operating-System Structures Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1 Sana a University,

More information

CSE543 - Computer and Network Security Module: Virtualization

CSE543 - Computer and Network Security Module: Virtualization CSE543 - Computer and Network Security Module: Virtualization Professor Trent Jaeger CSE543 - Introduction to Computer and Network Security 1 Operating System Quandary Q: What is the primary goal of system

More information

OPERATING SYSTEMS UNIT - 1

OPERATING SYSTEMS UNIT - 1 OPERATING SYSTEMS UNIT - 1 Syllabus UNIT I FUNDAMENTALS Introduction: Mainframe systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered Systems Real Time Systems Handheld Systems -

More information

Virtualization and memory hierarchy

Virtualization and memory hierarchy Virtualization and memory hierarchy Computer Architecture J. Daniel García Sánchez (coordinator) David Expósito Singh Francisco Javier García Blas ARCOS Group Computer Science and Engineering Department

More information

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know:

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know: CIS 21 Final Study Guide Final covers ch. 1-20, except for 17. Need to know: I. Amdahl's Law II. Moore s Law III. Processes and Threading A. What is a process? B. What is a thread? C. Modes (kernel mode,

More information

The Operating System. Chapter 6

The Operating System. Chapter 6 The Operating System Machine Level Chapter 6 1 Contemporary Multilevel Machines A six-level l computer. The support method for each level is indicated below it.2 Operating System Machine a) Operating System

More information

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation Virtual Memory Topics (Chapter 9) Motivations for VM Address translation 1 Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Address space of a process can exceed physical memory

More information

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D) MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications

More information

Chapter 33: Virtual Machines

Chapter 33: Virtual Machines Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine Monitor Slide #33-1 Overview Virtual Machine Structure Virtual Machine Monitor Privilege Physical Resources Paging Slide #33-2 What

More information

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input. Introduction & Ch1 Two Roles of an Operating System Extended Machine or virtual machine Device drivers, Processes, File systems, Networking protocols. Resource Manager Allocates and enforces Memory, Disk

More information

Chapter 1 Computer System Overview

Chapter 1 Computer System Overview Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Ninth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides

More information

Module 1. Introduction:

Module 1. Introduction: Module 1 Introduction: Operating system is the most fundamental of all the system programs. It is a layer of software on top of the hardware which constitutes the system and manages all parts of the system.

More information

CSE543 - Introduction to Computer and Network Security. Module: Operating System Security

CSE543 - Introduction to Computer and Network Security. Module: Operating System Security CSE543 - Introduction to Computer and Network Security Module: Operating System Security Professor Trent Jaeger 1 OS Security An secure OS should provide (at least) the following mechanisms Memory protection

More information

Virtual Machine Security

Virtual Machine Security Virtual Machine Security CSE443 - Spring 2012 Introduction to Computer and Network Security Professor Jaeger www.cse.psu.edu/~tjaeger/cse443-s12/ 1 Operating System Quandary Q: What is the primary goal

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls POSIX System Programs System Structure Virtual Machines System Design and Implementation System Generation

More information

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36 The Challenges of X86 Hardware Virtualization GCC- Virtualization: Rajeev Wankar 36 The Challenges of X86 Hardware Virtualization X86 operating systems are designed to run directly on the bare-metal hardware,

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory Krste Asanović & Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/fa17 1 Agenda Virtual Memory Paged Physical Memory Swap Space

More information

OPERATING SYSTEMS CS136

OPERATING SYSTEMS CS136 OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,

More information

Last time. Security Policies and Models. Trusted Operating System Design. Bell La-Padula and Biba Security Models Information Flow Control

Last time. Security Policies and Models. Trusted Operating System Design. Bell La-Padula and Biba Security Models Information Flow Control Last time Security Policies and Models Bell La-Padula and Biba Security Models Information Flow Control Trusted Operating System Design Design Elements Security Features 10-1 This time Trusted Operating

More information

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture 1 Last class: Course administration OS definition, some history Today: Background on Computer Architecture 2 Canonical System Hardware CPU: Processor to perform computations Memory: Programs and data I/O

More information

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 13 Virtual memory and memory management unit In the last class, we had discussed

More information

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Use main memory as a cache for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs

More information

Introduction to Computer Security

Introduction to Computer Security Introduction to Computer Security Instructor: Mahadevan Gomathisankaran mgomathi@unt.edu 1 Introduction So you can specify a well-thought-out policy and a concrete model now what? Now it s time for a system

More information

Computer System Overview

Computer System Overview Computer System Overview Operating Systems 2005/S2 1 What are the objectives of an Operating System? 2 What are the objectives of an Operating System? convenience & abstraction the OS should facilitate

More information

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY

LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY LECTURE 4: LARGE AND FAST: EXPLOITING MEMORY HIERARCHY Abridged version of Patterson & Hennessy (2013):Ch.5 Principle of Locality Programs access a small proportion of their address space at any time Temporal

More information

virtual memory Page 1 CSE 361S Disk Disk

virtual memory Page 1 CSE 361S Disk Disk CSE 36S Motivations for Use DRAM a for the Address space of a process can exceed physical memory size Sum of address spaces of multiple processes can exceed physical memory Simplify Management 2 Multiple

More information

Operating System Architecture. CS3026 Operating Systems Lecture 03

Operating System Architecture. CS3026 Operating Systems Lecture 03 Operating System Architecture CS3026 Operating Systems Lecture 03 The Role of an Operating System Service provider Provide a set of services to system users Resource allocator Exploit the hardware resources

More information

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure

OS structure. Process management. Major OS components. CSE 451: Operating Systems Spring Module 3 Operating System Components and Structure CSE 451: Operating Systems Spring 2012 Module 3 Operating System Components and Structure Ed Lazowska lazowska@cs.washington.edu Allen Center 570 The OS sits between application programs and the it mediates

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 205 Lecture 23 LAST TIME: VIRTUAL MEMORY! Began to focus on how to virtualize memory! Instead of directly addressing physical memory, introduce a level of

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory. Bernhard Boser & Randy Katz

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory. Bernhard Boser & Randy Katz CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory Bernhard Boser & Randy Katz http://inst.eecs.berkeley.edu/~cs61c Agenda Virtual Memory Paged Physical Memory Swap Space Page Faults

More information

Towards Application Security on Untrusted Operating Systems

Towards Application Security on Untrusted Operating Systems Towards Application Security on Untrusted Operating Systems Dan R. K. Ports MIT CSAIL & VMware Tal Garfinkel VMware Motivation Many applications handle sensitive data financial, medical, insurance, military...

More information

Introduction to Operating System

Introduction to Operating System Introduction to Operating System 06CS53 What is an Operating System? The 1960 s definition of an operating system is the software that controls the hardware. However, today, due to microcode we need a

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

Process Description and Control. Chapter 3

Process Description and Control. Chapter 3 Process Description and Control Chapter 3 Contents Process states Process description Process control Unix process management Process From processor s point of view execute instruction dictated by program

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note on Disk I/O 1 I/O Devices Storage devices Floppy, Magnetic disk, Magnetic tape, CD-ROM, DVD User

More information

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2)

Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2) Department of Electr rical Eng ineering, Chapter 5 Large and Fast: Exploiting Memory Hierarchy (Part 2) 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline 5.4 Virtual

More information

Architectural Support for Operating Systems

Architectural Support for Operating Systems OS and Architectures Architectural Support for Operating Systems Emin Gun Sirer What an OS can do is dictated, at least in part, by the architecture. Architecture support can greatly simplify (or complicate)

More information

Q.1 Explain Computer s Basic Elements

Q.1 Explain Computer s Basic Elements Q.1 Explain Computer s Basic Elements Ans. At a top level, a computer consists of processor, memory, and I/O components, with one or more modules of each type. These components are interconnected in some

More information

Major Requirements of an OS

Major Requirements of an OS Process CSCE 351: Operating System Kernels Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization while providing reasonable response time Allocate

More information

Operating Systems. Overview. Dr Alun Moon. Computing, Engineering and Information Sciences. 27th September 2011

Operating Systems. Overview. Dr Alun Moon. Computing, Engineering and Information Sciences. 27th September 2011 Operating Systems Overview Dr Alun Moon Computing, Engineering and Information Sciences 27th September 2011 Dr Alun Moon (ceis:nu) Operating Systems 27th September 2011 1 / 16 Chapters 1 & 2 Galvin Silberschatz.

More information

Virtual Memory: From Address Translation to Demand Paging

Virtual Memory: From Address Translation to Demand Paging Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology November 12, 2014

More information

Unit 2 : Computer and Operating System Structure

Unit 2 : Computer and Operating System Structure Unit 2 : Computer and Operating System Structure Lesson 1 : Interrupts and I/O Structure 1.1. Learning Objectives On completion of this lesson you will know : what interrupt is the causes of occurring

More information

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives Virtual Machines Resource Virtualization Separating the abstract view of computing resources from the implementation of these resources

More information

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs Virtual Memory Today Motivations for VM Address translation Accelerating translation with TLBs Fabián Chris E. Bustamante, Riesbeck, Fall Spring 2007 2007 A system with physical memory only Addresses generated

More information

Process Description and Control. Major Requirements of an Operating System

Process Description and Control. Major Requirements of an Operating System Process Description and Control Chapter 3 1 Major Requirements of an Operating System Interleave the execution of several processes to maximize processor utilization while providing reasonable response

More information

Major Requirements of an Operating System Process Description and Control

Major Requirements of an Operating System Process Description and Control Major Requirements of an Operating System Process Description and Control Chapter 3 Interleave the execution of several processes to maximize processor utilization while providing reasonable response time

More information

Introduction to System Programming

Introduction to System Programming Introduction to System Programming Introduction to System Programming Why system programming? Basic operation of a computer system Summary Acknowledgement: slides based on the cs:app2e material 2 Why System

More information

Trusted Computing and O/S Security

Trusted Computing and O/S Security Computer Security Spring 2008 Trusted Computing and O/S Security Aggelos Kiayias University of Connecticut O/S Security Fundamental concept for O/S Security: separation. hardware kernel system user Each

More information

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names Fast access ===> use map to find object HW == SW ===> map is in HW or SW or combo Extend range ===> longer, hierarchical names How is map embodied: --- L1? --- Memory? The Environment ---- Long Latency

More information

ELEC 377 Operating Systems. Week 1 Class 2

ELEC 377 Operating Systems. Week 1 Class 2 Operating Systems Week 1 Class 2 Labs vs. Assignments The only work to turn in are the labs. In some of the handouts I refer to the labs as assignments. There are no assignments separate from the labs.

More information

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization

CSCI 8530 Advanced Operating Systems. Part 19 Virtualization CSCI 8530 Advanced Operating Systems Part 19 Virtualization Virtualization This is a very old idea It appears in many different forms A variety of commercial products exist The idea has become hot again

More information

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal)

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from the execution of an instruction or by some other internal

More information

Operating System Security

Operating System Security Operating System Security Operating Systems Defined Hardware: I/o...Memory.CPU Operating Systems: Windows or Android, etc Applications run on operating system Operating Systems Makes it easier to use resources.

More information

Segmentation ITCS /25/2013. Group #2: Daniel Scroggins Farida Bestowros Rowena Winston Vitali Kuyel Willie Holguin

Segmentation ITCS /25/2013. Group #2: Daniel Scroggins Farida Bestowros Rowena Winston Vitali Kuyel Willie Holguin Segmentation Group #2: Daniel Scroggins Farida Bestowros Rowena Winston Vitali Kuyel Willie Holguin ITCS 3146-091 9/25/2013 Overview History What is Paging? Paging Example Pros/Cons of Paging. What of

More information

CSC 453 Operating Systems

CSC 453 Operating Systems CSC 453 Operating Systems Lecture 3: Operating-System Structures Operating System Components Operating systems are large and complex - the only way to manage such a project is to divide it into smaller

More information

Chapter 8. Virtual Memory

Chapter 8. Virtual Memory Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:

More information

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications concurrently on all computers in the cluster. Disadvantages:

More information

Problem with Scanning an Infix Expression

Problem with Scanning an Infix Expression Operator Notation Consider the infix expression (X Y) + (W U), with parentheses added to make the evaluation order perfectly obvious. This is an arithmetic expression written in standard form, called infix

More information

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU)

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU) CSCI 4500 / 8506 Sample Questions for Quiz 4 Covers Modules 7 and 8 1. Deadlock occurs when each process in a set of processes a. is taking a very long time to complete. b. is waiting for an event (or

More information

Introduction CHAPTER. Review Questions

Introduction CHAPTER. Review Questions 1 CHAPTER Introduction Review Questions Section 1.1 1.1 What are the four components of a computer system? 1.2 Provide at least three resources the operating system allocates. 1.3 What is the common name

More information

CSC 553 Operating Systems

CSC 553 Operating Systems CSC 553 Operating Systems Lecture 1- Computer System Overview Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory

More information

Influential OS Research Security. Michael Raitza

Influential OS Research Security. Michael Raitza Influential OS Research Security Michael Raitza raitza@os.inf.tu-dresden.de 1 Security recap Various layers of security Application System Communication Aspects of security Access control / authorization

More information

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Last Class: Intro to OS An operating system is the interface between the user and the architecture. User-level Applications

More information

Operating System: an Overview. Lucia Dwi Krisnawati, MA

Operating System: an Overview. Lucia Dwi Krisnawati, MA Operating System: an Overview Lucia Dwi Krisnawati, MA What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals:

More information

COS 318: Operating Systems. File Systems. Topics. Evolved Data Center Storage Hierarchy. Traditional Data Center Storage Hierarchy

COS 318: Operating Systems. File Systems. Topics. Evolved Data Center Storage Hierarchy. Traditional Data Center Storage Hierarchy Topics COS 318: Operating Systems File Systems hierarchy File system abstraction File system operations File system protection 2 Traditional Data Center Hierarchy Evolved Data Center Hierarchy Clients

More information

OPERATING SYSTEM OVERVIEW

OPERATING SYSTEM OVERVIEW OPERATING SYSTEM OVERVIEW Contents Basic hardware elements Interrupts Most I/O devices are much slower than the processor Active waiting cycle (polling) Interrupt request signal Interrupt mechanism An

More information

Issues of Operating Systems Security

Issues of Operating Systems Security ECAI 2007 - International Conference Second Edition Electronics, Computers and Artificial Intelligence 29 th 30 th June, 2007, Piteşti, ROMÂNIA Issues of Operating Systems Security Academy of Economic

More information

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) Advantages of Multi-level Page Tables

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) Advantages of Multi-level Page Tables Outline V22.0202-001 Computer Systems Organization II (Honors) (Introductory Operating Systems) Lecture 15 Memory Management (cont d) Virtual Memory March 30, 2005 Announcements Lab 4 due next Monday (April

More information

Topic 18: Virtual Memory

Topic 18: Virtual Memory Topic 18: Virtual Memory COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Virtual Memory Any time you see virtual, think using a level of indirection

More information

Operating-System Structures

Operating-System Structures Operating-System Structures System Components Operating System Services System Calls System Programs System Structure System Design and Implementation System Generation 1 Common System Components Process

More information

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

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 4, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

CS2028 -UNIX INTERNALS

CS2028 -UNIX INTERNALS DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY,SIRUVACHUR-621113. CS2028 -UNIX INTERNALS PART B UNIT 1 1. Explain briefly details about History of UNIX operating system? In 1965, Bell Telephone

More information

Virtual Memory Oct. 29, 2002

Virtual Memory Oct. 29, 2002 5-23 The course that gives CMU its Zip! Virtual Memory Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs class9.ppt Motivations for Virtual Memory Use Physical

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L20-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

Computer Architecture Background

Computer Architecture Background CSE 5095 & ECE 4451 & ECE 5451 Spring 2017 Lecture 2b Computer Architecture Background Marten van Dijk Syed Kamran Haider, Chenglu Jin, Phuong Ha Nguyen Department of Electrical & Computer Engineering

More information

Modeling Page Replacement: Stack Algorithms. Design Issues for Paging Systems

Modeling Page Replacement: Stack Algorithms. Design Issues for Paging Systems Modeling Page Replacement: Stack Algorithms 7 4 6 5 State of memory array, M, after each item in reference string is processed CS450/550 Memory.45 Design Issues for Paging Systems Local page replacement

More information

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy Chapter 5 Large and Fast: Exploiting Memory Hierarchy Processor-Memory Performance Gap 10000 µproc 55%/year (2X/1.5yr) Performance 1000 100 10 1 1980 1983 1986 1989 Moore s Law Processor-Memory Performance

More information

Storage and File System

Storage and File System COS 318: Operating Systems Storage and File System Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Topics Storage hierarchy File

More information