Memory Management (Ch.9)

Size: px
Start display at page:

Download "Memory Management (Ch.9)"

Transcription

1 Memory Management (Ch.9)! Background! Address Binding - Linking and Loading! Swapping! Memory Protection! Contiguous Memory Allocation! Paging! Segmentation! Combined Paging and Segmentation Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 1

2 Background! CPU scheduling improves CPU utilization and the speed of the computer s response to its users. l To realize this goal memory must be shared by multiple processes! CPU goes through an instruction-execution cycle l Instruction fetched from memory and decoded resulting in possible retrieval of operands from memory l Instruction executed and results may be stored back in memory Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 2

3 Address Binding! Input queue collection of processes on the disk that are waiting to be brought into memory to run the program.! One of these processes is selected to be loaded into memory, run and, when terminated, removed from memory l A process can reside in any part of the physical memory. The first address of the user process does not have to be the first address of the computer Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 3

4 Binding of Instructions and Data to Memory Address binding of instructions and data to memory addresses! can occur at three different stages.!! Compile time If memory location known at compile time then absolute code can be generated; must recompile code if starting location changes.! Load time Must generate relocatable code if memory location is not known at compile time but is finalized at load time.! Execution time Binding delayed until run time if the process can be moved during its execution from one memory segment to another. Need hardware support for address maps (e.g., base and limit registers). Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 4

5 Binding of Instructions and Data to Memory Absolute and Relocatable Load Modules Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 5

6 Memory-Management Unit (MMU)! Hardware device that performs run-time mapping between virtual and physical address.! In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.! The user program deals with logical addresses; it never sees the real physical addresses. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 6

7 Swapping! A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution.! Backing store fast disk, large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images.! Roll out, roll in swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed.! Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 7

8 Contiguous Memory Allocation! Multiple-partition allocation l Hole block of available memory; holes of various size are scattered throughout memory. l When a process arrives, it is allocated memory from a hole large enough to accommodate it. l Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS! OS! OS! OS! process 5! process 5! process 5! process 5! process 9! process 9! process 8! process 10! process 2! process 2! process 2! process 2! Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 8

9 Dynamic Storage-Allocation Problem How to satisfy a request of size n from a list of free holes.!! First-fit: Allocate the first hole that is big enough l Next-fit: look for first-fit from last allocation! Best-fit: Allocate the smallest hole that is big enough; must search entire list, unless ordered by size. Produces the smallest leftover hole.! Worst-fit: Allocate the largest hole; must also search entire list. Produces the largest leftover hole.! Neither first-fit or best-fit is clearly better for storage utilization but first-fit is generally faster Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 9

10 Fragmentation! External Fragmentation free memory space is broken into non-contiguous pieces, none big enough to satisfy a request! Internal Fragmentation allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used.! Reduce external fragmentation by compaction l Shuffle memory contents to place all free memory together in one large block., this can be expensive l Compaction is possible only if relocation is dynamic, and is done at execution time. l Or, use Paging Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 10

11 Paging! Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available.! Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes).! Divide logical memory into blocks of same size called pages.! Keep track of all free frames.! To run a program of size n pages, need to find n free frames and load program.! Set up a page table to translate logical to physical addresses. l Contains the base address of each page in physical memory! Internal fragmentation. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 11

12 Address Translation Scheme! Address generated by CPU is divided into: l Page number (p) used as an index into a page table which contains base address of each page in physical memory. l Page offset (d) combined with base address to define the physical memory address that is sent to the memory unit. l If the size of the logical address space is 2 m and page size is 2 n then the high order m-n bits of the logical address designate the page number and the n low order bits designate the page offset page number (p) page offset(d) m-n n Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 12

13 Address Translation Architecture Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 13

14 Paging Model Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 14

15 Paging Example Page size = 4 bytes Physical memory = 32 bytes (8 pages) Page 0 is in frame 5 which is physical address 20 Logical address 3 (page 0 offset 3) is mapped to frame 5 offset 3 which is physical address 23 Paging is similar to using a table of base registers, one for each frame of memory To reduce internal fragmentation, some OSs support multiple page sizes Solaris 8KB and 4KB Research on variable, on-the-fly pages Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 15

16 Free Frames Before allocation! After allocation! Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 16

17 Implementation of Page Table! Page table can be implemented as a set of dedicated registers with very high speed logic. Reloaded by the CPU dispatcher. Good for reasonably small page tables (256 entries)! Large page tables (1 million entries) are kept in main memory. l Page-table base register (PTBR) points to the page table. l Page-table length register (PTLR) indicates size of the page table so as to minimize the amount of memory needed rather than allocate space for the full table! In this scheme every data/instruction access requires two memory accesses. One for the page table and one for the data/instruction.! The two memory access problem can be solved by the use of a special fast-lookup hardware cache called associative memory or translation look-aside buffers (TLBs) Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 17

18 Paging Hardware With TLB Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 18

19 Effective Access Time! Associative Lookup = ε time unit! Assume memory cycle time is x microsecond! Hit ratio percentage of times that a page number is found in the associative registers; ratio related to number of associative registers.! Hit ratio = α! Effective Access Time (EAT) EAT =?? Slide 19

20 Effective Access Time! Associative Lookup = ε time unit! Assume memory cycle time is x microsecond! Hit ratio percentage of times that a page number is found in the associative registers; ratio related to number of associative registers.! Hit ratio = α! Effective Access Time (EAT) EAT = (x + ε) α + (2x + ε)(1 α) = 2x α x + ε Slide 20

21 Effective Access Time! 20 nanosec to search TLB, 100 nanosec to access memory! TLB hit à?! TLB missà?! EAT with 80% hit ratio=?! EAT with 98% hit ratio =?! % slowdown in access time =? Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 21

22 ! 80% hit ratio Effective Access Time! 20 nanosec to search TLB, 100 nanosec to access memory! TLB hit à 20ns+100ns = 120ns! TLB missà 20ns + 100ns(page table lookup) + 100ns (physical memory lookup) = 220ns! Effective access time =.8* *220 = 140 ns (40% slowdown in access time)! 98% hit ratio à.98* *220 = 122ns (22% slowdown in access time) Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 22

23 Memory Protection! Memory protection in a paged environment is implemented by associating protection bits with each frame. l Bits specify execute-only, read-only, read-write or any combination! Valid-invalid bit attached to each entry in the page table: l valid indicates that the associated page is in the process logical address space, and is thus a legal page. l invalid indicates that the page is not in the process logical address space. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 23

24 Valid (v) or Invalid (i) Bit In A Page Table Page size 2KB, 14 bit address space à addresses 0 to 16,383 Program addresses 0 to 10,468 which is in frame 5, frames 6 and 7 are invalid Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 24

25 Page Table Structure! Hierarchical Paging! Hashed Page Tables! Inverted Page Tables Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 25

26 Hierarchical Page Tables! Most computers support a large logical address space (2 32 to 2 64 ) page table becomes excessively large l 32-bit logical address space with page size of 4KB How many entries the resulting page table has?! Break up the logical address space into multiple page tables.! A simple technique is a two-level page table. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 26

27 Hierarchical Page Tables! Most computers support a large logical address space (2 32 to 2 64 ) page table becomes excessively large l 32-bit logical address space with page size of 4KB (2 12 ) results in a page table of 1 million entries (2 32 /2 12 =1,048,575). l If each entry is 4 bytes, then each process may need up to 4MB of physical address space just for the page table! Break up the logical address space into multiple page tables.! A simple technique is a two-level page table. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 27

28 Two-Level Paging Example! A logical address (on 32-bit machine with 4K page size) is divided into: l a page number consisting of 20 bits. l a page offset consisting of 12 bits.! Since the page table is paged, the page number is further divided into: l a 10-bit page number. l a 10-bit page offset.! Thus, a logical address is as follows: page number! p 1! p 2! d! page offset! 10! 10! 12! where p 1 is an index into the outer page table, and p 2 is the displacement within the page of the outer page table. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 28

29 Two-Level, Forward-Mapped Page-Table Scheme Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 29

30 Address-Translation Scheme (32 bits) Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 30

31 Hashed Page Table Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 31

32 Inverted Page Table! Usually, each process has an associated page table. Each page table may consist of millions of entries consuming large amounts of physical memory.! Inverted page table uses one entry for each real frame of memory.! Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page! Only one page table in the system, but increases time needed to search the table when a page reference occurs.! Since may need to search the whole table for a match, use hash table to limit the search to one, or at most a few, page-table entries. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 32

33 Inverted Page Table Architecture Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 33

34 ! Shared code Shared Pages l One copy of read-only (reentrant) code shared among processes (i.e., text editors, compilers, window systems). l Shared code must appear in same location in the logical address space of all processes. l Important in time-sharing environments if 40 users execute a text editor that is 150KB of code and 50KB of data l How much memory we need? l By sharing the re-entrant code how much memory do we save? Slide 34

35 ! Shared code Shared Pages l One copy of read-only (reentrant) code shared among processes (i.e., text editors, compilers, window systems). l Shared code must appear in same location in the logical address space of all processes. l Important in time-sharing environments if 40 users execute a text editor that is 150KB of code and 50KB of data we would need 8,000KB of memory. By sharing the re-entrant code we reduce 6,000KB to 150KB! Private code and data l Each process keeps a separate copy of the private code and data. l The pages for the private code and data can appear anywhere in the logical address space. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 35

36 Shared Pages Example Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 36

37 Segmentation! Memory-management scheme that supports user view of memory.! A program is a collection of segments. A segment is a logical unit such as: main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, arrays Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 37

38 User s View of a Program Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 38

39 Logical View of Segmentation 1! 1! 4! 2! 3! 4! 2! 3! user space! physical memory space! Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 39

40 Segmentation Architecture! Logical address consists of a two tuple: <segment-number, offset>,! Segment table maps two-dimensional physical addresses; each table entry has: l base contains the starting physical address where the segments reside in memory. l limit specifies the length of the segment.! Segment-table base register (STBR) points to the segment table s location in memory.! Segment-table length register (STLR) indicates number of segments used by a program; segment number s is legal if s < STLR. Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 40

41 Segmentation Architecture (Cont.)! Protection. With each entry in segment table associate: l validation bit = 0 illegal segment l read/write/execute privileges! Protection bits associated with segments; code sharing occurs at segment level.! Since segments vary in length, memory allocation is a dynamic storage-allocation problem.! External fragmentation Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 41

42 Segmentation Hardware Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 42

43 Example of Segmentation! 2:53 or 2,53 refers to segment 2 byte 53 which is mapped to 4353! 0,1222 results in a trap to the OS as the segment is only 1000 bytes long Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 43

44 Sharing of Segments Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 44

45 Combined Paging & Segmentation Paging and segmentation have their strengths Paging transparent to the user, eliminates external fragmentation The pieces moved in and out of main memory are of fixed, equal size which enables the development of sophisticated algorithms that exploit this feature Segmentation visible to the programmer, can grow dynamically, enables sharing and protection by segment To combine the two, a user s address space is broken up into a number of segments at the discretion of the programmer Each segment is broken up into a number of fixed size pages, equal in length to a page frame Each segment has an associated page table When a process is running, a register holds the starting address of the segment table Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 45

46 Combined Paging & Segmentation Silberschatz / OS Concepts / 6e - Chapter 9 Memory Management Slide 46

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

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

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, 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

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

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

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

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

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

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

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

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

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

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition Chapter 11: File System Implementation 11.1 Silberschatz, Galvin and Gagne 2009 Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation

More information

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure Chapter 11: File System Implementation Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

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

& 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

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

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

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

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

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Secondary 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 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

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

Memory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs

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

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

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

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management. Overview Concepts of Mobile Operating Systems Lecture 11 Concepts of Mobile Operating Systems Mobile Business I (WS 2007/08) Prof Dr Kai Rannenberg Chair of Mobile Business and Multilateral Security Johann

More information

Chapter 11: File System Implementation. Operating System Concepts 8 th Edition

Chapter 11: File System Implementation. Operating System Concepts 8 th Edition Chapter 11: File System Implementation Operating System Concepts 8 th Edition Silberschatz, Galvin and Gagne 2009 Chapter 11: File System Implementation File-System Structure File-System Implementation

More information

CHAPTER 17: File Management

CHAPTER 17: File Management CHAPTER 17: File Management The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

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

Chapter 1 Computer System Overview

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

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

We r e going to play Final (exam) Jeopardy! Answers: Questions: - 1 - . (0 pts) We re going to play Final (exam) Jeopardy! Associate the following answers with the appropriate question. (You are given the "answers": Pick the "question" that goes best with each "answer".)

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

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

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

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

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

Chapter 2: OS Overview

Chapter 2: OS Overview Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:

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

System Virtual Machines

System Virtual Machines System Virtual Machines Introduction Key concepts Resource virtualization processors memory I/O devices Performance issues Applications 1 Introduction System virtual machine capable of supporting multiple

More information

Operating Systems. Steven Hand. Michaelmas / Lent Term 2008/09. 17 lectures for CST IA. Handout 3. Operating Systems N/H/MWF@12

Operating Systems. Steven Hand. Michaelmas / Lent Term 2008/09. 17 lectures for CST IA. Handout 3. Operating Systems N/H/MWF@12 Operating Systems Steven Hand Michaelmas / Lent Term 2008/09 17 lectures for CST IA Handout 3 Operating Systems N/H/MWF@12 What is an Operating System? A program which controls the execution of all other

More information

Chapter 1 8 Essay Question Review

Chapter 1 8 Essay Question Review Chapter 1 8 Essay Question Review 1. Explain why an operating system can be viewed as a resource allocator. Ans: A computer system has many resources that may be required to solve a problem: CPU time,

More information

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

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

Disk Space Management Methods

Disk Space Management Methods Volume 1, Issue 1, June 2013 International Journal of Advance Research in Computer Science and Management Studies Research Paper Available online at: www.ijarcsms.com Disk Space Management Methods Ramakrishna

More information

A3 Computer Architecture

A3 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 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

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

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

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

361 Computer Architecture Lecture 14: Cache Memory

361 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 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

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms Chapter 5: Process Scheduling To discuss evaluation criteria for selecting the CPUscheduling algorithm for a particular

More information

Chapter 1 13 Essay Question Review

Chapter 1 13 Essay Question Review Chapter 1 13 Essay Question Review Chapter 1 1. Explain why an operating system can be viewed as a resource allocator. Ans: A computer system has many resources that may be required to solve a problem:

More information

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner. Introduction to Operating System PCSC-301 (For UG students) (Class notes and reference books are required to complete this study) Release Date: 27.12.2014 Operating System Objectives and Functions An OS

More information

Using Synology SSD Technology to Enhance System Performance Synology Inc.

Using Synology SSD Technology to Enhance System Performance Synology Inc. Using Synology SSD Technology to Enhance System Performance Synology Inc. Synology_SSD_Cache_WP_ 20140512 Table of Contents Chapter 1: Enterprise Challenges and SSD Cache as Solution Enterprise Challenges...

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

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

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

Paging: Introduction. 18.1 A Simple Example And Overview

Paging: Introduction. 18.1 A Simple Example And Overview 18 Paging: Introduction It is sometimes said that the operating system takes one of two approaches when solving most any space-management problem. The first approach is to chop things up into variable-sized

More information

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing. CS143 Handout 18 Summer 2008 30 July, 2008 Processor Architectures Handout written by Maggie Johnson and revised by Julie Zelenski. Architecture Vocabulary Let s review a few relevant hardware definitions:

More information

This Unit: Virtual Memory. CIS 501 Computer Architecture. Readings. A Computer System: Hardware

This Unit: Virtual Memory. CIS 501 Computer Architecture. Readings. A Computer System: Hardware This Unit: Virtual CIS 501 Computer Architecture Unit 5: Virtual App App App System software Mem CPU I/O The operating system (OS) A super-application Hardware support for an OS Virtual memory Page tables

More information

How To Write A Virtual Machine (Or \"Virtual Machine\") On A Microsoft Linux Operating System (Or Microsoft) (Or Linux) ( Or Microsoft Microsoft Operating System) (For A Non-Power Os) (On A

How To Write A Virtual Machine (Or \Virtual Machine\) On A Microsoft Linux Operating System (Or Microsoft) (Or Linux) ( Or Microsoft Microsoft Operating System) (For A Non-Power Os) (On A Operating Systems Steven Hand Michaelmas Term 2010 12 lectures for CST IA Operating Systems N/H/MWF@12 Course Aims This course aims to: explain the structure and functions of an operating system, illustrate

More information

Big Data Technology Map-Reduce Motivation: Indexing in Search Engines

Big Data Technology Map-Reduce Motivation: Indexing in Search Engines Big Data Technology Map-Reduce Motivation: Indexing in Search Engines Edward Bortnikov & Ronny Lempel Yahoo Labs, Haifa Indexing in Search Engines Information Retrieval s two main stages: Indexing process

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 16: Virtual Machines. Operating System Concepts 9 th Edition

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition Chapter 16: Virtual Machines Silberschatz, Galvin and Gagne 2013 Chapter 16: Virtual Machines Overview History Benefits and Features Building Blocks Types of Virtual Machines and Their Implementations

More information

EZManage V4.0 Release Notes. Document revision 1.08 (15.12.2013)

EZManage V4.0 Release Notes. Document revision 1.08 (15.12.2013) EZManage V4.0 Release Notes Document revision 1.08 (15.12.2013) Release Features Feature #1- New UI New User Interface for every form including the ribbon controls that are similar to the Microsoft office

More information

Operating Systems 4 th Class

Operating Systems 4 th Class Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science

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

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization Lesson Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization AE3B33OSD Lesson 1 / Page 2 What is an Operating System? A

More information

WHITE PAPER Optimizing Virtual Platform Disk Performance

WHITE PAPER Optimizing Virtual Platform Disk Performance WHITE PAPER Optimizing Virtual Platform Disk Performance Think Faster. Visit us at Condusiv.com Optimizing Virtual Platform Disk Performance 1 The intensified demand for IT network efficiency and lower

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

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

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 2: Operating System Structures Prof. Alan Mislove (amislove@ccs.neu.edu) Operating System Services Operating systems provide an environment for

More information

OS OBJECTIVE QUESTIONS

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

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

Original-page small file oriented EXT3 file storage system

Original-page small file oriented EXT3 file storage system Original-page small file oriented EXT3 file storage system Zhang Weizhe, Hui He, Zhang Qizhen School of Computer Science and Technology, Harbin Institute of Technology, Harbin E-mail: wzzhang@hit.edu.cn

More information

Putting it all together: Intel Nehalem. http://www.realworldtech.com/page.cfm?articleid=rwt040208182719

Putting it all together: Intel Nehalem. http://www.realworldtech.com/page.cfm?articleid=rwt040208182719 Putting it all together: Intel Nehalem http://www.realworldtech.com/page.cfm?articleid=rwt040208182719 Intel Nehalem Review entire term by looking at most recent microprocessor from Intel Nehalem is code

More information

Computer Organization and Architecture. Characteristics of Memory Systems. Chapter 4 Cache Memory. Location CPU Registers and control unit memory

Computer Organization and Architecture. Characteristics of Memory Systems. Chapter 4 Cache Memory. Location CPU Registers and control unit memory Computer Organization and Architecture Chapter 4 Cache Memory Characteristics of Memory Systems Note: Appendix 4A will not be covered in class, but the material is interesting reading and may be used in

More information

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont. Objectives To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system Chapter 2: Operating-System Structures

More information

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

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

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture Operating System Concepts 2.1 Computer-System Architecture

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

Chapter 10: Virtual Memory. Lesson 03: Page tables and address translation process using page tables

Chapter 10: Virtual Memory. Lesson 03: Page tables and address translation process using page tables Chapter 10: Virtual Memory Lesson 03: Page tables and address translation process using page tables Objective Understand page tables Learn the offset fields in the virtual and physical addresses Understand

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

Chapter 13: Query Processing. Basic Steps in Query Processing

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

Chapter 14 MS-DOS Operating System

Chapter 14 MS-DOS Operating System Understanding Operating Systems, Fifth Edition 14-1 Chapter 14 MS-DOS Operating System At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional

More information

Physical Data Organization

Physical Data Organization Physical Data Organization Database design using logical model of the database - appropriate level for users to focus on - user independence from implementation details Performance - other major factor

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

Devices and Device Controllers

Devices and Device Controllers I/O 1 Devices and Device Controllers network interface graphics adapter secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors... I/O 2 Bus Architecture

More information

Chapter 12 File Management

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

More information

HY345 Operating Systems

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

File-System Implementation

File-System Implementation File-System Implementation 11 CHAPTER In this chapter we discuss various methods for storing information on secondary storage. The basic issues are device directory, free space management, and space allocation

More information

Origins of Operating Systems OS/360. Martin Grund HPI

Origins of Operating Systems OS/360. Martin Grund HPI Origins of Operating Systems OS/360 HPI Table of Contents IBM System 360 Functional Structure of OS/360 Virtual Machine Time Sharing 2 Welcome to Big Blue 3 IBM System 360 In 1964 IBM announced the IBM-360

More information

Distributed File Systems

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