Solutions for the First Quiz COSC 6360 Fall 2014.

Slides:



Advertisements
Similar presentations
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Advertisements

1 CMPT 300 Introduction to Operating Systems File Systems Sample Questions.
Discussion Week 7 TA: Kyle Dewey. Overview Midterm debriefing Virtual memory Virtual Filesystems / Disk I/O Project #3.
MACHINE-INDEPENDENT VIRTUAL MEMORY MANAGEMENT FOR PAGED UNIPROCESSOR AND MULTIPROCESSOR ARCHITECTURES R. Rashid, A. Tevanian, M. Young, D. Golub, R. Baron,
Virtual Memory Operating System Concepts chapter 9 CS 355
UNIX Jehan-François Pâris Why UNIX? First OS that –was portable –was written in a “ high-level ” language (C) –allowed its users to access—and.
File Systems Examples.
CS 153 Design of Operating Systems Spring 2015
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
File System Implementation: beyond the user’s view A possible file system layout on a disk.
File Systems Implementation
Operating Systems Final Exam Review. Topics F Virtual Memory F File Systems F I/O Devices F Project 3: Macro Shell.
1 File Management in Representative Operating Systems.
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.
File System Implementation
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.
Chapter 40 File System Implementation
MSSYS The Unix File System S5FS (circa 1980)
Chapter VIII Virtual Memory Review Questions Jehan-François Pâris
Virtual Memory.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
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.
Journal Entry: Unit #5 Entry #3 Define the following words from ch2 in your journals: Binary, bit, discrete, unambiguous signals, digital, analog signal,
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Log-structured File System Sriram Govindan
Chapter VIIII File Systems Review Questions and Problems Jehan-François Pâris
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
COSC 3330/6308 Solutions to the Third Problem Set Jehan-François Pâris November 2012.
Solutions for the First Quiz COSC 6360 Spring 2014.
CPS110: Page replacement Landon Cox. Replacement  Think of physical memory as a cache  What happens on a cache miss?  Page fault  Must decide what.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Solution to the Fall 2012 Second COSC 6360 Quiz Jehan-François Pâris
1 Pertemuan 22 Implementasi Sistem File Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Virtual Memory. Cache memory: provides illusion of very high speed Virtual memory: provides illusion of very large size Main memory: reasonable cost,
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo 1 Memory management & paging.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Embedded System Lab. 정영진 The Design and Implementation of a Log-Structured File System Mendel Rosenblum and John K. Ousterhout ACM Transactions.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
File Systems.  Issues for OS  Organize files  Directories structure  File types based on different accesses  Sequential, indexed sequential, indexed.
COSC 3330/6308 Second Review Session Fall Instruction Timings For each of the following MIPS instructions, check the cycles that each instruction.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
Operating Systems, Winter Semester 2011 Practical Session 11 File Systems, part 1 1.
COMP 3500 Introduction to Operating Systems Directory Structures Block Management Dr. Xiao Qin Auburn University
File System Examples Unix Fast File System (FFS)
Paging.
Jonathan Walpole Computer Science Portland State University
Virtual Memory CSSE 332 Operating Systems
ITEC 202 Operating Systems
Modeling Page Replacement Algorithms
Review.
O.S Lecture 13 Virtual Memory.
Modeling Page Replacement Algorithms
CSE451 - Section 10.
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Chapter VIIII File Systems Review Questions and Problems
Virtual Memory: Working Sets
CSE451 - Section 10.
Solutions to the Second Quiz
Translation Buffers (TLBs)
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
Clock Algorithm Example
Presentation transcript:

Solutions for the First Quiz COSC 6360 Fall 2014

Questions with short answers What is the main advantage of mapped files?

Questions with short answers What is the main advantage of mapped files?  Mapped files reduce the number of context switches in the file subsystem.

Questions with short answers What is the main advantage of cylinder groups?

Questions with short answers What is the main advantage of cylinder groups? Since each cylinder group can contain both i-nodes and data blocks, the contents of most files can be located in the same cylinder group as their i-node.

Questions with short answers Why does FFS use blocking writes for all its metadata updates?

Questions with short answers Why does FFS use blocking writes for all its metadata updates?  To ensure that all metadata updates are written to disk in the right order.

Questions with short answers In MACH, what should be the inheritance attribute of an address range that contains a mapped file?

Questions with short answers In MACH, what should be the inheritance attribute of an address range that contains a mapped file?  Shared

Questions with short answers What does the UNIX set-userid bit allow?

Questions with short answers What does the UNIX set-userid bit allow?  It allows a program to be executed with the rights of its owner rather than with the rights of the user executing it.

Questions with short answers Where does UNIX store file access control lists? Hint: you probably know them under a different name.

Questions with short answers Where does UNIX store file access control lists? Hint: you probably know them under a different name.  In the i-node of each file

File system A 32-bit UNIX file system has 8 kilobyte blocks and i-nodes with 15 block addresses. How many file blocks can be accessed (4×5 points)  Directly from the i-node?  With one level of indirection?  With two levels of indirections?  With three levels of indirections?

File System 1 Other stuff … 15 block addresses direct block addresses … … 2,048 indirect block addresses Not needed … … … … … … 1,024  1,024 double indirect block addresses but we only use 512K – 2,048 – 12 of them Block size =8 KB 32-bit addresses

File system A 32-bit UNIX file system has 8 kilobyte blocks and i-nodes with 15 block addresses. How many file blocks can be accessed (4×5 points)  Directly from the i-node? 12 blocks  With one level of indirection?  With two levels of indirections?  With three levels of indirections?

File system A 32-bit UNIX file system has 8 kilobyte blocks and i-nodes with 15 block addresses. How many file blocks can be accessed (4×5 points)  Directly from the i-node? 12 blocks  With one level of indirection? 2,048 blocks  With two levels of indirections?  With three levels of indirections?

File system A 32-bit UNIX file system has 8 kilobyte blocks and i-nodes with 15 block addresses. How many file blocks can be accessed (4×5 points)  Directly from the i-node? 12 blocks  With one level of indirection? 2,048 blocks  With two levels of indirections? 512K – 2K – 12 blocks  With three levels of indirections?

File system A 32-bit UNIX file system has 8 kilobyte blocks and i-nodes with 15 block addresses. How many file blocks can be accessed (4×5 points)  Directly from the i-node? 12 blocks  With one level of indirection? 2,048 blocks  With two levels of indirections? 512K – 2K – 12 blocks  With three levels of indirections? 0 blocks

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What is the function of the first hand of that clock? (5 easy points)

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What is the function of the first hand of that clock? (5 easy points) It invalidates all the pages it touches.

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What is the function of the second hand of the clock? (5 easy points)

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What is the function of the second hand of the clock? (5 easy points) It expels from memory all the invalid pages it touches.

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What would happen if the second hand follows too closely the first one? (5 points)

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What would happen if the second hand follows too closely the first one? (5 points) Pages would be expelled too quickly There will be too many page faults

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What would happen if the second hand is too far apart from the first one? (5 points)

Virtual memory Consider the Two-Handed Clock policy of Berkeley UNIX, where the page-referenced bit is simulated by software.  What would happen if the second hand is too far apart from the first one? (5 points) Pages would remain too long in main memory after their last access. It would be more difficult to find free page frames.