Week 10 March 10, 2004 Adrienne Noble. Important Dates Project 4 due tomorrow (Friday) Final Exam on Tuesday, March 16, 2:30- 4:20pm.

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.
Virtual Memory: Page Replacement
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
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.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
1 Virtual Memory vs. Physical Memory So far, all of a job’s virtual address space must be in physical memory However, many parts of programs are never.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Memory Management 2010.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
CS-3013 & CS-502, Summer 2006 Review Topics1 CS-3013 & CS-502 Operating Systems.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
Operating Systems Final Exam Review. Topics Paging Virtual Memory File Systems I/O Devices Project 3: Macro Shell.
Virtual Memory and Paging J. Nelson Amaral. Large Data Sets Size of address space: – 32-bit machines: 2 32 = 4 GB – 64-bit machines: 2 64 = a huge number.
Computer Organization and Architecture
1 CSE451 - Section Last section! Project 4 due tomorrow Today: Some practice for the exam “Big picture” review tomorrow Evaluations Project 3 +
Week 7 February 17, 2004 Adrienne Noble. Important Dates Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8.
Operating Systems ECE344 Ding Yuan Page Replacement Lecture 9: Page Replacement.
Virtual Memory.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
Silberschatz and Galvin  Chapters 3 and 5 Possible questions –Tracing a given program involving fork, exec, semaphores, and share memory –Wring.
CS 153 Design of Operating Systems Spring 2015 Final Review.
Memory Management From Chapter 4, Modern Operating Systems, Andrew S. Tanenbaum.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
CS414 Review Session.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
1 Rutgers UniversityCS 416: Operating Systems Final exam details December 22, pm-3pm. Venue: SEC 118. Tips: Spend time reading the questions before.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
IT 344: Operating Systems Winter 2010 Module 23 Course Review Chia-Chi Teng CTB 265.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
1 Memory Management Adapted From Modern Operating Systems, Andrew S. Tanenbaum.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Background Virtual memory – separation of user logical memory.
Chapters 3 and 5 Possible questions
CS161 – Design and Architecture of Computer
Section 10: Last section! Final review.
ECE232: Hardware Organization and Design
CS161 – Design and Architecture of Computer
Paging COMP 755.
Section 10: Last section! Final review.
Review.
EECE.4810/EECE.5730 Operating Systems
Chapter 9: Virtual-Memory Management
CSE 451: Operating Systems Winter 2007 Module 24 Course Review
CSE 451: Operating Systems Spring 2005 Module 23 Course Review
CSE 451: Operating Systems Spring 2005 Module 23 Course Review
CSE451 - Section 10.
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE451 Virtual Memory Paging Autumn 2002
CSE 451: Operating Systems Winter 2006 Module 24 Course Review
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Reminders Project 4 due tomorrow, 4:00pm Review lecture tomorrow
Computer Architecture
Review for final Anything’s fair game, but emphasis on more recent stuff.
Last section! Project 4 + EC due tomorrow Today: Project 4 questions
CSE451 - Section 10.
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.
COMP755 Advanced Operating Systems
Virtual Memory.
Module IV Memory Organization.
Presentation transcript:

Week 10 March 10, 2004 Adrienne Noble

Important Dates Project 4 due tomorrow (Friday) Final Exam on Tuesday, March 16, 2:30- 4:20pm

Questions? Lecture Project 4

Pre-Midterm Topics Basic OS components and architectural support Processes User versus protected mode Threads Synchronization Mutexes Semaphores Monitors Condition variables Deadlock Scheduling

Memory Management Multiprogramming brought some problems Protection Fast memory access Consistent way to talk to memory So we use virtual addresses

Address Translation

Segmentation Partitions an address space into logical units Today usually code, stack, heap, etc. Advantages Nice to have logical blocks Disadvantages Can lead to bad external fragmentation

Paging Partitions memory into fixed sized chunks Usually used with segmentation One page table per segment

Page Faults OS uses main memory as a cache of disk storage Just keep accessed pages in main memory How it happens: PTE set as invalid when page was evicted Causes an exception to be thrown when a process tries to access an invalid page OS runs page fault handler Uses invalid PTE to locate page on disk (possibly through another data structure) Gets an empty physical page frame from page replacement algorithm Reads page into physical page frame Updates PTE to point to that physical page and be valid OS restarts faulting process (by putting it on the ready queue)

Page Replacement Chooses “best” page to evict when more space is needed Algorithms Belady’s Algorithm – optimal (page that will be reference furthest in the future) FIFO – page that was brought in longest ago LRU – least recently used LRU clock – approximation of LRU Hypothetical Working Set Algorithm – try optimize memory given to each process by looking at their working sets Page Fault Frequency – try to equalize the page fault rate between processes Thrashing – when the system uses most of it’s time dealing with page faults and very little time doing actual work

Page Tables One level page table Simple, but takes lots of space Two/Three/Four level page tables Save space Only need to allocate the blocks that actually contain data Can page page tables in and out of memory Slower because more memory accesses are needed Solution? TLB Cache virtual to physical translations Fully associative (all entries searched in parallel) Implemented in hardware >99% hit rate

Disks Performance depends on Seek – how fast the disk arm can move Rotation – how fast the disk can rotate Transfer – getting data from disk surface to memory Disk Scheduling FCFS – ok when load is low SSTF – minimize seek time, but favors middle blocks and can cause starvation (why?) SCAN – elevator, favors middle blocks C-SCAN – one way elevator

File Systems cse451fs File names, inodes, writing/reading Protection ACLs – list of who has access to file Capabilities – easy to transfer (like keys) Disks are divided up:

BSD UNIX Fast File System Cylinder groups Blocks for one file must all be located in the same cylinder (along with the file’s inode too) Seek times are shorter Increased block size – 4KB Faster More internal fragmentation Aware of hardware Knows about disk parameters, so it can optimize operations More complicated code

Berkley Log-Structured File System Uses disk as a log Written only at one end Challenges Locating inodes Keep an inode map at fixed location Free space management Divide disk into segments, then clean and combine those segments periodically

RAID Goals - speed and reliability Level 0 Striped Level 1 Striped and mirrored Level 2,3,4 Parity disk Level 5 Interleaved distributed parity

Networking IP (Internet Protocol) A way of naming hosts and routing packets between hosts TCP (Transmission Control Protocol) Makes reliable multi-packet messages Abstraction above IP

Distributed Systems Loosely coupled Network protocols Autonomous systems Closely coupled Single OS Shares logical and physical resources

RPC (Remote Procedure Call) Used to call a method on a remote host Server publishes API Client does local procedure calls Calls a stub which manages the details using the RPC runtime system Transparent to the programmer

Security Authentication Username/password Public/private keys Authorization Keep track of user’s read/write access to different objects Auditing Record what’s going on

Other Tips Refresh your knowledge about the projects Review lecture notes and homework problems Congratulations on making it through a tough class!