Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?

Slides:



Advertisements
Similar presentations
Module 10: Virtual Memory
Advertisements

Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Part IV: Memory Management
Operating Systems Review.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 13: Main Memory (Chapter 8)
Virtual Memory Management G. Anuradha Ref:- Galvin.
File Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Process Creation 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.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
CS 311 – Lecture 21 Outline Memory management in UNIX
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
CS4513 Distributed Computer Systems Review. What is a file descriptor? –What information must it contain? –What information might it contain?
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
CS 104 Introduction to Computer Science and Graphics Problems
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
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.
Chapter 10: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 10: 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.
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.
Operating Systems Final Exam Review. Topics Paging Virtual Memory File Systems I/O Devices Project 3: Macro Shell.
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 9: Virtual Memory.
Operating Systems Review. Outline Intro –What is an OS, OS History Operating System Concepts –Processes, Files, System Calls, Shells Operating System.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
Review. Questions F What are two functions of an OS? F What “layer” is above the OS? F What “layer” is below the OS?
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
Slide 12-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter Virtual Memory.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Virtual Memory.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Silberschatz and Galvin  Chapters 3 and 5 Possible questions –Tracing a given program involving fork, exec, semaphores, and share memory –Wring.
Part 8: Virtual Memory. Silberschatz, Galvin and Gagne ©2005 Virtual vs. Physical Address Space Each process has its own virtual address space, which.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
SWE202 Review. Processes Process State As a process executes, it changes state – new: The process is being created – running: Instructions are being.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Page Replacement Allocation of.
(a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not necessarily the same in each execution. What.
Memory Management & Virtual Memory © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
1/31/20161 Final Exam Dec 10. Monday. 4-7pm. Phelp 1160 Similar to midterm The exam is closed book. You can bring 2 page of notes (double sided) Nachos.
Chapter 9: Virtual-Memory Management. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 9: Virtual-Memory Management 9.1 Background.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
MIDTERM REVIEW CSCC69 Winter 2016 Kanwar Gill. What is an OS? What are processes and threads? Process states? Diagram showing the state changes What data.
Chapters 3 and 5 Possible questions
UNIT–IV: Memory Management
Section 10: Last section! Final review.
Review.
Module 9: Virtual Memory
Chapter 9: Virtual Memory
Chapter 9: Virtual-Memory Management
Operating Systems Review.
Chapter 15 – Part 1 The Internal Operating System
Lecture 40 Syed Mansoor Sarwar
5: Virtual Memory Background Demand Paging
Chapter 9: Virtual Memory
CSE451 - Section 10.
Operating Systems Lecture 1.
Operating Systems CMPSC 473
Last section! Project 4 + EC due tomorrow Today: Project 4 questions
CSE451 - Section 10.
CSE 153 Design of Operating Systems Winter 2019
Module 9: Virtual Memory
COMP755 Advanced Operating Systems
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
Virtual Memory.
CSE 542: Operating Systems
Presentation transcript:

Operating Systems Review

Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?

Questions What causes OS to change? –Or, why aren’t we still running MS-DOS? What is a process? What is a file?

True or False Unix is a “simple structure” OS Micro Kernels are faster than other OSes Virtual Machines are faster than other OSes

Questions Name 3 operating system structures Give one advantage of each Give one disadvantage of each

Questions How does a shell work? Or … arrange the commands in order: wait() pid = fork() exec() gets() while(1) { }

Review What is a PCB? Usually the PCB is in OS memory only. Assume we put the PCB into a processes address space. What problems might this cause?

Review List steps that occur during interrupt True or False: –Context switch times happen every 5-10 seconds –Most processes have long CPU burst times

Review What is (average) waiting time? Explain how SJF works True or False: –FCFS is optimal in terms of avg waiting time –Most processes are CPU bound –The shorter the time quantum, the better

Questions How does Windows NT/2000 avoid process starvation?

Review What is a “race condition”? What are 3 properties necessary for a correct “critical region” solution? What is Peterson’s Solution?

Possible Outputs? int main() { int *num, shm_id shm_id = shmget(502) num = (int *) shmat(shm_id) fork() *num = *num + 1 printf("%d\n", *num) } (Assume shm is 0 when first Created)

Possible Outputs? int num = 0; int main() { fork(); num = num + 1 printf("%d\n", *num) } What if fork() was spawn ()?

Review What does Test_and_Set do? What is one major advantage of semaphores over the Test_and_Set or Peterson’s solution?

Review What is the Memory Management Unit? What is a relocation register? What happens to it during a context switch?

Review What are some of the sections in an object module? What are some of the steps that occur during linking?

Review What is internal fragmentation? What is external fragmentation? What is compaction?

True or False With paging, a process’ logical address spaces is contiguous With paging, a process’ physical address spaces is contiguous Paging reduces the size of the possible address space used by a process

Review Does paging have fragmentation? –No? Then why not? –Yes? Then what kind? What are the overheads associated with paging?

Another Paging Example Consider: –8 bits in an address –3 bits for the frame/page number How many bytes (words) of physical memory? How many frames are there? How many bytes is a page? How many bits for page offset? If a process’ page table is 12 bits, how many logical pages does it have?

Review What is run-time, dynamic linking?

Review True or False: a)The logical address space cannot be bigger than the physical address space b)Processes have big address spaces because they always need them Demand paging: a)Is unrelated to basic paging b)Brings logical pages into physical memory when requested by a process c)Increases memory requirements for a system d)All of the above e)None of the above

First-In-First-Out (FIFO) Frames / Process 1,2,3,4,1,2,5,1,2,3,4, Page Faults How man page faults would we have if we had 4 Frames/Process?

Review Page faults –What is a page fault? –What does an OS do during a page fault? What is a Page Replacement Algorithm? –What is “Belady’s Anomaly”? –How does the Optimal algorithm work? –How does Enhanced Second Chance work? What is thrashing? –How do we fix it?

Page Replacement Algorithms: Counting Keep a counter of number of references –LFU - replace page with smallest count + Can decay values by shift –MFU - replace page with largest count + smallest count just brought in and will probably be used Problems?

Review What is a file descriptor? –What information must it contain? –What information might it contain?

Linked-List with Index How many files are there? How large are they? How many free blocks are there? Physical Block 0 1 null

I-Node How many data blocks are there? If you added 3 more data blocks to the file, what would happen? Disk blocks i-node null 62 77

Review Directories: –In what way is a directory different than a file? –In what way is a directory similar to a file? Aliases: –Describe a hard-link –Describe a soft-link Free space management: –What are two common methods of keeping track of free blocks?

Flo00 What is journaling? How is it used in modern file systems? How do large disks cause problems for some file systems? How are those problems addressed in modern file systems?

SCG+00 What are three classes of applications handled by typical OSes? What components does QLinux provide?

SCG+00 What are the two classes used in this test? Draw conclusions from the graph