1 Pertemuan 16 Isu-Isu pada Sistem Paging dan Segmentasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.

Slides:



Advertisements
Similar presentations
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Advertisements

Chapter 4 Memory Management Basic memory management Swapping
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Chapter 3 Memory Management
Memory Management.
Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Memory Management Paging &Segmentation CS311, CS350 & CS550.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 Virtual Memory Management B.Ramamurthy. 2 Demand Paging Main memory LAS 0 LAS 1 LAS 2 (Physical Address Space -PAS) LAS - Logical Address.
CSC 322 Operating Systems Concepts Lecture - 18: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Memory Management Design & Implementation Segmentation Chapter 4.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
1 Pertemuan 24 Sistem Operasi Unix Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Memory Management (II)
Lecture 11: Memory Management
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Paging Design.
Memory Management 2010.
Chapter 3.2 : Virtual Memory
1 Pertemuan 11 Manajemen Memori Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS02.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Operating System Machine.
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Chapter 3 Memory Management 3.7 Segmentation. A compiler has many tables that are built up as compilation proceeds, possibly including: The source text.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Computer Organization and Architecture Operating System Support Chapter 8.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
CS333 Intro to Operating Systems Jonathan Walpole.
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Memory Management Page replacement algorithms, segmentation Tanenbaum, ch. 3 p Silberschatz, ch. 8, 9 p
Memory Management From Chapter 4, Modern Operating Systems, Andrew S. Tanenbaum.
Cosc 3P92 Week 9 & 10 Lecture slides
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Chapter 4 Memory Management Virtual Memory.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
Chapter 4 Memory Management Segmentation. (a) One address space. (b) Separate I and D spaces. Separate Instruction and Data Spaces.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
1 Pertemuan 22 Implementasi Sistem File Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Virtual Memory Various memory management techniques have been discussed. All these strategies have the same goal: to keep many processes in memory simultaneously.
操作系统原理 OPERATING SYSTEM Chapter 3 Memory Management 内存管理.
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
1 Memory Management Chapter Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement.
1 Memory Management Adapted From Modern Operating Systems, Andrew S. Tanenbaum.
Memory Management Chapter 3
SLC/VER1.0/OS CONCEPTS/OCT'99
Memory Management Paging (continued) Segmentation
Pertemuan 12 Manajemen Memory (Lanjutan)
Chapter 9: Virtual Memory
Page Replacement Implementation Issues
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Chapter 9: Virtual-Memory Management
Page Replacement.
Memory Management Paging (continued) Segmentation
Main Memory Background Swapping Contiguous Allocation Paging
The Operating System Machine Level
Page Replacement Implementation Issues
Chapter 4: Memory Management
Lecture 37 Syed Mansoor Sarwar
Memory Management Paging (continued) Segmentation
Presentation transcript:

1 Pertemuan 16 Isu-Isu pada Sistem Paging dan Segmentasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : menjelaskan isu-isu perancangan dan implementasi sistem paging serta segmentasi (C2)

3 Outline Materi Isu perancangan –Local vs Global Allocation policies –Page fault rates –Page size –Shared pages Isu implementasi –Page fault handling –Instruction backup –Locking pages –Backing stores Segmentasi

4 ISU PERANCANGAN

5 Local versus Global Allocation Policies (1) Original configuration Local page replacement Global page replacement

6 Local versus Global Allocation Policies (2) Page fault rate as a function of the number of page frames assigned

7 Load Control Despite good designs, system may still thrash When PFF algorithm indicates –some processes need more memory –but no processes need less Solution : Reduce number of processes competing for memory –swap one or more to disk, divide up pages they held –reconsider degree of multiprogramming

8 Page Size (1) Small page size Advantages  programs need many pages, larger page tables Disadvantages  less internal fragmentation  better fit for various data structures, code sections  less unused program in memory

9 Page Size (2) Overhead due to page table and internal fragmentation Where –s = average process size in bytes –p = page size in bytes –e = page entry page table space internal fragmentation Optimized when

10 ISU IMPLEMENTASI

11 Isu Implementasi Page Fault Handling 1.Hardware traps to kernel 2.General registers saved 3.OS determines which virtual page needed 4.OS checks validity of address, seeks page frame 5.If selected frame is dirty, write it to disk 6.OS brings schedules new page in from disk 7.Page tables updated 8.Faulting instruction backed up to when it began 9.Faulting process scheduled 10.Registers restored Program continues …

12 Locking Pages in Memory Virtual memory and I/O occasionally interact Proc issues call for read from device into buffer –while waiting for I/O, another processes starts up –has a page fault –buffer for the first proc may be chosen to be paged out Need to specify some pages locked –exempted from being target pages

13 Backing Store (a) Paging to static swap area (b) Backing up pages dynamically

14 SEGMENTATION

15 Segmentation (1) One-dimensional address space with growing tables One table may bump into another

16 Segmentation (2) Allows each table to grow or shrink, independently

17 Segmentation (3) Comparison of paging and segmentation

18 Implementation of Pure Segmentation (a)-(d) Development of checkerboarding (e) Removal of the checkerboarding by compaction

19 Segmentation with Paging: MULTICS (1) Descriptor segment points to page tables Segment descriptor – numbers are field lengths

20 Segmentation with Paging: MULTICS (2) A 34-bit MULTICS virtual address

21 Segmentation with Paging: MULTICS (3) Conversion of a 2-part MULTICS address into a main memory address

22 Segmentation with Paging: Pentium (1) A Pentium selector

23 Segmentation with Paging: Pentium (2) Pentium code segment descriptor Data segments differ slightly

24 Segmentation with Paging: Pentium (3) Conversion of a (selector, offset) pair to a linear address

25 Segmentation with Paging: Pentium (4) Mapping of a linear address onto a physical address