CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

Size: px
Start display at page:

Download "CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018"

Transcription

1 CSE 4/521 Introduction to Operating Systems Lecture 27 (Final Exam Review) Summer 2018

2 Overview Objective: Revise topics and questions for the final-exam. 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 2

3 Overview 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 3

4 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 4

5 Background Logical address generated by the CPU; also referred to as virtual address Physical address address seen by the memory unit Logical address space is the set of all logical addresses generated by a program Physical address space is the set of all physical addresses generated by a program A pair of base and limit registers define the logical address space 5

6 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 6

7 Swapping A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution 7

8 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 8

9 Contiguous Memory Allocation(1/2) External Fragmentation total memory space exists to satisfy a request, but it is not contiguous Internal Fragmentation allocated memory may be slightly larger than requested memory; this size difference is wasted memory internal to a partition 9

10 Contiguous Memory Allocation(2/2) Multiple-partition Allocation First-fit: Allocate the first hole that is big enough Best-fit: Allocate the smallest hole that is big enough; must search entire list Produces the smallest leftover hole Worst-fit: Allocate the largest hole; must also search entire list Produces the largest leftover hole 10

11 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 11

12 Segmentation Logical View of Segmentation Segmentation Hardware user space physical memory space 12

13 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 13

14 Paging (1/2) Address generated by CPU is divided into: Page number (p) used as an index into a page table which contains base address of each page in physical memory Page offset (d) combined with base address to define the physical memory address that is sent to the memory unit page number p m - n page offset For given logical address space 2 m and page size 2 n d n 14

15 Paging (2/2) Paging Paging with Translation Look-aside Buffer (TLB) 15

16 Main Memory Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table 16

17 Structure of the Page Table 1. Hierarchical Page Table 2. Hashed Page Table 3. Inverted Page Table 17

18 Questions 1. Name two differences between logical and physical addresses. 2. Compare contiguous memory allocation, pure segmentation, and pure paging with respect to: External fragmentation Internal fragmentation Ability to share code across processes 3. Assume 1-KB page size, what are the page numbers and offsets for the addresses:

19 Overview 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 19

20 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 20

21 Background Virtual Memory larger than Physical Memory 21

22 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 22

23 Demand Paging (1/2) Bring in a page only when it is needed In virtual memory, page table looks like: 23

24 Demand Paging (2/2) Steps in handling a page fault Practice numerical problems of Demand Paging for exam 24

25 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 25

26 Copy-on-Write Before Process 1 modifies page C After Process 1 modifies page C 26

27 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 27

28 Page Replacement Algorithms(1/2) FIFO First page in is the first page out. Optimal Algorithm Replace page not going to be used for longest 28

29 Page Replacement Algorithms (2/2) LRU Algorithm Replace page that has not been used for longest period of time Others: Second-Chance (clock) Page-Replacement Algorithm Enhanced Second-Chance Algorithm Counting Algorithms Page-Buffer Algorithms 29

30 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 30

31 Allocation of Frames Fixed Allocation Equal Allocation Allocate frames equally among processes Proportional Allocation Allocate according to size of the process. Priority Allocation A frame allocation scheme using priorities rather than size. Global vs. Local Allocation Global Replacement frame selected from set of all frames. Local Replacement frame from only its own set of allocated frames. 31

32 Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Algorithms Allocation of Frames Thrashing 32

33 Thrashing Thrashing a process is busy swapping pages in and out Leads to: Low CPU utilization 33

34 Questions 1. We have an OS that uses base and limit registers, but we have modified the OS to provide a page table. Can page table be set up to simulate base and limit registers? 2. Consider a system that allocates pages of different sizes to its processes. What modifications to the virtual memory system provide this functionality? 3. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? 4. All Homework Problems. 34

35 Overview 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 35

36 Mass Storage Overview of Mass-Storage Structure Disk Structure Disk Scheduling RAID Structure Stable-Storage Implementation 36

37 Overview of Mass-Storage Structure Access Latency = Average access time = average seek time + average latency Average I/O time = average access time + (amount to transfer / transfer rate) + controller overhead 37

38 Mass Storage Overview of Mass-Storage Structure Disk Structure Disk Scheduling RAID Structure Stable-Storage Implementation 38

39 Disk Structure Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost 39

40 Mass Storage Overview of Mass-Storage Structure Disk Structure Disk Scheduling RAID Structure Stable-Storage Implementation 40

41 Disk Scheduling Objective: Minimize seek time First Come First Serve (FCFS) Shortest Seek Time First (SSTF) SCAN and C-SCAN LOOK and C-LOOK 41

42 Mass Storage Overview of Mass-Storage Structure Disk Structure Disk Scheduling RAID Structure Stable-Storage Implementation 42

43 RAID Structure 43

44 Mass Storage Overview of Mass-Storage Structure Disk Structure Disk Scheduling RAID Structure Stable-Storage Implementation 44

45 Stable-Storage Implementation Write-ahead log scheme 1. Write to 1 st physical 2. When successful, write to 2 nd physical 3. Declare complete only after second write completes successfully 45

46 Questions 1. None of the disk-scheduling disciplines, except FCFS, is truly fair (starvation may occur). a. Explain why. b. Describe a way to modify SCAN to ensure fairness. 2. Compare the performance of write operations achieved by RAID level 5 with RAID level Why is rotational latency usually not considered in disk scheduling? How would you modify SSTF, SCAN, and C-SAN to include rotational latency if its high. 46

47 Overview 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 47

48 File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management 48

49 File-System Structure 49

50 File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management 50

51 File-System Implementation On-disk data structures: 1. Boot control block 2. Volume control block 3. Directory structure 4. Per File FCB In-memory data structures: 1. Mount table 2. Directory structure 3. Per-process open-file table 4. System-wide open-file table 51

52 File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management 52

53 Directory Implementation Linear List List of file names with pointer to data blocks. Hash Table Linear list with hash data structure 53

54 File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management 54

55 Allocation Methods Contiguous Linked Indexed 55

56 File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management 56

57 Free-Space Management Bit vector Linked List n-1 1 block[i] free bit[i] = 0 block[i] occupied Grouping Counting Space Maps 57

58 Questions 1. Consider a system that supports the strategies of contiguous, linked, and indexed allocation. What criteria should be used in deciding which strategy is best utilized for a particular file? 2. What are the advantages of the variant of linked allocation that uses a FAT to chain together the blocks of a file? 3. All H/W questions. 58

59 Overview 1. Main Memory 2. Virtual Memory 3. Mass Storage 4. File System Implementation 5. I/O System 59

60 I/O System Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 60

61 Application I/O Interface Kernel I/O Structure Characteristics of I/O Devices 61

62 I/O System Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 62

63 Kernel I/O Subsystem Scheduling Facilitate I/O requests via device queues. Buffering Store data in memory while transferring b/w devices. Caching Faster device holding copy of data. Spooling Hold output for a device. Eg: Printers Device reservation Provides exclusive access to a device. Error handling Recover from errors. 63

64 I/O System Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 64

65 Transforming I/O Requests to Hardware Operations 65

66 I/O System Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 66

67 Performance Reduce number of context switches Reduce data copying Reduce interrupts by using large transfers, smart controllers, polling Use DMA etc 67

68 Questions 1. Why might a system use interrupt-driven I/O to manage a single serial port and polling I/O to manage a front-end processor, such as a terminal concentrator? 2. In each of the scenarios, would you use buffering, spooling, caching or a combination? A mouse used with a graphical user interface. A tape drive on a multitasking OS. A disk drive containing user files A graphics card with direct bus connection, accessible through memory-mapped I/O 68

69 Good Luck!!!!! Credit to all dinosaurs that made the course fun to learn. 69

CSI3131 Final Exam Review

CSI3131 Final Exam Review CSI3131 Final Exam Review Final Exam: When: April 24, 2015 2:00 PM Where: SMD 425 File Systems I/O Hard Drive Virtual Memory Swap Memory Storage and I/O Introduction CSI3131 Topics Process Computing Systems

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Fall 2014 Final Review Geoffrey M. Voelker Course Plugs If you enjoy CSE 120 topics, you might find some other courses interesting this year CSE 124: Networked Services

More information

Final Exam Preparation Questions

Final Exam Preparation Questions EECS 678 Spring 2013 Final Exam Preparation Questions 1 Chapter 6 1. What is a critical section? What are the three conditions to be ensured by any solution to the critical section problem? 2. The following

More information

Final Review. Geoffrey M. Voelker. Final mechanics Memory management Paging Page replacement Disk I/O File systems Advanced topics

Final Review. Geoffrey M. Voelker. Final mechanics Memory management Paging Page replacement Disk I/O File systems Advanced topics &6( 3ULQFLSOHVRI2SHUDWLQJ 6\VWHPV )DOO Final Review Geoffrey M. Voelker 2YHUYLHZ Final mechanics Memory management Paging Page replacement Disk I/O File systems Advanced topics December 5, 2000 CSE 120

More information

QUESTION BANK UNIT I

QUESTION BANK UNIT I QUESTION BANK Subject Name: Operating Systems UNIT I 1) Differentiate between tightly coupled systems and loosely coupled systems. 2) Define OS 3) What are the differences between Batch OS and Multiprogramming?

More information

Fall COMP3511 Review

Fall COMP3511 Review Outline Fall 2015 - COMP3511 Review Monitor Deadlock and Banker Algorithm Paging and Segmentation Page Replacement Algorithms and Working-set Model File Allocation Disk Scheduling Review.2 Monitors Condition

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium 8.2 Silberschatz, Galvin

More information

CS6401- Operating System UNIT-III STORAGE MANAGEMENT

CS6401- Operating System UNIT-III STORAGE MANAGEMENT UNIT-III STORAGE MANAGEMENT Memory Management: Background In general, to rum a program, it must be brought into memory. Input queue collection of processes on the disk that are waiting to be brought into

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year and Semester : II / IV Subject Code : CS6401 Subject Name : Operating System Degree and Branch : B.E CSE UNIT I 1. Define system process 2. What is an

More information

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition Chapter 8: Memory Management 8.1 Silberschatz, Galvin and Gagne 2009 Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Operating System Concepts 8 th Edition,! Silberschatz, Galvin and Gagne 2009! Chapter 8: Memory Management Background" Swapping " Contiguous Memory Allocation" Paging" Structure

More information

Part Three - Memory Management. Chapter 8: Memory-Management Strategies

Part Three - Memory Management. Chapter 8: Memory-Management Strategies Part Three - Memory Management Chapter 8: Memory-Management Strategies Chapter 8: Memory-Management Strategies 8.1 Background 8.2 Swapping 8.3 Contiguous Memory Allocation 8.4 Segmentation 8.5 Paging 8.6

More information

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management Part Four - Memory Management 8.1 Background Chapter 8: Memory-Management Management Strategies Program must be brought into memory and placed within a process for it to be run Input queue collection of

More information

Memory Management. Memory Management

Memory Management. Memory Management Memory Management Gordon College Stephen Brinton Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 1 Background Program must be brought into memory

More information

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science Virtual Memory CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File File File System Implementation Operating Systems Hebrew University Spring 2007 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array

More information

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Operating Systems. Memory Management. Lecture 9 Michael O Boyle Operating Systems Memory Management Lecture 9 Michael O Boyle 1 Memory Management Background Logical/Virtual Address Space vs Physical Address Space Swapping Contiguous Memory Allocation Segmentation Goals

More information

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access File File System Implementation Operating Systems Hebrew University Spring 2009 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 42 Virtualization Review Slides based on Various sources 1 1 FAQ For VMM, is the CPU scheduling just like a single

More information

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Basic Hardware Address Binding Logical VS Physical Address Space Dynamic Loading Dynamic Linking and Shared

More information

Chapter 8: Memory Management

Chapter 8: Memory Management Chapter 8: Memory Management Chapter 8: Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 8.2 Background Program must be brought into memory and placed

More information

I/O Management and Disk Scheduling. Chapter 11

I/O Management and Disk Scheduling. Chapter 11 I/O Management and Disk Scheduling Chapter 11 Categories of I/O Devices Human readable used to communicate with the user video display terminals keyboard mouse printer Categories of I/O Devices Machine

More information

Chapter 9: Memory Management. Background

Chapter 9: Memory Management. Background 1 Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 9.1 Background Program must be brought into memory and placed within a process for

More information

Main Points of the Computer Organization and System Software Module

Main Points of the Computer Organization and System Software Module Main Points of the Computer Organization and System Software Module You can find below the topics we have covered during the COSS module. Reading the relevant parts of the textbooks is essential for a

More information

Memory Management Cache Base and Limit Registers base limit Binding of Instructions and Data to Memory Compile time absolute code Load time

Memory Management Cache Base and Limit Registers base limit Binding of Instructions and Data to Memory Compile time absolute code Load time Memory Management To provide a detailed description of various ways of organizing memory hardware To discuss various memory-management techniques, including paging and segmentation To provide a detailed

More information

CS6401- Operating System QUESTION BANK UNIT-IV

CS6401- Operating System QUESTION BANK UNIT-IV Part-A QUESTION BANK UNIT-IV 1. What is a File? A file is a named collection of related information that is recorded on secondary storage. A file contains either programs or data. A file has certain structure

More information

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses. 1 Memory Management Address Binding The normal procedures is to select one of the processes in the input queue and to load that process into memory. As the process executed, it accesses instructions and

More information

Chapter 8: Memory Management Strategies

Chapter 8: Memory Management Strategies Chapter 8: Memory- Management Strategies, Silberschatz, Galvin and Gagne 2009 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Free Space Management

Free Space Management CSC 4103 - Operating Systems Spring 2007 Lecture - XVI File Systems - II Tevfik Koşar Louisiana State University March 22 nd, 2007 1 Free Space Management Disk space limited Need to re-use the space from

More information

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Virtual Memory Outline

Virtual Memory Outline Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples

More information

I/O Systems and Storage Devices

I/O Systems and Storage Devices CSC 256/456: Operating Systems I/O Systems and Storage Devices John Criswell! University of Rochester 1 I/O Device Controllers I/O devices have both mechanical component & electronic component! The electronic

More information

Module 13: Secondary-Storage Structure

Module 13: Secondary-Storage Structure Module 13: Secondary-Storage Structure Disk Structure Disk Scheduling Disk Management Swap-Space Management Disk Reliability Stable-Storage Implementation Operating System Concepts 13.1 Silberschatz and

More information

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the

More information

CSE 4/521 Introduction to Operating Systems. Lecture 15 Virtual Memory I (Background, Demand Paging) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 15 Virtual Memory I (Background, Demand Paging) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 15 Virtual Memory I (Background, Demand Paging) Summer 2018 Overview Objective: To describe the benefits of a virtual memory system. To explain the concept

More information

Disk Scheduling COMPSCI 386

Disk Scheduling COMPSCI 386 Disk Scheduling COMPSCI 386 Topics Disk Structure (9.1 9.2) Disk Scheduling (9.4) Allocation Methods (11.4) Free Space Management (11.5) Hard Disk Platter diameter ranges from 1.8 to 3.5 inches. Both sides

More information

CLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS UNIT I OPERATING SYSTEMS OVERVIEW

CLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS UNIT I OPERATING SYSTEMS OVERVIEW CLASS: II YEAR / IV SEMESTER CSE SUBJECT CODE AND NAME: CS6401 OPERATING SYSTEMS SYLLABUS UNIT I OPERATING SYSTEMS OVERVIEW Computer System Overview-Basic Elements, Instruction Execution, Interrupts, Memory

More information

Chapter 8: Memory- Manage g me m nt n S tra r t a e t gie i s

Chapter 8: Memory- Manage g me m nt n S tra r t a e t gie i s Chapter 8: Memory- Management Strategies Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium 2009/12/16

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and 64-bit Architectures Example:

More information

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming

More information

CS307 Operating Systems Main Memory

CS307 Operating Systems Main Memory CS307 Main Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Background Program must be brought (from disk) into memory and placed within a process

More information

Chapter 8 Main Memory

Chapter 8 Main Memory Chapter 8 Main Memory 8.1, 8.2, 8.3, 8.4, 8.5 Chapter 9 Virtual memory 9.1, 9.2, 9.3 https://www.akkadia.org/drepper/cpumemory.pdf Images from Silberschatz Pacific University 1 How does the OS manage memory?

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection

More information

Background. Contiguous Memory Allocation

Background. Contiguous Memory Allocation Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific

More information

Basic Memory Management

Basic Memory Management Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester 10/15/14 CSC 2/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it

More information

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall I/O Device Controllers I/O Systems CS 256/456 Dept. of Computer Science, University of Rochester 10/20/2010 CSC 2/456 1 I/O devices have both mechanical component & electronic component The electronic

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of

More information

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 8: MEMORY MANAGEMENT By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the

More information

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know:

CIS 21 Final Study Guide. Final covers ch. 1-20, except for 17. Need to know: CIS 21 Final Study Guide Final covers ch. 1-20, except for 17. Need to know: I. Amdahl's Law II. Moore s Law III. Processes and Threading A. What is a process? B. What is a thread? C. Modes (kernel mode,

More information

Disc Allocation and Disc Arm Scheduling?

Disc Allocation and Disc Arm Scheduling? CSE 2431: Introduction to Operating Systems Disc Allocation and Disc Arm Scheduling? Study: 9 th (12.4, 12.5, 10.4) 10 th (14.4, 14.5, 11.2) 11-29-2018 Presentation K Gojko Babić Moving-Head Disk Mechanism

More information

Question Points Score Total 100

Question Points Score Total 100 Midterm #2 CMSC 412 Operating Systems Fall 2005 November 22, 2004 Guidelines This exam has 7 pages (including this one); make sure you have them all. Put your name on each page before starting the exam.

More information

Chapter 8: Memory-Management Strategies

Chapter 8: Memory-Management Strategies Chapter 8: Memory-Management Strategies Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel 32 and

More information

Module 8: Memory Management

Module 8: Memory Management Module 8: Memory Management Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 8.1 Background Program must be brought into memory

More information

Outline. Operating Systems: Devices and I/O p. 1/18

Outline. Operating Systems: Devices and I/O p. 1/18 Outline Diversity of I/O devices block and character devices Organization of I/O subsystem of kernel device drivers Common hardware characteristics of device I/O subsystem tasks Operating Systems: Devices

More information

Operating Systems. Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring Paul Krzyzanowski. Rutgers University.

Operating Systems. Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring Paul Krzyzanowski. Rutgers University. Operating Systems Week 9 Recitation: Exam 2 Preview Review of Exam 2, Spring 2014 Paul Krzyzanowski Rutgers University Spring 2015 March 27, 2015 2015 Paul Krzyzanowski 1 Exam 2 2012 Question 2a One of

More information

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 Acknowledgement: This set of slides is partly based on the PPTs provided by the Wiley s companion website (including textbook images, when not explicitly

More information

Module 9: Memory Management. Background. Binding of Instructions and Data to Memory

Module 9: Memory Management. Background. Binding of Instructions and Data to Memory Module 9: Memory Management Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 9.1 Background Program must be brought into memory

More information

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization Requirements Relocation Memory management ability to change process image position Protection ability to avoid unwanted memory accesses Sharing ability to share memory portions among processes Logical

More information

Module 8: Memory Management

Module 8: Memory Management Module 8: Memory Management Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging Operating System Concepts 8.1 Silberschatz and Galvin

More information

Chapter 8 Main Memory

Chapter 8 Main Memory COP 4610: Introduction to Operating Systems (Spring 2014) Chapter 8 Main Memory Zhi Wang Florida State University Contents Background Swapping Contiguous memory allocation Paging Segmentation OS examples

More information

Operating Systems Design Exam 2 Review: Fall 2010

Operating Systems Design Exam 2 Review: Fall 2010 Operating Systems Design Exam 2 Review: Fall 2010 Paul Krzyzanowski pxk@cs.rutgers.edu 1 1. Why could adding more memory to a computer make it run faster? If processes don t have their working sets in

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Spring 2018 Final Review Geoffrey M. Voelker Additional Review Session Tuesday (June 12) 6-7:20pm in Center Hall 115 Bring your questions and I will answer them

More information

CSE 4/521 Introduction to Operating Systems. Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018 Overview Objective: To discuss how the disk is managed for a

More information

Memory Management. Dr. Yingwu Zhu

Memory Management. Dr. Yingwu Zhu Memory Management Dr. Yingwu Zhu Big picture Main memory is a resource A process/thread is being executing, the instructions & data must be in memory Assumption: Main memory is super big to hold a program

More information

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING QUESTION BANK Title Code Regulation Structure Coordinator Team of Instructors OPERATING SYSTEMS A50510

More information

CS 143A - Principles of Operating Systems

CS 143A - Principles of Operating Systems CS 143A - Principles of Operating Systems Operating Systems - Review of content from midterm to final Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Deadlocks System Model Resource allocation graph,

More information

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapter 8: Main Memory. Operating System Concepts 9 th Edition Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Virtual Memory 1 Chapter 8 Characteristics of Paging and Segmentation Memory references are dynamically translated into physical addresses at run time E.g., process may be swapped in and out of main memory

More information

Chapter 9: Virtual-Memory

Chapter 9: Virtual-Memory Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Background Demand Paging Page Replacement Allocation of Frames Thrashing Other Considerations Silberschatz, Galvin and Gagne 2013

More information

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide

More information

Announcements. Final Exam. December 10th, Thursday Patrick Taylor Hall. Chapters included in Final. 8.

Announcements. Final Exam. December 10th, Thursday Patrick Taylor Hall. Chapters included in Final. 8. CSC 4103 - Operating Systems Fall 2009 Lecture - XXV Final Review Announcements * You should have received your grades as well as graded papers for: - Homework 1-4 - Quiz 1-3 - Midterm If not, please see

More information

Memory Management. Contents: Memory Management. How to generate code? Background

Memory Management. Contents: Memory Management. How to generate code? Background TDIU11 Operating systems Contents: Memory Management Memory Management [SGG7/8/9] Chapter 8 Background Relocation Dynamic loading and linking Swapping Contiguous Allocation Paging Segmentation Copyright

More information

Chapter 8 Memory Management

Chapter 8 Memory Management Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous

More information

20-EECE-4029 Operating Systems Spring, 2013 John Franco

20-EECE-4029 Operating Systems Spring, 2013 John Franco 20-EECE-4029 Operating Systems Spring, 2013 John Franco Second Exam name: Question 1: Translation Look-aside Buffer (a) Describe the TLB. Include its location, why it is located there, its contents, and

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

Course Description: This course includes the basic concepts of operating system

Course Description: This course includes the basic concepts of operating system Operating Systems Course Title: Operating Systems Full Marks:60+ 20+20 Course No: CSC259 Pass Marks: 24+8+8 Nature of the Course: Theory + Lab Credit Hrs: 3 Course Description: This course includes the

More information

SNS COLLEGE OF ENGINEERING

SNS COLLEGE OF ENGINEERING SNS COLLEGE OF ENGINEERING Coimbatore. Department of Computer Science and Engineering Question Bank- Even Semester 2015-2016 CS6401 OPERATING SYSTEMS Unit-I OPERATING SYSTEMS OVERVIEW 1. Differentiate

More information

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table Question # 1 of 10 ( Start time: 07:24:13 AM ) Total Marks: 1 LRU page replacement algorithm can be implemented by counter stack linked list all of the given options Question # 2 of 10 ( Start time: 07:25:28

More information

MEMORY MANAGEMENT/1 CS 409, FALL 2013

MEMORY MANAGEMENT/1 CS 409, FALL 2013 MEMORY MANAGEMENT Requirements: Relocation (to different memory areas) Protection (run time, usually implemented together with relocation) Sharing (and also protection) Logical organization Physical organization

More information

b. How many bits are there in the physical address?

b. How many bits are there in the physical address? Memory Management 1) Consider a logical address space of 64 (or 26) pages of 1,024 (or 210) bytes each, mapped onto a physical memory of 32 (or 25) frames. a. How many bits are there in the logical address?

More information

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013 Operating Systems Comprehensive Exam Spring 2013 Student ID # 3/20/2013 You must complete all of Section I You must complete two of the problems in Section II If you need more space to answer a question,

More information

Chapter 14: Mass-Storage Systems. Disk Structure

Chapter 14: Mass-Storage Systems. Disk Structure 1 Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

CS 3733 Operating Systems:

CS 3733 Operating Systems: CS 3733 Operating Systems: Topics: Memory Management (SGG, Chapter 08) Instructor: Dr Dakai Zhu Department of Computer Science @ UTSA 1 Reminders Assignment 2: extended to Monday (March 5th) midnight:

More information

Chapters 9 & 10: Memory Management and Virtual Memory

Chapters 9 & 10: Memory Management and Virtual Memory Chapters 9 & 10: Memory Management and Virtual Memory Important concepts (for final, projects, papers) addressing: physical/absolute, logical/relative/virtual overlays swapping and paging memory protection

More information

Logical versus Physical Address Space

Logical versus Physical Address Space CHAPTER 8: MEMORY MANAGEMENT Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging Operating System Concepts, Addison-Wesley 1994

More information

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition, Chapter 12: Secondary-Storage Structure, Silberschatz, Galvin and Gagne 2009 Chapter 12: Secondary-Storage Structure Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk

More information

Unit-03 Deadlock and Memory Management Unit-03/Lecture-01

Unit-03 Deadlock and Memory Management Unit-03/Lecture-01 1 Unit-03 Deadlock and Memory Management Unit-03/Lecture-01 The Deadlock Problem 1. A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set.

More information

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University CS 370: SYSTEM ARCHITECTURE & SOFTWARE [DISK SCHEDULING ALGORITHMS] Frequently asked questions from the previous class survey Shrideep Pallickara Computer Science Colorado State University L30.1 L30.2

More information

Answer to exercises chap 13.2

Answer to exercises chap 13.2 Answer to exercises chap 13.2 The advantage of supporting memory-mapped I/O to device-control registers is that it eliminates the need for special I/O instructions from the instruction set and therefore

More information

SHANDONG UNIVERSITY 1

SHANDONG UNIVERSITY 1 Chapter 8 Main Memory SHANDONG UNIVERSITY 1 Contents Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium SHANDONG UNIVERSITY 2 Objectives

More information

Chapter 11. I/O Management and Disk Scheduling

Chapter 11. I/O Management and Disk Scheduling Operating System Chapter 11. I/O Management and Disk Scheduling Lynn Choi School of Electrical Engineering Categories of I/O Devices I/O devices can be grouped into 3 categories Human readable devices

More information

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 9: Mass Storage Structure Prof. Alan Mislove (amislove@ccs.neu.edu) Moving-head Disk Mechanism 2 Overview of Mass Storage Structure Magnetic

More information

Chapter 8. Virtual Memory

Chapter 8. Virtual Memory Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:

More information

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts Memory management Last modified: 26.04.2016 1 Contents Background Logical and physical address spaces; address binding Overlaying, swapping Contiguous Memory Allocation Segmentation Paging Structure of

More information

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13 I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of

More information