The Operating System Machine Level

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Memory Management Paging &Segmentation CS311, CS350 & CS550.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CSC 322 Operating Systems Concepts Lecture - 18: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Memory Management (II)
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
1 Case Study 2: Windows 2000 Chapter History of windows Programming windows System structure 11.4 Processes and threads in.
1 Pertemuan 16 Isu-Isu pada Sistem Paging dan Segmentasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Chapter 3.2 : Virtual Memory
Chapter 3 Memory Management
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
The Operating System Machine Level Chapter 6. Operating System Machine Positioning of the operating system machine level.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Operating System Machine.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Memory Management April 28, 2000 Instructor: Gary Kimura.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Chapter 3 Memory Management 3.7 Segmentation. A compiler has many tables that are built up as compilation proceeds, possibly including: The source text.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Virtual Memory  Early computers had a small and fixed amount to memory. All programs had to be able to fit in this memory. Overlays were used when the.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Ceng Operating Systems 11-1 Chapter 11 : Case Study - Win 2000 History of windows 2000 Programming windows 2000 System structure Processes and threads.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CS333 Intro to Operating Systems Jonathan Walpole.
CS 153 Design of Operating Systems Spring 2015 Final Review.
Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall, Inc. All rights reserved OPERATING SYSTEMS DESIGN.
Cosc 3P92 Week 9 & 10 Lecture slides
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
1 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Chapter 4 Memory Management Segmentation. (a) One address space. (b) Separate I and D spaces. Separate Instruction and Data Spaces.
操作系统原理 OPERATING SYSTEM Chapter 3 Memory Management 内存管理.
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Fragmentation External Fragmentation – total memory space exists to satisfy.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Chapters 3 and 5 Possible questions
Memory Management Chapter 3
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Non Contiguous Memory Allocation
CE 454 Computer Architecture
Memory Management Paging (continued) Segmentation
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 11: File System Implementation
Session 3 Memory Management
Chapter 8: Main Memory Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
Section 10: Last section! Final review.
CSC 322 Operating Systems Concepts Lecture - 16: by
Page Replacement Implementation Issues
Paging and Segmentation
The Assembly Language Level
Operating Systems Review.
Memory Management Paging (continued) Segmentation
Case Study 2: Windows History of windows 2000
Page Replacement Implementation Issues
Sarah Diesburg Operating Systems CS 3430
Virtual Memory Overcoming main memory size limitation
Chapter 8: Memory Management strategies
Computer Architecture
Memory Management Paging (continued) Segmentation
Presentation transcript:

The Operating System Machine Level Chapter 6 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Operating System Machine Positioning of the operating system machine level. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Paging A mapping in which virtual addresses 4096 to 8191 are mapped onto main memory addresses 0 to 4095. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Paging (1) The first 64 KB of virtual address space divided into 16 pages, with each page being 4K. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Paging (2) A 32 KB main memory divided up into eight page frames of 4 KB each. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Paging (3) Formation of a main memory address from a virtual address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Demand Paging and the Working Set Model A possible mapping of the first 16 virtual pages onto a main memory with eight page frames. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Page Replacement Policy Failure of the LRU algorithm. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Segmentation (1) In a one-dimensional address space with growing tables, one table may bump into another. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Segmentation (2) A segmented memory allows each table to grow or shrink independently of the other tables. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Comparison of paging and segmentation. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Segmentation (1) (a)-(d) Development of external fragmentation. (e) Removal of the external fragmentation by compaction. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Segmentation (2) Conversion of a two-part MULTICS address into a main memory address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the Pentium 4 (1) A Pentium 4 selector. A Pentium 4 code segment descriptor. Data segments differ slightly. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the Pentium 4 (2) Conversion of a (selector, offset) pair to a linear address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the Pentium 4 (3) Mapping of a linear address onto a physical address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the Pentium 4 (4) Protection on the Pentium 4. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the UltraSPARC III (1) Virtual to physical mappings on the UltraSPARC. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Memory on the UltraSPARC III (2) Data structures used in translating virtual addresses on the UltraSPARC. (a) TLB. (b) TSB. (c) Translation table. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Virtual I/O Instructions (1) Reading a file consisting of logical records. (a) Before reading record 19. (b) After reading record 19. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Virtual I/O Instructions (2) Disk allocation strategies. (a) A file in consecutive sectors. (b) A file not in consecutive sectors. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Implementation of Virtual I/O Instructions (3) Two ways of keeping track of available sectors. (a) A free list. (b) A bit map. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Directory Management Instructions A user file directory and the contents of a typical entry in a file directory. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Virtual Instructions for Parallel Processing (a) True parallel processing with multiple CPUs. (b) Parallel processing simulated by switching one CPU among three processes. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Use of a circular buffer. Race Conditions (1) Use of a circular buffer. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Parallel processing with a fatal race condition. Race Conditions (2) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Parallel processing with a fatal race condition. Race Conditions (3) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Parallel processing with a fatal race condition. Race Conditions (4) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Failure of the producer-consumer communication mechanism. Race Conditions (5) Failure of the producer-consumer communication mechanism. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Process Synchronization Using Semaphores (1) The effect of a semaphore operation. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Process Synchronization Using Semaphores (2) Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Process Synchronization Using Semaphores (3) Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Process Synchronization Using Semaphores (4) Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

A rough breakdown of the UNIX system calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

The structure of a typical UNIX system. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

The structure of Windows XP. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

The address space of a single UNIX process. UNIX Virtual Memory The address space of a single UNIX process. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Windows XP Virtual Memory The principal Windows XP API calls for managing virtual memory. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

The principal UNIX file system calls. UNIX Virtual I/O (1) The principal UNIX file system calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

UNIX Virtual I/O (2) A program fragment for copying a file using the UNIX system calls. This fragment is in C because Java hides the low-level system calls and we are trying to expose them. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

UNIX Virtual I/O (3) Part of a typical UNIX directory system. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

The principal UNIX directory management calls. UNIX Virtual I/O (4) The principal UNIX directory management calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Windows XP Virtual I/O (1) The principal Win32 API functions for file I/O. The second column gives the nearest UNIX equivalent. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Windows XP Virtual I/O (2) A program fragment for copying a file using the Windows XP API functions. This fragment is in C because Java hides the low-level system calls and we are trying to expose them. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Windows XP Virtual I/O (3) The principal Win32 API functions for directory management. The second column gives the nearest UNIX equivalent, when one exists. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

Windows XP Virtual I/O (4) The Windows XP master file table. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

UNIX Process Management (1) A process tree in UNIX. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

UNIX Process Management (2) The principal POSIX thread calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0