ICS Principles of Operating Systems

Slides:



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

Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Operating Systems Review.
Virtual Memory Operating System Concepts chapter 9 CS 355
9.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory OSC: Chapter 9. Demand Paging Copy-on-Write Page Replacement.
Module 9: Virtual Memory
Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing.
1 Thursday, July 06, 2006 “Experience is something you don't get until just after you need it.” - Olivier.
Virtual Memory Introduction to Operating Systems: Module 9.
Gordon College Stephen Brinton
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 9: Virtual Memory Background.
Virtual Memory Chapter 8.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Operating Systems Final Exam Review. Topics Paging Virtual Memory File Systems I/O Devices Project 3: Macro Shell.
Computer Organization and Architecture
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
1 Review for Final Exam Memory management Three central questions File system I/O system Network Protection Security.
1 Tuesday, July 04, 2006 "Programs expand to fill the memory available to hold them." - Modified Parkinson’s Law.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
Page 19/17/2015 CSE 30341: Operating Systems Principles Optimal Algorithm  Replace page that will not be used for longest period of time  Used for measuring.
CS 153 Design of Operating Systems Spring 2015 Final Review.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Discussion Week 10 TA: Kyle Dewey. Overview TA Evaluations Project #3 PE 5.1 PE 5.3 PE 11.8 (a,c,d) PE 10.1.
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Operating Systems CMPSC 473 Virtual Memory Management (4) November – Lecture 22 Instructor: Bhuvan Urgaonkar.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Page Replacement Allocation of.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
CS 241 Section Week #9 (11/05/09). Topics MP6 Overview Memory Management Virtual Memory Page Tables.
Homework Assignment #3 J. H. Wang Nov. 19, Homework #3 Chap.7: 7.5, 7.10 Chap.8: 8.6, 8.10 Chap.9: 9.3, 9.6 Due: two weeks (Dec. 3, 2009)
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Implementation.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples (not covered.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
Chapter 9: Virtual Memory
Virtual Memory Chapter 8.
Chapters 3 and 5 Possible questions
OPERATING SYSTEM CONCEPTS AND PRACTISE
Memory Management (2).
Jonathan Walpole Computer Science Portland State University
Chapter 9: Virtual Memory – Part I
Chapter 8 Virtual Memory
Virtual Memory Chapter 8.
Module 9: Virtual Memory
Operating Systems Review.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Lecture 39 Syed Mansoor Sarwar
5: Virtual Memory Background Demand Paging
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
Caching Principles and Paging Performance
Virtual Memory فصل هشتم.
So far in memory management…
Caching Principles and Paging Performance
Contents Memory types & memory hierarchy Virtual memory (VM)
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
Computer Architecture
Operating Systems CMPSC 473
Virtual Memory: Working Sets
CS703 - Advanced Operating Systems
CSE 542: Operating Systems
Module 9: Virtual Memory
CSE 542: Operating Systems
Clock Algorithm Example
Virtual Memory 1 1.
Presentation transcript:

ICS 143 - Principles of Operating Systems Discussion 10 - HW4 review Joe Nash jmnash@uci.edu

Homework 4 Q1 Time 1 2 3 4 5 6 7 8 9 10 11 12 RS e c b a g d F0 F1 F2 Page fault? x - 1. Optimal Total page fault: 7

Homework 4 Q1 Time 1 2 3 4 5 6 7 8 9 10 11 12 RS e c b a g d F0 F1 F2 Page fault? x - 2. LRU Total page fault: 9

Homework 4 Q1 Time 1 2 3 4 5 6 7 8 9 10 11 12 RS e c b a g d F0 F1 F2 Page fault? x - 3. LRU approximation algorithm: Second chance Total page fault: 8

Homework 4 Q2 Paging and TLB (24 points) A computer keeps its page tables in memory. The overhead required for reading a value from memory is 3 microseconds. The computer has TLB, which holds pairs (virtual page, physical page frame). What is the effective access time if the TLB has access time of 500ns and we observe a 80% TLB hit rate? Show your work. EAT = (3us + 500ns)*0.8 + (6us + 500ns)*(1-0.8) = 4.1us What is the effective access time if the TLB has access time of 800ns and we observe a 95% TLB hit rate? Show your work. EAT = (3us + 800ns)*0.95 + (6us + 800ns)*(1-0.95) = 3.95us

Homework 4 Q3 In the above diagram, what is the term for the phenomena occurring in region A? Thrashing What is one way to control the phenomena? Establish an acceptable page-fault rate Name one system other than paging which may exhibit the phenomena. Cache, TLB, heap, process scheduling (anytime you spend more time swapping than using something)

Homework 4 Q3 Consider a file currently consisting of 100 blocks. Assume that the filecontrol block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow at the beginning but there is room to grow at the end. Also assume that the block information to be added is stored in memory. Textbook section 12.4 You need to read something and then write it elsewhere to move it Doing things in memory is ‘free’

Homework 4 Q3 Credit: Abraham_Silberschatz-Operating_System_Concepts__9t

Homework 4 Q3 a. The block is added at the beginning. Consider a file currently consisting of 100 blocks. Assume that the filecontrol block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow at the beginning but there is room to grow at the end. Also assume that the block information to be added is stored in memory. a. The block is added at the beginning. b. The block is added in the middle. c. The block is added at the end. d. The block is removed from the beginning. e. The block is removed from the middle. f. The block is removed from the end. Answer: Contiguous Linked Indexed a. 201 1 1 b. 101 52 1 c. 1 3 1 d. 198 1 0 e. 98 52 0 f. 0 100 0

Homework 4 Q5 Limit?

Homework 4 Q5 STBR 111010 Memory address contents note 10 110 S1PD 11 1000 100 1010 101 1100 1110 S1PT1 111 10000 10010 S1PT2 1001 10100 10110 S1PT3 1011 11000 11010 S1PT4 1101 11100 10001101 S1F1 1111 1000101 11001011 S1F2 10001 101001 10010 101010 S1F3 10011 11010001 10100 11001 S1F4 10101 10111100 10110 111100 S1F5 10111 11110100 11000 11111000 S1F6 1001011 11010 11011101 S1F7 11011 10000111 11100 1000101 S1F8 11101 11110 100010 S2PD 11111 100100 100000 100110 100001 101000 101010 S2PT1 100011 101100 101110 S2PT2 100101 110000 110010 S2PT3 100111 110100 110110 S2PT4 101001 111000 10000111 S2F1 101011 10001010 10010010 S2F2 101101 10010011 101110 11001011 S2F3 101111 100000 110000 10110101 S2F4 110001 110010 10111100 S2F5 110011 10111000 110100 10101100 S2F6 110101 11011 110110 11111100 S2F7 110111 10110100 111000 S2F8 111001 1101001 111010 10 seg table 111011 11110

Homework 4 Q5 Virtual Address Value 01010101 (example) 01110001 10110101 01110001 10110100 00100100 11111000 00000101 101001 01000000 10000111 00010001 11010001

Topics to review for the final Everything from the review lecture Homework problems

Any questions? Good luck on the final