Memory Management. Overview
|
|
- Sheryl Paul
- 7 years ago
- Views:
Transcription
1 Memory Management 1 Overview Basic memory management Address Spaces Virtual memory Page replacement algorithms Design issues for paging systems Implementation issues Segmentation 2 1
2 Memory Management Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory cache some medium-speed, medium price main memory gigabytes of slow, cheap disk storage Memory manager handles the memory hierarchy Protects processes from each other. 3 Approaches Single Process, Contiguous Memory Multiple Processes, Contiguous Memory Multiple Processes, Discontiguous Memory Multiple Processes, Only partially in memory 4 2
3 Basic Memory Management Single Process without Swapping or Paging Three simple ways of organizing memory - an operating system with one user process 5 Binding If a program has a line: int x; When is the address of x determined? What are the choices? At compile time At load time At run time 6 3
4 Base / Limit Registers Binding done at run time. Addresses are added to base value to map to physical address Addresses larger than limit value are an error 7 Swapping Memory allocation changes as processes come into memory leave memory Shaded regions are unused memory 8 4
5 Managing Free Memory Assume a process being loaded can ask for any size chunk of memory needed. We need to be able to find a chunk the right size. How can we keep track of free chunks efficiently? 9 Memory Management with Bit Maps Part of memory with 5 processes, 3 holes tick marks show allocation units shaded regions are free Corresponding bit map Same information as a list 10 5
6 Memory Management with Linked Lists Four neighbor combinations for the terminating process X 11 Order of Search for Free Memory We can search for a large enough free block of free memory starting from the beginning. That s called first fit. If we already skipped over the first N holes because they were too small, maybe it s a waste of time to look there again. Try next fit. Should we be more selective in our choice? After all we re just grabbing the first thing that works How does first (or next) fit effect fragmentation? Could we do better? Can we find a hole that fits faster? What are the downsides? 12 6
7 The Contiguous Constraint So far a process s memory has been contiguous. What if it didn t have to be? What problems would that help solve? How would the hardware need to change? What additional work would the OS have to do? 13 It s All Gotta Be in Memory (or does it?) We have assumed that the entire process has to be in memory whenever it is running. What if it didn t have to be? What problems would that help solve? How would the hardware need to change? What additional work would the OS have to do? 14 7
8 Virtual Memory The position and function of the MMU 15 Paging The relation between virtual addresses and physical memory addresses given by page table 16 8
9 Page Tables Internal operation of MMU with 16 4 KB pages 17 Page Tables 2-level Second-level page tables Top-level page table 32 bit address with 2 page table fields Two-level page tables 18 9
10 Page Table Entry Present/absent is also called Valid Modified is also called Dirty Referenced is also called Accessed Why would caching be disable? 19 Pentium PTE 20 10
11 TLBs Translation Lookaside Buffers A TLB to speed up paging 21 Inverted Page Tables Comparison of a traditional page table with an inverted page table 22 11
12 Page Replacement Algorithms Page fault forces choice If there are no free page frames, we have to make room for incoming page Which page should be removed? Modified page frame must first be saved before being evicted An unmodified page frame can just overwritten Better not to choose an often used page Likely to be brought back in again soon 23 Optimal Page Replacement Algorithm Replace page needed at the farthest point in future Optimal but unrealizable Estimate by logging page use on previous runs of process although this is impractical 24 12
13 Not Recently Used Page Replacement Algorithm Each page has Reference bit, Modified bit bits are set when page is referenced, modified Pages are classified 1. not referenced, not modified 2. not referenced, modified 3. referenced, not modified 4. referenced, modified NRU removes page at random from lowest numbered non empty class 25 FIFO Page Replacement Algorithm Maintain a linked list of all pages in order they came into memory Page at beginning of list replaced Disadvantage page in memory the longest may be often used 26 13
14 Second Chance Page Replacement Algorithm Operation of a second chance pages sorted in FIFO order Page list if fault occurs at time 20, A has R bit set (numbers above pages are loading times) 27 The Clock Page Replacement Algorithm 28 14
15 Least Recently Used (LRU) Principle: assume a page used recently will be used again soon throw out page that has been unused for longest time Implementation Keep a linked list of pages most recently used at front, least at rear update this list every memory reference!! Or keep time stamp with each PTE choose page with oldest time stamp Again, this must be updated with every memory reference. 29 LRU (Another Hardware Solution) LRU using a matrix pages referenced in order 0,1,2,3,2,1,0,3,2,
16 LRU Approximation? How could we approximate LRU? We can t track every time a page is referenced, but we can sample the data. How often? Once per clock tick, perhaps. Update a counter for each page that has been referenced in the last clock tick. Take the page with the lowest count i.e. Not Frequently Used (NFU) How well does this work? 31 Simulating LRU in Software Aging The aging algorithm simulates LRU in software Note 6 pages for 5 clock ticks, (a) (e) 32 16
17 Thrashing A program causing page faults every few instructions is said to be thrashing. What causes thrashing? If a process keeps accessing random new pages, then it is hard to anticipate what it will use next. Most programs exhibit temporal and spatial locality. Temporal locality: if the process accessed a particular address, it is likely to do so again soon. Spatial locality: if the process accessed a particular address, it is likely to access nearby addresses soon. Processes that follow this principle tend not to thrash unless they have to fight for memory. 33 Causing Thrashing within a single process const int ROWS = 10000; const int COLS = 1024; int arr[rows][cols]; int main() { for (int row = 0; row < ROWS; ++row) for (int col = 0; col < COLS; ++col) arr[row][col] = row * col; } for (int col = 0; col < COLS; ++col) for (int row = 0; row < ROWS; ++row) arr[row][col] = row * col; The first nested loop demonstrates spatial locality The second thrashes
18 The Working Set Page Replacement Algorithm (1) The working set is the set of pages used by the k most recent memory references w(k,t) is the size of the working set at time, t 35 The Working Set Page Replacement Algorithm (2) The working set algorithm 36 18
19 The WSClock Page Replacement Algorithm Operation of the WSClock algorithm 37 Review of Page Replacement Algorithms 38 19
20 Modeling Page Replacement Algorithms Belady's Anomaly FIFO with 3 page frames FIFO with 4 page frames P's show which page references show page faults 39 Stack Algorithms State of memory array, M, after each item in reference string is processed 40 20
21 The Distance String Probability density functions for two hypothetical distance strings 41 The Distance String Computation of page fault rate from distance string the C vector the F vector 42 21
22 Design Issues for Paging Systems Local versus Global Allocation Policies Original configuration Local page replacement Global page replacement 43 Page Fault Rate Page fault rate as a function of the number of page frames assigned Use to determine if a process should be granted additional pages
23 Load Control Despite good designs, system may still thrash When PFF algorithm indicates some processes need more memory but no processes need less Solution : Reduce number of processes competing for memory swap one or more to disk, divide up frames they held reconsider degree of multiprogramming 45 Advantages Page Size (1) Small page size less internal fragmentation better fit for various data structures, code sections less unused program in memory Disadvantages programs need many pages, larger page tables 46 23
24 Page Size (2) Overhead due to page table and internal fragmentation page table space Where s = average process size in bytes p = page size in bytes e = page entry internal fragmentation Optimized when 47 Separate Instruction and Data Spaces One address space Separate I and D spaces 48 24
25 Shared Pages Two processes sharing same program sharing its page table 49 Cleaning Policy Need for a background process, paging daemon periodically inspects state of memory When too few frames are free selects pages to evict using a replacement algorithm. Evicted pages are kept in a pool in case they are wanted again. Dirty pages are scheduled to be written out
26 Implementation Issues Operating System vs. Hardware for Paging 1. Process creation Create and initialize page table. Pre-fetch pages. 2. Context Switch Point MMU to page table for new process TLB flushed 3. Memory Reference Map virtual address to physical address Determine if page fault If fault, determine whose fault and resolve 4. Page Replacement Record page access / modifies Determine page to replace. 5. Process termination time release page table, pages 51 Instruction Backup An instruction causing a page fault 52 26
27 Global Flag Some pages are used by every process in the system. Which? What would we like to have happen special for those pages during a context switch. How can the hardware know? 53 Locking Pages in Memory Virtual memory and I/O occasionally interact Proc issues call for read from device into buffer while waiting for I/O, another processes starts up has a page fault buffer for the first proc may be chosen to be paged out Need to specify some pages locked exempted from being target pages 54 27
28 Backing Store (a) Paging to static swap area (b) Backing up pages dynamically 55 Separation of Policy and Mechanism Page fault handling with an external pager 56 28
29 Memory Management NT & Unix Exact details not as easy as in process scheduling. Attempt to keep a set of free pages using a page daemon. (e.g. Linux: kswapd, NT: Working Set Manger) Essentially demand paging. NT brings in clusters, typically 8 pages for code, 4 for data. Unix s swapper used to bring in all referenced pages, when swapping a process back in. Now uses demand paging. OS present in every process s virtual address space. Reduces changes needed in TLB and cache. No changes needed for system call. Load control: Swap out entire processes as needed. This is currently something that one hopes to avoid, but the feature is still present. Some structure to describe where pages are currently, e.g. location in paging file. Unix: Core Map. NT: Page Frame Database. A portion (e.g., 64KB) of the top/bottom of address space unmapped. 57 MM in Unix Early versions totally swapping Current based on paging. Page Daemon ¼ sec. Refill free list when less then some value. BSD: lotsfree = ¼ memory. SysV: has some min/max. If less than min, fill until max. Goal is to reduce frequency of page daemon, thereby reducing thrashing. Originally used Global Clock. As memory sizes increased BSD went to 2-handed clock. Front clears referenced bit Back hand picks victim, Result: a referenced page is really recent. SysV instead keeps frequency count of pages not referenced. Only boots page out if count greater than some value Seems they had the opposite problem of the BSD folk
30 MM in Unix Load Control. If page daemon has to work too often then swap someone out. Every few seconds look for someone to bring back. Decision based on swapped out time, size, niceness, if it was sleeping Only bring back the user structure portion of PCB and the page tables. (I m surprised page tables are removed. Must record swapped out page for process somewhere ) Core Map describes frames, free list, location to swap to. 59 MM in NT Demand paging of Clusters. (code: 8, data: 4). XP does some prepaging after application s first run. Maintains a working set per process, not thread (remember scheduling is per thread) WS is based on size, not time window. Keeps a min/max per process If we have > max and a page fault then steal process s page. Otherwise add. ~ 1sec. Balance Set Manager, checks for sufficient free pages. Calls Working Set Manager to free pages. Sort processes by desirability. Large idle, first. Foreground last. If < min and enough page faults since last check, then leave alone. Determine #pages to remove from process. Depends on need, size of WS relative to min/max. Examine all pages in a process. Uses an unreferenced count, like AT&T Unix. Pages with high unreferenced removed. Continue examining additional processes till sufficient pages free. More aggressive passes as needed
31 MM in NT Load Control. Swapper runs every 4 sec. If thread asleep for 7 sec. Mark thread s kernel stack in transition. When all threads in process marked, then swap out. 61 MM in NT 62 31
32 MM in FreeBSD 1GB for kernel, unless you want lots of small processes using lots of kernel services, then configure for 2GB First few virtual pages reserved to catch bad pointers. Shared libraries placed by default just below default stack limit. Memory Lists: Wired Active Inactive. Dirty (min: 0%, max 4.5%) Pageout daemon moves pages from Inactive to cache attempts to balance i/o load by not starting too many concurrent writes. Runs as a kernel process. This way it has access to kernel data structures, etc., but can be scheduled to run as a process so it can sleep. Cache. Clean. (min: 3%, max 6%) Free. (min: 0.7%, max 3%) One end is zeroed, the other is not. Idle process tries to keep 75% of frames on Free list zeroed. 63 MM in FreeBSD Page coloring. Attempt to avoid cache conflicts. Cache holds pages. A 1MB cache with 4KB pages has 256 cache pages. Each physical page on a 1MB boundary maps to the same cache page. Thus each cache page represents as many physical pages as there are MB s of physical memory. When allocating frames, color coding attempts to avoid such potential conflicts by making contiguous virtual pages, get frames that map to contiguous cache pages. Pure demand paging when swapping back in. Back in BSD4.3, count of resident pages was used. DIoF says might return. Page Replacement Least actively used algorithm. Page has count of three when first brought in Incremented each time reference bit found set to a max of 64 Decremented each time referenced bit found not set. At zero page moved from Active to Inactive list
33 Segmentation (1) One-dimensional address space with growing tables One table may bump into another 65 Segmentation (2) Allows each table to grow or shrink, independently 66 33
34 Segmentation (3) Comparison of paging and segmentation 67 Implementation of Pure Segmentation 68 34
35 Segmentation with Paging: MULTICS (1) Descriptor segment points to page tables Segment descriptor numbers are field lengths 69 Segmentation with Paging: MULTICS (2) A 34-bit MULTICS virtual address 70 35
36 Segmentation with Paging: MULTICS (3) Conversion of a 2-part MULTICS address into a main memory address 71 Segmentation with Paging: MULTICS (4) Simplified version of the MULTICS TLB Existence of 2 page sizes makes actual TLB more complicated 72 36
37 Segmentation with Paging: Pentium (1) A Pentium selector 73 Segmentation with Paging: Pentium (2) Pentium code segment descriptor Data segments differ slightly 74 37
38 Segmentation with Paging: Pentium (3) Conversion of a (selector, offset) pair to a linear address 75 Segmentation with Paging: Pentium (4) Mapping of a linear address onto a physical address 76 38
39 Segmentation with Paging: Pentium (5) Level Protection on the Pentium 77 39
Virtual Memory. Virtual Memory. Paging. CSE 380 Computer Operating Systems. Paging (1)
Virtual Memory CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note: Virtual Memory (revised version) 1 Recall: memory allocation with variable partitions
More informationVirtual Memory Paging
COS 318: Operating Systems Virtual Memory Paging Kai Li Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Today s Topics Paging mechanism Page replacement algorithms
More informationMemory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging
Memory Management Outline Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging 1 Background Memory is a large array of bytes memory and registers are only storage CPU can
More informationOperating Systems. Virtual Memory
Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page
More informationOperating Systems, 6 th ed. Test Bank Chapter 7
True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one
More informationVirtual vs Physical Addresses
Virtual vs Physical Addresses Physical addresses refer to hardware addresses of physical memory. Virtual addresses refer to the virtual store viewed by the process. virtual addresses might be the same
More informationChapter 12. Paging an Virtual Memory Systems
Chapter 12 Paging an Virtual Memory Systems Paging & Virtual Memory Virtual Memory - giving the illusion of more physical memory than there really is (via demand paging) Pure Paging - The total program
More informationCOS 318: Operating Systems
COS 318: Operating Systems File Performance and Reliability Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Topics File buffer cache
More informationLecture 17: Virtual Memory II. Goals of virtual memory
Lecture 17: Virtual Memory II Last Lecture: Introduction to virtual memory Today Review and continue virtual memory discussion Lecture 17 1 Goals of virtual memory Make it appear as if each process has:
More informationOPERATING SYSTEM - VIRTUAL MEMORY
OPERATING SYSTEM - VIRTUAL MEMORY http://www.tutorialspoint.com/operating_system/os_virtual_memory.htm Copyright tutorialspoint.com A computer can address more memory than the amount physically installed
More informationComputer Architecture
Computer Architecture Slide Sets WS 2013/2014 Prof. Dr. Uwe Brinkschulte M.Sc. Benjamin Betting Part 11 Memory Management Computer Architecture Part 11 page 1 of 44 Prof. Dr. Uwe Brinkschulte, M.Sc. Benjamin
More informationComparison of Memory Management Systems of BSD, Windows, and Linux
Comparison of Memory Management Systems of BSD, Windows, and Linux Gaurang Khetan Graduate Student, Department of Computer Science, University of Southern California, Los Angeles, CA. gkhetan@usc.edu December
More information& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen
Folie a: Name & Data Processing 2 3: Memory Management Dipl.-Ing. Bogdan Marin Fakultät für Ingenieurwissenschaften Abteilung Elektro-und Informationstechnik -Technische Informatik- Objectives Memory Management
More informationMemory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering
Memory management basics (1) Requirements (1) Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 7: Memory Management I Memory management intends to satisfy the following
More informationMemory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct)
Memory Management 55 Memory Management Multitasking without memory management is like having a party in a closet. Charles Petzold. Programming Windows 3.1 Programs expand to fill the memory that holds
More informationChapter 6, The Operating System Machine Level
Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General
More informationSecondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems
1 Any modern computer system will incorporate (at least) two levels of storage: primary storage: typical capacity cost per MB $3. typical access time burst transfer rate?? secondary storage: typical capacity
More informationCOS 318: Operating Systems. Virtual Memory and Address Translation
COS 318: Operating Systems Virtual Memory and Address Translation Today s Topics Midterm Results Virtual Memory Virtualization Protection Address Translation Base and bound Segmentation Paging Translation
More informationMemory Management 1. Memory Management. Multitasking without memory management is like having a party in a closet.
Memory Management 1 Memory Management Multitasking without memory management is like having a party in a closet. Charles Petzold. Programming Windows 3.1 Programs expand to fill the memory that holds them.
More informationThe Classical Architecture. Storage 1 / 36
1 / 36 The Problem Application Data? Filesystem Logical Drive Physical Drive 2 / 36 Requirements There are different classes of requirements: Data Independence application is shielded from physical storage
More informationScheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum
Scheduling Yücel Saygın These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods
More informationHY345 Operating Systems
HY345 Operating Systems Recitation 2 - Memory Management Solutions Panagiotis Papadopoulos panpap@csd.uoc.gr Problem 7 Consider the following C program: int X[N]; int step = M; //M is some predefined constant
More information361 Computer Architecture Lecture 14: Cache Memory
1 361 Computer Architecture Lecture 14 Memory cache.1 The Motivation for s Memory System Processor DRAM Motivation Large memories (DRAM) are slow Small memories (SRAM) are fast Make the average access
More informationChapter 11 I/O Management and Disk Scheduling
Operatin g Systems: Internals and Design Principle s Chapter 11 I/O Management and Disk Scheduling Seventh Edition By William Stallings Operating Systems: Internals and Design Principles An artifact can
More informationBoard Notes on Virtual Memory
Board Notes on Virtual Memory Part A: Why Virtual Memory? - Letʼs user program size exceed the size of the physical address space - Supports protection o Donʼt know which program might share memory at
More informationOPERATING SYSTEM - MEMORY MANAGEMENT
OPERATING SYSTEM - MEMORY MANAGEMENT http://www.tutorialspoint.com/operating_system/os_memory_management.htm Copyright tutorialspoint.com Memory management is the functionality of an operating system which
More informationKVM & Memory Management Updates
KVM & Memory Management Updates KVM Forum 2012 Rik van Riel Red Hat, Inc. KVM & Memory Management Updates EPT Accessed & Dirty Bits 1GB hugepages Balloon vs. Transparent Huge Pages Automatic NUMA Placement
More informationMemory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation
Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need
More informationW4118: segmentation and paging. Instructor: Junfeng Yang
W4118: segmentation and paging Instructor: Junfeng Yang Outline Memory management goals Segmentation Paging TLB 1 Uni- v.s. multi-programming Simple uniprogramming with a single segment per process Uniprogramming
More informationChapter 12 File Management
Operating Systems: Internals and Design Principles Chapter 12 File Management Eighth Edition By William Stallings Files Data collections created by users The File System is one of the most important parts
More informationVirtual Memory Behavior in Red Hat Linux Advanced Server 2.1
Virtual Memory Behavior in Red Hat Linux Advanced Server 2.1 Bob Matthews Red Hat, Inc. Kernel Development Team Norm Murray Red Hat, Inc. Client Engineering Team This is an explanation of the virtual memory
More informationCOMPUTER HARDWARE. Input- Output and Communication Memory Systems
COMPUTER HARDWARE Input- Output and Communication Memory Systems Computer I/O I/O devices commonly found in Computer systems Keyboards Displays Printers Magnetic Drives Compact disk read only memory (CD-ROM)
More informationCS 61C: Great Ideas in Computer Architecture Virtual Memory Cont.
CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont. Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Bare 5-Stage Pipeline Physical Address PC Inst.
More informationVirtual Memory. How is it possible for each process to have contiguous addresses and so many of them? A System Using Virtual Addressing
How is it possible for each process to have contiguous addresses and so many of them? Computer Systems Organization (Spring ) CSCI-UA, Section Instructor: Joanna Klukowska Teaching Assistants: Paige Connelly
More informationGeneral Purpose Operating System Support for Multiple Page Sizes
The following paper was originally published in the Proceedings of the USENIX Annual Technical Conference (NO 98) New Orleans, Louisiana, June 1998 General Purpose Operating System Support for Multiple
More informationUnderstanding Virtual Memory In Red Hat Enterprise Linux 3
Understanding Virtual Memory In Red Hat Enterprise Linux 3 Norm Murray and Neil Horman Version 1.6 December 13, 2005 Contents 1 Introduction 2 2 Definitions 3 2.1 What Comprises a VM........................
More informationCS5460: Operating Systems
CS5460: Operating Systems Lecture 13: Memory Management (Chapter 8) Where are we? Basic OS structure, HW/SW interface, interrupts, scheduling Concurrency Memory management Storage management Other topics
More informationFile Systems Management and Examples
File Systems Management and Examples Today! Efficiency, performance, recovery! Examples Next! Distributed systems Disk space management! Once decided to store a file as sequence of blocks What s the size
More informationChapter 11 I/O Management and Disk Scheduling
Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization
More informationThe World According to the OS. Operating System Support for Database Management. Today s talk. What we see. Banking DB Application
The World According to the OS Operating System Support for Database Management App1 App2 App3 notes from Stonebraker s paper that appeared in Computing Practices, 1981 Operating System Anastassia Ailamaki
More informationReady Time Observations
VMWARE PERFORMANCE STUDY VMware ESX Server 3 Ready Time Observations VMware ESX Server is a thin software layer designed to multiplex hardware resources efficiently among virtual machines running unmodified
More informationThe Linux Virtual Filesystem
Lecture Overview Linux filesystem Linux virtual filesystem (VFS) overview Common file model Superblock, inode, file, dentry Object-oriented Ext2 filesystem Disk data structures Superblock, block group,
More information1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management
COMP 242 Class Notes Section 6: File Management 1 File Management We shall now examine how an operating system provides file management. We shall define a file to be a collection of permanent data with
More informationMemory Management CS 217. Two programs can t control all of memory simultaneously
Memory Management CS 217 Memory Management Problem 1: Two programs can t control all of memory simultaneously Problem 2: One program shouldn t be allowed to access/change the memory of another program
More informationOperating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:
Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the
More informationChapter 12 File Management
Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Overview File organisation and Access
More informationChapter 12 File Management. Roadmap
Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Overview Roadmap File organisation and Access
More informationFile System Management
Lecture 7: Storage Management File System Management Contents Non volatile memory Tape, HDD, SSD Files & File System Interface Directories & their Organization File System Implementation Disk Space Allocation
More informationUnit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3
Storage Structures Unit 4.3 Unit 4.3 - Storage Structures 1 The Physical Store Storage Capacity Medium Transfer Rate Seek Time Main Memory 800 MB/s 500 MB Instant Hard Drive 10 MB/s 120 GB 10 ms CD-ROM
More informationChapter 13 File and Database Systems
Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation
More informationChapter 13 File and Database Systems
Chapter 13 File and Database Systems Outline 13.1 Introduction 13.2 Data Hierarchy 13.3 Files 13.4 File Systems 13.4.1 Directories 13.4. Metadata 13.4. Mounting 13.5 File Organization 13.6 File Allocation
More informationHow To Write A Page Table
12 Paging: Introduction Remember our goal: to virtualize memory. Segmentation (a generalization of dynamic relocation) helped us do this, but has some problems; in particular, managing free space becomes
More informationRoad Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.
Road Map Scheduling Dickinson College Computer Science 354 Spring 2010 Past: What an OS is, why we have them, what they do. Base hardware and support for operating systems Process Management Threads Present:
More informationBindel, Spring 2010 Applications of Parallel Computers (CS 5220) Week 1: Wednesday, Jan 27
Logistics Week 1: Wednesday, Jan 27 Because of overcrowding, we will be changing to a new room on Monday (Snee 1120). Accounts on the class cluster (crocus.csuglab.cornell.edu) will be available next week.
More informationWhitepaper: performance of SqlBulkCopy
We SOLVE COMPLEX PROBLEMS of DATA MODELING and DEVELOP TOOLS and solutions to let business perform best through data analysis Whitepaper: performance of SqlBulkCopy This whitepaper provides an analysis
More informationCS 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
CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what
More informationCSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture
CSE 544 Principles of Database Management Systems Magdalena Balazinska Fall 2007 Lecture 5 - DBMS Architecture References Anatomy of a database system. J. Hellerstein and M. Stonebraker. In Red Book (4th
More informationThe Quest for Speed - Memory. Cache Memory. A Solution: Memory Hierarchy. Memory Hierarchy
The Quest for Speed - Memory Cache Memory CSE 4, Spring 25 Computer Systems http://www.cs.washington.edu/4 If all memory accesses (IF/lw/sw) accessed main memory, programs would run 20 times slower And
More informationOPERATING SYSTEMS MEMORY MANAGEMENT
OPERATING SYSTEMS MEMORY MANAGEMENT Jerry Breecher 8: Memory Management 1 OPERATING SYSTEM Memory Management What Is In This Chapter? Just as processes share the CPU, they also share physical memory. This
More informationAn Implementation Of Multiprocessor Linux
An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than
More informationPage replacement in Linux 2.4 memory management
Page replacement in Linux 2.4 memory management Rik van Riel Conectiva Inc. riel@conectiva.com.br, http://www.surriel.com/ Abstract While the virtual memory management in Linux 2.2 has decent performance
More informationLinux Process Scheduling Policy
Lecture Overview Introduction to Linux process scheduling Policy versus algorithm Linux overall process scheduling objectives Timesharing Dynamic priority Favor I/O-bound process Linux scheduling algorithm
More informationOutline: Operating Systems
Outline: Operating Systems What is an OS OS Functions Multitasking Virtual Memory File Systems Window systems PC Operating System Wars: Windows vs. Linux 1 Operating System provides a way to boot (start)
More informationKernel Optimizations for KVM. Rik van Riel Senior Software Engineer, Red Hat June 25 2010
Kernel Optimizations for KVM Rik van Riel Senior Software Engineer, Red Hat June 25 2010 Kernel Optimizations for KVM What is virtualization performance? Benefits of developing both guest and host KVM
More informationChapter 1 Computer System Overview
Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides
More informationW4118 Operating Systems. Instructor: Junfeng Yang
W4118 Operating Systems Instructor: Junfeng Yang Outline x86 segmentation and paging hardware Linux address space translation Copy-on-write Linux page replacement algorithm Linux dynamic memory allocation
More informationData Storage - I: Memory Hierarchies & Disks
Data Storage - I: Memory Hierarchies & Disks W7-C, Spring 2005 Updated by M. Naci Akkøk, 27.02.2004 and 23.02.2005, based upon slides by Pål Halvorsen, 11.3.2002. Contains slides from: Hector Garcia-Molina,
More informationFile Management. Chapter 12
Chapter 12 File Management File is the basic element of most of the applications, since the input to an application, as well as its output, is usually a file. They also typically outlive the execution
More informationIntroduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.
Guest lecturer: David Hovemeyer November 15, 2004 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds
More informationComputer-System Architecture
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture 2.1 Computer-System Architecture 2.2 Computer-System
More informationChapter 7 Memory Management
Operating Systems: Internals and Design Principles Chapter 7 Memory Management Eighth Edition William Stallings Frame Page Segment A fixed-length block of main memory. A fixed-length block of data that
More informationOperating System Tutorial
Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection
More informationParallel Processing and Software Performance. Lukáš Marek
Parallel Processing and Software Performance Lukáš Marek DISTRIBUTED SYSTEMS RESEARCH GROUP http://dsrg.mff.cuni.cz CHARLES UNIVERSITY PRAGUE Faculty of Mathematics and Physics Benchmarking in parallel
More informationOS OBJECTIVE QUESTIONS
OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1
More informationTiming of a Disk I/O Transfer
Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and at the beginning of the desired sector Seek time Time it takes to position the head at the desired
More informationPOSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)
RTOSes Part I Christopher Kenna September 24, 2010 POSIX Portable Operating System for UnIX Application portability at source-code level POSIX Family formally known as IEEE 1003 Originally 17 separate
More informationI/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1
General Computer Architecture I/O Management COMP755 Advanced Operating Systems Goals for I/O Users should access all devices in a uniform manner. Devices should be named in a uniform manner. The OS, without
More informationWhy Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat
Why Computers Are Getting Slower (and what we can do about it) Rik van Riel Sr. Software Engineer, Red Hat Why Computers Are Getting Slower The traditional approach better performance Why computers are
More informationOperating Systems Concepts: Chapter 7: Scheduling Strategies
Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/
More informationPerformance Comparison of RTOS
Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile
More informationTwo Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface
File Management Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified Filesystem design Implementing
More informationDATABASE. Pervasive PSQL Performance. Key Performance Features of Pervasive PSQL. Pervasive PSQL White Paper
DATABASE Pervasive PSQL Performance Key Performance Features of Pervasive PSQL Pervasive PSQL White Paper June 2008 Table of Contents Introduction... 3 Per f o r m a n c e Ba s i c s: Mo r e Me m o r y,
More informationOperating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015
Operating Systems 05. Threads Paul Krzyzanowski Rutgers University Spring 2015 February 9, 2015 2014-2015 Paul Krzyzanowski 1 Thread of execution Single sequence of instructions Pointed to by the program
More informationCS10110 Introduction to personal computer equipment
CS10110 Introduction to personal computer equipment PRACTICAL 4 : Process, Task and Application Management In this practical you will: Use Unix shell commands to find out about the processes the operating
More informationMemory Management under Linux: Issues in Linux VM development
Memory Management under Linux: Issues in Linux VM development Christoph Lameter, Ph.D. Technical Lead, Linux Kernel Software Silicon Graphics Inc. clameter@sgi.com 2008-03-12 2008 SGI Sunnyvale, California
More informationCS162 Operating Systems and Systems Programming Lecture 15. Page Allocation and Replacement
S6 Operating Systems and Systems Programming Lecture 5 Page llocation and Replacement October 5, 00 Prof. John Kubiatowicz http://inst.eecs.berkeley.edu/~cs6 Review: emand Paging Mechanisms PT helps us
More informationStorage in Database Systems. CMPSCI 445 Fall 2010
Storage in Database Systems CMPSCI 445 Fall 2010 1 Storage Topics Architecture and Overview Disks Buffer management Files of records 2 DBMS Architecture Query Parser Query Rewriter Query Optimizer Query
More informationIntroduction. Scheduling. Types of scheduling. The basics
Introduction In multiprogramming systems, when there is more than one runable (i.e., ready), the operating system must decide which one to activate. The decision is made by the part of the operating system
More informationA3 Computer Architecture
A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 6. Stacks, Subroutines, and Memory
More informationRecommended hardware system configurations for ANSYS users
Recommended hardware system configurations for ANSYS users The purpose of this document is to recommend system configurations that will deliver high performance for ANSYS users across the entire range
More informationSIDN Server Measurements
SIDN Server Measurements Yuri Schaeffer 1, NLnet Labs NLnet Labs document 2010-003 July 19, 2010 1 Introduction For future capacity planning SIDN would like to have an insight on the required resources
More informationMemory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1
Hierarchy Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Hierarchy- 1 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor
More informationComputer Architecture
Cache Memory Gábor Horváth 2016. április 27. Budapest associate professor BUTE Dept. Of Networked Systems and Services ghorvath@hit.bme.hu It is the memory,... The memory is a serious bottleneck of Neumann
More informationChapter 13: Query Processing. Basic Steps in Query Processing
Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing
More informationDistributed File Systems
Distributed File Systems Paul Krzyzanowski Rutgers University October 28, 2012 1 Introduction The classic network file systems we examined, NFS, CIFS, AFS, Coda, were designed as client-server applications.
More informationThe Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example
The Deadlock Problem Deadlocks A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 tape drives. P 1 and P 2 each
More informationMemory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs
Memory management Chater : Memory Management Part : Mechanisms for Managing Memory asic management Swaing Virtual Page relacement algorithms Modeling age relacement algorithms Design issues for aging systems
More informationVirtuoso and Database Scalability
Virtuoso and Database Scalability By Orri Erling Table of Contents Abstract Metrics Results Transaction Throughput Initializing 40 warehouses Serial Read Test Conditions Analysis Working Set Effect of
More informationPerformance and Tuning Guide. SAP Sybase IQ 16.0
Performance and Tuning Guide SAP Sybase IQ 16.0 DOCUMENT ID: DC00169-01-1600-01 LAST REVISED: February 2013 Copyright 2013 by Sybase, Inc. All rights reserved. This publication pertains to Sybase software
More information