Memory management challenges

Size: px
Start display at page:

Download "Memory management challenges"

Transcription

1 Virtual Page 1 Memory management challenges Wednesday, October 27, :59 AM Memory management challenges Fragmentation: memory is broken up into segments with gaps between them; must find a "fragment" big enough for each use. Internal fragmentation: processes must allocate more memory than needed. External fragmentation: unused memory lies in small fragments in the global memory map, between processes

2 Virtual Page 2 Fragmentation Tuesday, October 26, :31 PM At any time, only part of the heap is "used". There are "fragments" of unused memory. This is called "memory fragmentation".

3 Virtual Page 3 Fragmentation is necessary Tuesday, October 26, :32 PM We can't compact memory by eliminating fragments, because We don't know what is a pointer in the code! So if something points to a thing we move, we don't know how to change the reference!

4 Virtual Page 4 Kinds of fragmentation Wednesday, October 27, :59 AM Fragmentation kinds:

5 Virtual Page 5 How fragmentation happens Wednesday, October 29, :10 PM

6 Virtual Page 6 Causes of fragmentation Wednesday, October 27, :59 AM Fragmentation causes: Fixed page size. Program size is not a multiple of page size. So there's room "left over"; internal fragmentation. "Buddy system" Many algorithms depend upon dividing up resources. Allocation sizes are a power of two of pages. This is internal fragmentation. Reclamation: Processes exit, freeing frames. This leaves holes in the physical frame map. This is external fragmentation.

7 Virtual Page 7 Zooming out! Tuesday, October 26, :35 PM So far, we've covered what happens in the heap. What happens in other parts of the process? What happens to memory in the OS itself?

8 Virtual Page 8 Simple and complex Thursday, October 28, :39 AM As we look inside the operating system, Very simple and straightforward semantics (subject to O(1) time and O(1) space constraints and $ constraints) require exceedingly complex implementations.

9 Virtual Page 9 Simple semantics Tuesday, October 25, :19 PM Simple semantics Preserve the illusion that each process is autonomous. Map (OS) frames to (process) pages. Only permit certain operations on each page. Respond to needs for new pages: malloc: the heap. subroutine calls: the stack.

10 Virtual Page 10 Complex implementation Tuesday, October 25, :20 PM Complex implementation Allow process pages to exist in memory or on disk. Allow processes to run before pages are all in memory. Deal with processes' needs dynamically. Very, very quickly.

11 Virtual Page 11 Trading space for time Tuesday, October 30, :45 AM Trading space for time A common OS design strategy: trade space for time Store something In order to make something else faster.

12 Virtual Page 12 The concept of memory mapping Tuesday, October 25, :12 PM The concept of memory mapping. Recall: A frame is a unit of memory in the OS. A page is a unit of memory in the process. Memory mapping associates (OS) frames with (process) pages.

13 Virtual Page 13 Hardware to the rescue Thursday, October 28, :20 AM Basic memory mapping: base and bound registers Base register: physical address of logical address 0. Bounds register: contains size of map In a modern OS, the bound is a constant. why? Recovering from fragmentation is a bin packing problem. Unconstrained bin packing is NP complete Constraining to fixed size is polynomial.

14 Virtual Page 14 Hardware translation Thursday, October 28, :20 AM Hardware translation

15 Virtual Page 15 Memory mapping is: Tuesday, October 25, :27 PM Memory mapping is: Supported by a memory management unit (MMU) That the OS configures for each process That functions autonomously from the OS, until it generates interrupts when it needs OS attention. So, the OS has to maintain data on what gets mapped where.

16 Virtual Page 16 What the OS needs to remember Tuesday, October 25, :35 PM What the OS needs to remember: What frame goes with what process/page? Special handling instructions for pages: read-only, shared memory, private,copy-on-write...

17 Virtual Page 17 Frame descriptors Tuesday, October 25, :16 PM Each frame has some concept of a "descriptor" (in the OS): For which process? At what logical address? What privileges does the process have? Read/write? Read-only? Has anything been written to it yet? How do we encode this information optimally?

18 Virtual Page 18 The problem with frame descriptors Tuesday, October 25, :49 PM The problem with frame descriptors is that there are many, many frames and not so many page states...

19 Virtual Page 19 The concept of a segment Tuesday, October 25, :29 PM The concept of a segment A segment is a set of pages in a process (a.k.a. frames in the OS) that share the same attributes. A segment descriptor describes the attributes of a segment. Anything we can put into a segment descriptor doesn't have to go into the frame descriptor. Some segments and their attributes: Text segment: read-only. Stack segment: read-write, builds down. Heap segment: read-write, builds up. Data segment: read-write, static size (defined globals). BSS segment: read-write, globals with default (0) values. Etc.

20 Virtual Page 20 Modern memory addressing Tuesday, October 25, :42 PM Physical address of a byte (from the point of view of the OS) has (at least) two bitfields: Frame address: where the frame starts. Byte address: which byte of the frame. Logical address of a byte (in a process) contains (at least) three bitfields: Segment address Page address (in segment) Byte address A memory map is a correspondence (one-one function) between physical and logical addresses.

21 Virtual Page 21 Virtual memory Thursday, October 28, :44 PM Virtual memory At any time, a process's pages are not all in memory A page is resident if it is in memory and mapped. A page is virtual if not. Virtual pages are kept on disk in a swap partition Organized by logical address. Left on disk even if page is resident. New language: Moving a page from virtual to resident is called swapping in. Moving a page from resident to virtual is called swapping out.

22 Virtual Page 22 Handling "faults" Tuesday, October 25, :13 PM Handling memory "faults" When a process accesses memory that isn't currently mapped to it, this is called a page fault. How this is implemented: The processor/mmu generates an interrupt (of the process). The OS handles the interrupt (not the process!) One of several things is done, depending upon the state of the process.

23 Virtual Page 23 The semantics of virtual memory Thursday, October 28, :58 AM The semantics of virtual memory The process runs with only part of its pages resident. If a page is needed and isn't resident block the process swap in the required page unblock the process after the page is resident (it returns to the run queue)

24 Virtual Page 24 Making memory resident Thursday, October 28, :53 AM To map something that isn't mapped an interrupt occurs, and: block process if memory should be mapped find some available (physical) memory load it with what process expects map it to the proper location unblock process else segmentation fault: core dumped.

25 To find an available page Thursday, October 28, :02 PM Finding an available frame If there is an unused frame, read desired contents from disk map to requesting process page else pick a used frame to unmap unmap it from whatever process is using it now move the used page's contents to disk if needed read desired contents from disk. map the frame to the requesting process Virtual Page 25

26 Virtual Page 26 The dirty bit Tuesday, October 30, :27 AM An important concept in swapping: "dirtiness" If the memory image of a page matches the disk image, we say that the memory copy of a page is "clean". If the memory image is different, we say the memory copy of the page is "dirty". Dirty pages must be flushed to disk before they can be reused by other processes. Dirtiness is a page attribute.

27 Virtual Page 27 A classic space-time tradeoff Tuesday, October 30, :29 AM A classic space-time tradeoff The dirty bit consumes space, but saves time. 1 bit per page saves unneeded flushes, perhaps of very large sets of pages.

28 Virtual Page 28 Dirtiness in hardware Tuesday, October 30, :30 AM The dirty bit doesn't just occur in software Pages in cache are dirty if changed, and clean if not. Exact same semantics apply: dirty pages must be flushed before reuse.

29 Virtual Page 29 Picture of swapping Thursday, October 28, :58 PM

30 Virtual Page 30 Another picture of swapping Thursday, October 28, :00 PM

31 Virtual Page 31 States of a page Thursday, October 28, :57 PM

32 Virtual Page 32 Selecting what to swap out Thursday, October 28, :05 PM We need to choose a page to swap out. Two prevalent algorithms Least recently used (LRU) Least frequently accessed (LFA)

33 Virtual Page 33 How do we choose? Tuesday, October 30, :31 AM How do we choose? There is no concept of "best" page reuse algorithm. All choices are based upon "average" process behavior. All choices are based upon the principle of locality: if a process has accessed a page recently, it is more likely to access that page than to access another.

34 Virtual Page 34 The principle of locality in action Tuesday, October 30, :33 AM The principle of locality in action Accessing an array: many accesses to one page. Accessing instructions: always linear. Access elements of a linked list: buddy system keeps them local to 1-2 pages.

35 Least recently used (LRU) Thursday, October 28, :07 PM Least recently used Choose the frame (page) that was least recently accessed. Swap out its page and reuse it. Keep track of time of last access in a frame descriptor(!). Virtual Page 35

36 Least frequently accessed (LFA) Thursday, October 28, :09 PM Least frequently accessed The frame that is least frequently accessed (for a given time) gets unmapped, and is reused. Keep track of accesses in a frame descriptor(!) Virtual Page 36

37 Virtual Page 37 No perfect solution Thursday, October 28, :15 PM Whenever I say there are two solutions: One is optimal for some situations. The other is optimal for different situations. Least-Recently-Used: Optimal if memory access is linear, and increasing. Cannot account for large loops Least-Frequently-Accessed: Optimal for loops Doesn't work well for linear access (all counts are the same).

38 Virtual Page 38 Now, finesse Thursday, October 28, :42 PM Several very useful facts: If a page is read-only, it doesn't need to be swapped out. If a page is read-write but hasn' t been changed, it doesn't need to be swapped out. Thus, in the frame descriptor, there is a dirty bit: 1 if something has changed, 0 if not! A page is "dirty" if it has been written to, and "clean" if not! Thus only dirty pages need to be swapped out. Clean pages/frames can simply be reused. How this is done: The first write to a clean page generates an interrupt, after which it is marked dirty and interrupts are disabled!

39 Virtual Page 39 End of lecture on Wednesday, October 28, :29 PM

40 Virtual Page 40 Page descriptors versus frame descriptors Tuesday, October 25, :12 PM Frame descriptor: describes memory Frames are memory objects. Page descriptor: describes process state. Pages can be in memory or on disk. What belongs in each?

41 Virtual Page 41 Behind a fork() Tuesday, October 25, :15 PM

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

Memory 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 information

Virtual vs Physical Addresses

Virtual 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 information

Chapter 7 Memory Management

Chapter 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 information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 7 Memory Management Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Memory Management Subdividing

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Memory 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 information

Chapter 12. Paging an Virtual Memory Systems

Chapter 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 information

OPERATING SYSTEM - VIRTUAL MEMORY

OPERATING 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 information

OPERATING SYSTEM - MEMORY MANAGEMENT

OPERATING 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 information

Computer Architecture

Computer 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 information

Virtual Memory. Virtual Memory. Paging. CSE 380 Computer Operating Systems. Paging (1)

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 information

CS5460: Operating Systems

CS5460: 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 information

& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen

& 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 information

Operating Systems. Virtual Memory

Operating 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 information

COS 318: Operating Systems. Virtual Memory and Address Translation

COS 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 information

How To Write A Page Table

How 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 information

The Classical Architecture. Storage 1 / 36

The 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 information

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Memory 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 information

OPERATING SYSTEMS MEMORY MANAGEMENT

OPERATING 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 information

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

CS 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 information

The Linux Virtual Filesystem

The 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 information

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University Operating Systems CSE 410, Spring 2004 File Management Stephen Wagner Michigan State University File Management File management system has traditionally been considered part of the operating system. Applications

More information

Lecture 17: Virtual Memory II. Goals of virtual memory

Lecture 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 information

Virtual Machines. COMP 3361: Operating Systems I Winter 2015 http://www.cs.du.edu/3361

Virtual Machines. COMP 3361: Operating Systems I Winter 2015 http://www.cs.du.edu/3361 s COMP 3361: Operating Systems I Winter 2015 http://www.cs.du.edu/3361 1 Virtualization! Create illusion of multiple machines on the same physical hardware! Single computer hosts multiple virtual machines

More information

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc()

Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() CS61: Systems Programming and Machine Organization Harvard University, Fall 2009 Lecture 10: Dynamic Memory Allocation 1: Into the jaws of malloc() Prof. Matt Welsh October 6, 2009 Topics for today Dynamic

More information

Segmentation. 16.1 Segmentation: Generalized Base/Bounds

Segmentation. 16.1 Segmentation: Generalized Base/Bounds 16 Segmentation So far we have been putting the entire address space of each process in memory. With the base and bounds registers, the OS can easily relocate processes to different parts of physical memory.

More information

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating 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 information

Hardware Assisted Virtualization

Hardware Assisted Virtualization Hardware Assisted Virtualization G. Lettieri 21 Oct. 2015 1 Introduction In the hardware-assisted virtualization technique we try to execute the instructions of the target machine directly on the host

More information

KVM & Memory Management Updates

KVM & 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 information

Memory 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. 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 information

Virtual Memory. How is it possible for each process to have contiguous addresses and so many of them? A System Using Virtual Addressing

Virtual 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 information

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct)

Memory 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 information

Intel P6 Systemprogrammering 2007 Föreläsning 5 P6/Linux Memory System

Intel P6 Systemprogrammering 2007 Föreläsning 5 P6/Linux Memory System Intel P6 Systemprogrammering 07 Föreläsning 5 P6/Linux ory System Topics P6 address translation Linux memory management Linux page fault handling memory mapping Internal Designation for Successor to Pentium

More information

COS 318: Operating Systems

COS 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 information

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example

The 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 information

Record Storage and Primary File Organization

Record Storage and Primary File Organization Record Storage and Primary File Organization 1 C H A P T E R 4 Contents Introduction Secondary Storage Devices Buffering of Blocks Placing File Records on Disk Operations on Files Files of Unordered Records

More information

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management

1 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 information

Chapter 11 I/O Management and Disk Scheduling

Chapter 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 information

Chapter 12 File Management

Chapter 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 information

Memory Management CS 217. Two programs can t control all of memory simultaneously

Memory 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 information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Operating System Overview. Otto J. Anshus

Operating System Overview. Otto J. Anshus Operating System Overview Otto J. Anshus A Typical Computer CPU... CPU Memory Chipset I/O bus ROM Keyboard Network A Typical Computer System CPU. CPU Memory Application(s) Operating System ROM OS Apps

More information

Virtual Memory Behavior in Red Hat Linux Advanced Server 2.1

Virtual 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 information

Outline: Operating Systems

Outline: 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 information

Large-Scale Web Applications

Large-Scale Web Applications Large-Scale Web Applications Mendel Rosenblum Web Application Architecture Web Browser Web Server / Application server Storage System HTTP Internet CS142 Lecture Notes - Intro LAN 2 Large-Scale: Scale-Out

More information

Linux Process Scheduling Policy

Linux 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 information

Topics in Computer System Performance and Reliability: Storage Systems!

Topics in Computer System Performance and Reliability: Storage Systems! CSC 2233: Topics in Computer System Performance and Reliability: Storage Systems! Note: some of the slides in today s lecture are borrowed from a course taught by Greg Ganger and Garth Gibson at Carnegie

More information

Basic Components of an LP:

Basic Components of an LP: 1 Linear Programming Optimization is an important and fascinating area of management science and operations research. It helps to do less work, but gain more. Linear programming (LP) is a central topic

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Lecture 25 Symbian OS

Lecture 25 Symbian OS CS 423 Operating Systems Design Lecture 25 Symbian OS Klara Nahrstedt Fall 2011 Based on slides from Andrew S. Tanenbaum textbook and other web-material (see acknowledgements) cs423 Fall 2011 1 Overview

More information

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems Lecture Outline Operating Systems Objectives Describe the functions and layers of an operating system List the resources allocated by the operating system and describe the allocation process Explain how

More information

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

More information

Filing Systems. Filing Systems

Filing Systems. Filing Systems Filing Systems At the outset we identified long-term storage as desirable characteristic of an OS. EG: On-line storage for an MIS. Convenience of not having to re-write programs. Sharing of data in an

More information

Lecture 1: Data Storage & Index

Lecture 1: Data Storage & Index Lecture 1: Data Storage & Index R&G Chapter 8-11 Concurrency control Query Execution and Optimization Relational Operators File & Access Methods Buffer Management Disk Space Management Recovery Manager

More information

Technical White Paper: Running Applications Under CrossOver: An Analysis of Security Risks

Technical White Paper: Running Applications Under CrossOver: An Analysis of Security Risks Technical White Paper: Running Applications Under CrossOver: An Analysis of Security Risks Wine, Viruses, and Methods of Achieving Security Running Windows software via CrossOver is, on average, much safer

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Consider x := y+z. (x, y, z are memory variables) 1-address instructions 2-address instructions LOAD y (r :=y) ADD y,z (y := y+z) ADD z (r:=r+z) MOVE x,y (x := y) STORE x (x:=r)

More information

UBIFS file system. Adrian Hunter (Адриан Хантер) Artem Bityutskiy (Битюцкий Артём)

UBIFS file system. Adrian Hunter (Адриан Хантер) Artem Bityutskiy (Битюцкий Артём) UBIFS file system Adrian Hunter (Адриан Хантер) Artem Bityutskiy (Битюцкий Артём) Plan Introduction (Artem) MTD and UBI (Artem) UBIFS (Adrian) 2 UBIFS scope UBIFS stands for UBI file system (argh...) UBIFS

More information

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking? Housekeeping Paper reading assigned for next Thursday Scheduling Lab 2 due next Friday Don Porter CSE 506 Lecture goals Undergrad review Understand low-level building blocks of a scheduler Understand competing

More information

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA) Lecture 15 IP Address Each host and router on the Internet has an IP address, which consist of a combination of network number and host number. The combination is unique; no two machines have the same

More information

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen LECTURE 14: DATA STORAGE AND REPRESENTATION Data Storage Memory Hierarchy Disks Fields, Records, Blocks Variable-length

More information

Virtualization. Explain how today s virtualization movement is actually a reinvention

Virtualization. Explain how today s virtualization movement is actually a reinvention Virtualization Learning Objectives Explain how today s virtualization movement is actually a reinvention of the past. Explain how virtualization works. Discuss the technical challenges to virtualization.

More information

Chapter 6, The Operating System Machine Level

Chapter 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 information

W4118 Operating Systems. Instructor: Junfeng Yang

W4118 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 information

An overview of FAT12

An overview of FAT12 An overview of FAT12 The File Allocation Table (FAT) is a table stored on a hard disk or floppy disk that indicates the status and location of all data clusters that are on the disk. The File Allocation

More information

Data Storage Solutions

Data Storage Solutions Data Storage Solutions Module 1.2 2006 EMC Corporation. All rights reserved. Data Storage Solutions - 1 Data Storage Solutions Upon completion of this module, you will be able to: List the common storage

More information

Virtual Machines. Virtualization

Virtual Machines. Virtualization Virtual Machines Marie Roch Tanenbaum 8.3 contains slides from: Tanenbaum 3 rd ed. 2008 1 Virtualization Started with the IBM System/360 in the 1960s Basic concept simulate multiple copies of the underlying

More information

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium.

INTRODUCTION The collection of data that makes up a computerized database must be stored physically on some computer storage medium. Chapter 4: Record Storage and Primary File Organization 1 Record Storage and Primary File Organization INTRODUCTION The collection of data that makes up a computerized database must be stored physically

More information

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral Click here to print this article. Re-Printed From SLCentral RAID: An In-Depth Guide To RAID Technology Author: Tom Solinap Date Posted: January 24th, 2001 URL: http://www.slcentral.com/articles/01/1/raid

More information

W4118: segmentation and paging. Instructor: Junfeng Yang

W4118: 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 information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 13 Overview of memory management Monday Feb 27, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/32 Lecture outline Memory architecture of microcontrollers,

More information

VM Architecture. Jun-Chiao Wang, 15 Apr. 2002 NCTU CIS Operating System lab. 2002 Linux kernel trace seminar

VM Architecture. Jun-Chiao Wang, 15 Apr. 2002 NCTU CIS Operating System lab. 2002 Linux kernel trace seminar VM Architecture Jun-Chiao Wang, 15 Apr. 2002 NCTU CIS Operating System lab. 2002 Linux kernel trace seminar Outline Introduction What is VM? Segmentation & Paging in Linux Memory Management Page Frame

More information

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Introduction 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 information

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

Making Dynamic Memory Allocation Static To Support WCET Analyses

Making Dynamic Memory Allocation Static To Support WCET Analyses Making Dynamic Memory Allocation Static To Support WCET Analyses Jörg Herter Jan Reineke Department of Computer Science Saarland University WCET Workshop, June 2009 Jörg Herter, Jan Reineke Making Dynamic

More information

Linked Lists: Implementation Sequences in the C++ STL

Linked Lists: Implementation Sequences in the C++ STL Linked Lists: Implementation Sequences in the C++ STL continued CS 311 Data Structures and Algorithms Lecture Slides Wednesday, April 1, 2009 Glenn G. Chappell Department of Computer Science University

More information

File Management. Chapter 12

File 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 information

CS162 Operating Systems and Systems Programming Lecture 15. Page Allocation and Replacement

CS162 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 information

On Demand Loading of Code in MMUless Embedded System

On Demand Loading of Code in MMUless Embedded System On Demand Loading of Code in MMUless Embedded System Sunil R Gandhi *. Chetan D Pachange, Jr.** Mandar R Vaidya***, Swapnilkumar S Khorate**** *Pune Institute of Computer Technology, Pune INDIA (Mob- 8600867094;

More information

Memory Management Simulation Interactive Lab

Memory Management Simulation Interactive Lab Memory Management Simulation Interactive Lab The purpose of this lab is to help you to understand deadlock. We will use a MOSS simulator for this. The instructions for this lab are for a computer running

More information

Virtualization in Linux KVM + QEMU

Virtualization in Linux KVM + QEMU CS695 Topics in Virtualization and Cloud Computing KVM + QEMU Senthil, Puru, Prateek and Shashank 1 Topics covered KVM and QEMU Architecture VTx support CPU virtualization in KMV Memory virtualization

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 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 information

File Systems Management and Examples

File 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 information

Scheduling. Monday, November 22, 2004

Scheduling. Monday, November 22, 2004 Scheduling Page 1 Scheduling Monday, November 22, 2004 11:22 AM The scheduling problem (Chapter 9) Decide which processes are allowed to run when. Optimize throughput, response time, etc. Subject to constraints

More information

Computer-System Architecture

Computer-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 information

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,

More information

Lecture Notes on Linear Search

Lecture Notes on Linear Search Lecture Notes on Linear Search 15-122: Principles of Imperative Computation Frank Pfenning Lecture 5 January 29, 2013 1 Introduction One of the fundamental and recurring problems in computer science is

More information

Operating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015

Operating 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 information

Advanced x86: BIOS and System Management Mode Internals Flash Descriptor. Xeno Kovah && Corey Kallenberg LegbaCore, LLC

Advanced x86: BIOS and System Management Mode Internals Flash Descriptor. Xeno Kovah && Corey Kallenberg LegbaCore, LLC Advanced x86: BIOS and System Management Mode Internals Flash Descriptor Xeno Kovah && Corey Kallenberg LegbaCore, LLC All materials are licensed under a Creative Commons Share Alike license. http://creativecommons.org/licenses/by-sa/3./

More information

Review. Lecture 21: Reliable, High Performance Storage. Overview. Basic Disk & File System properties CSC 468 / CSC 2204 11/23/2006

Review. Lecture 21: Reliable, High Performance Storage. Overview. Basic Disk & File System properties CSC 468 / CSC 2204 11/23/2006 S 468 / S 2204 Review Lecture 2: Reliable, High Performance Storage S 469HF Fall 2006 ngela emke rown We ve looked at fault tolerance via server replication ontinue operating with up to f failures Recovery

More information

Peter J. Denning, Naval Postgraduate School, Monterey, California

Peter J. Denning, Naval Postgraduate School, Monterey, California VIRTUAL MEMORY Peter J. Denning, Naval Postgraduate School, Monterey, California January 2008 Rev 6/5/08 Abstract: Virtual memory is the simulation of a storage space so large that users do not need to

More information

WA2102 Web Application Programming with Java EE 6 - WebSphere 8.5 - RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

WA2102 Web Application Programming with Java EE 6 - WebSphere 8.5 - RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc. WA2102 Web Application Programming with Java EE 6 - WebSphere 8.5 - RAD 8.5 Classroom Setup Guide Web Age Solutions Inc. Web Age Solutions Inc. 1 Table of Contents Part 1 - Minimum Hardware Requirements...3

More information

Board Notes on Virtual Memory

Board 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 information

Chapter 5 Cloud Resource Virtualization

Chapter 5 Cloud Resource Virtualization Chapter 5 Cloud Resource Virtualization Contents Virtualization. Layering and virtualization. Virtual machine monitor. Virtual machine. Performance and security isolation. Architectural support for virtualization.

More information

Chapter 13. Disk Storage, Basic File Structures, and Hashing

Chapter 13. Disk Storage, Basic File Structures, and Hashing Chapter 13 Disk Storage, Basic File Structures, and Hashing Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and Extendible Hashing

More information

Sequences in the C++ STL

Sequences in the C++ STL CS 311 Data Structures and Algorithms Lecture Slides Wednesday, November 4, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn

More information

CSE 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 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 information

Operating System Tutorial

Operating 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 information

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance. Agenda Enterprise Performance Factors Overall Enterprise Performance Factors Best Practice for generic Enterprise Best Practice for 3-tiers Enterprise Hardware Load Balancer Basic Unix Tuning Performance

More information

So, why should you have a website for your church? Isn't it just another thing to add to the to-do list? Or will it really be useful?

So, why should you have a website for your church? Isn't it just another thing to add to the to-do list? Or will it really be useful? Why Have A Website? So, why should you have a website for your church? Isn't it just another thing to add to the to-do list? Or will it really be useful? Obviously, 'everyone else does' it not a good enough

More information

Phoenix Technologies Ltd.

Phoenix Technologies Ltd. PC Division Desktop Product Line Subject: Standard BIOS 32-bit Service Directory Proposal Revision: 0.4 Revision Date: June 22, 1993 Document ID: Author: ATBIOS Thomas C. Block Origin Date: May 24, 1993

More information

RAID HARDWARE. On board SATA RAID controller. RAID drive caddy (hot swappable) SATA RAID controller card. Anne Watson 1

RAID HARDWARE. On board SATA RAID controller. RAID drive caddy (hot swappable) SATA RAID controller card. Anne Watson 1 RAID HARDWARE On board SATA RAID controller SATA RAID controller card RAID drive caddy (hot swappable) Anne Watson 1 RAID The word redundant means an unnecessary repetition. The word array means a lineup.

More information