CS 153 Design of Operating Systems Spring 2015 Final Review 2.

Slides:



Advertisements
Similar presentations
Operating Systems Review.
Advertisements

Memory management.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
File Systems.
Virtual Memory. The Limits of Physical Addressing CPU Memory A0-A31 D0-D31 “Physical addresses” of memory locations Data All programs share one address.
May 7, A Real Problem  What if you wanted to run a program that needs more memory than you have?
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
1 A Real Problem  What if you wanted to run a program that needs more memory than you have?
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Virtual Memory Adapted from lecture notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
File System Implementation
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
File System Implementation CSCI 444/544 Operating Systems Fall 2008.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Csci4203/ece43631 Review Quiz. 1)It is less expensive 2)It is usually faster 3)Its average CPI is smaller 4)It allows a faster clock rate 5)It has a simpler.
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
Virtual Memory CSCI 444/544 Operating Systems Fall 2008.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
Operating Systems Review. Outline Intro –What is an OS, OS History Operating System Concepts –Processes, Files, System Calls, Shells Operating System.
©UCB CS 161 Ch 7: Memory Hierarchy LECTURE 24 Instructor: L.N. Bhuyan
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Chapter 11: File System Implementation Hung Q. Ngo KyungHee University Spring 2009
CS 153 Design of Operating Systems Spring 2015 Final Review.
Problems discussed in the review session for the final COSC 4330/6310 Summer 2012.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
File System Implementation
CS 153 Design of Operating Systems Spring 2015 Lecture 21: File Systems.
1 Some Real Problem  What if a program needs more memory than the machine has? —even if individual programs fit in memory, how can we run multiple programs?
CS 241 Section Week #9 (11/05/09). Topics MP6 Overview Memory Management Virtual Memory Page Tables.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
1 Rutgers UniversityCS 416: Operating Systems Final exam details December 22, pm-3pm. Venue: SEC 118. Tips: Spend time reading the questions before.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
CSE 451: Operating Systems Section 9: Storage; networks.
Virtual Memory Questions answered in this lecture: How to run process when not enough physical memory? When should a page be moved from disk to memory?
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Lecture Topics: 12/1 File System Implementation –Space allocation –Free Space –Directory implementation –Caching Disk Scheduling File System/Disk Interaction.
Week 10 March 10, 2004 Adrienne Noble. Important Dates Project 4 due tomorrow (Friday) Final Exam on Tuesday, March 16, 2:30- 4:20pm.
Lecture Topics: 11/22 HW 7 File systems –block allocation Unix and NT –disk scheduling –file caches –RAID.
Test 2 Preparation. General Information Close book, close notes Review online course notes and read the book. You may work on some exercise problems at.
Virtual Memory Chapter 8.
CS161 – Design and Architecture of Computer
Vivek Seshadri 15740/18740 Computer Architecture
ECE232: Hardware Organization and Design
CS161 – Design and Architecture of Computer
A Real Problem What if you wanted to run a program that needs more memory than you have? September 11, 2018.
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
File System Structure How do I organize a disk into a file system?
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
Lecture 45 Syed Mansoor Sarwar
Virtual Memory Hardware
Lecture 15 Reading: Bacon 7.6, 7.7
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Semester Review Brian Kocoloski
CSC3050 – Computer Architecture
Computer Architecture
Review for final Anything’s fair game, but emphasis on more recent stuff.
Secondary Storage Management Hank Levy
Lecture 9: Caching and Demand-Paged Virtual Memory
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Cache writes and examples
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
Presentation transcript:

CS 153 Design of Operating Systems Spring 2015 Final Review 2

True of False? l For machines with 32-bit addresses (i.e. a 4GB address space), since 4GB physical memories are common and cheap, virtual memory is really no longer needed. l Answer: False 2

True of False? l A TLB miss could occur even though the requested page was in memory. l Answer: True 3

True of False? l A smaller page size leads to smaller page tables l Answer: False 4

True of False? l A smaller page size leads to more TLB misses l Answer: True 5

True of False? l A program allocating 100MB of memory cost only 100MB of memory l Answer: False 6

True of False? l The optimal page replacement algorithm is the best choice in practice l Answer: False 7

True of False? l Open() in NFS client translates into a RPC call into the server l Answer: False 8

True of False? l Belady’s page replacement algorithm = LRU l Answer: False 9

True of False? l An Android app can read the memory of another app l Answer: False 10

11 Cache Physical Memory Virtual Memory Disk

12 X * 50 + (1-X) * 500 = 75  450X = 425  X = 94.4%

13 LOOK ~= SCAN except that it “looks” ahead to see if any requests are pending in the forward direction. If not, it may serve requests in the reverse direction. (Exactly the same algorithm as elevators) 1 2

14

l (18 points) In class we described three file descriptor structures: (a) Indexed files. (b) Linked files. (c) Contiguous (extent-based) allocation. Each of the structures has its advantages and disadvantages depending on the goals for the file system and the expected file access pattern. For each of the following situations, rank the three structures in order of preference. Be sure to include the justification for your rankings. (a) You have a file system where the most important criteria is the performance of sequential access to very large files. (b) You have a file system where the most important criteria is the performance of random access to very large files (c) You have a file system where the most important criteria is the utilization of the disk capacity (i.e. getting the most file bytes on the disk). 15

Revisiting questions l What causes your code to “dump a core file” when you access a NULL pointer? l Why can multi-threaded code be slower than single- threaded code? 16

OS Principles l Tradeoffs u Performance (e.g., speed) u Cost (e.g., memory) u Complexity (e.g., difficulty to reason, lines of code) u … l Optimize for common case and make the corner case work u Cache (replacement algorithm), inode structure, scheduling, etc. u Security, however, is often scrutinizing the corner cases l You can always solve a problem with an extra layer of indirection u Virtual memory (indirection of virtual to physical address) 17

18 The End l Congratulations on surviving CS 153! u It’s a challenging course, but I hope you found it worthwhile l Good luck for the final!