1 Overview Assignment 11: hints File systems Assignment 10: solution Deadlocks & Scheduling.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
0 - 0.
2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt Time Money AdditionSubtraction.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
OPERATING SYSTEMS Lecturer: Szabolcs Mikulas Office: B38B
1 Processes and Threads Creation and Termination States Usage Implementations.
Chapter 6 File Systems 6.1 Files 6.2 Directories
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
1 Chapter 12 File Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Richmond House, Liverpool (1) 26 th January 2004.
SE-292 High Performance Computing File Systems Sathish Vadhiyar.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc
Test on Input, Output, Processing, & Storage Devices
Operating Systems: Monitors 1 Monitors (C.A.R. Hoare) higher level construct than semaphores a package of grouped procedures, variables and data i.e. object.
© S Haughton more than 3?
File Systems: Fundamentals.
Chapter 6 File Systems 6.1 Files 6.2 Directories
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Processes Management.
Volume Analysis. What is a volume?  Carrier defines a volume: “… a collection of addressable sectors that an Operating System (OS) or application can.
Event 4: Mental Math 7th/8th grade Math Meet ‘11.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Doubles Facts Doubles with Pictures Doubles without Pictures Pictures Only.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
We will resume in: 25 Minutes.
Basic Unix system administration
1 Overview Assignment 10: hints  Deadlocks & Scheduling Assignment 9: solution  Scheduling.
Ext2/Ext3 Linux File System Reporter: Po-Liang, Wu.
UNIX File Systems (Chap 4. in the book “the design of the UNIX OS”) Acknowledgement : Soongsil Univ. Presentation Materials.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Chapter 11: File System Implementation Joe McCarthy CSS 430: Operating Systems - File System Implementation1.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
1 Overview Assignment 12: hints  Distributed file systems Assignment 11: solution  File systems.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
1Fall 2008, Chapter 11 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
Chapter 4. INTERNAL REPRESENTATION OF FILES
Chapter 4. INTERNAL REPRESENTATION OF FILES
Files & File system. A Possible File System Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Solutions for the First Quiz COSC 6360 Spring 2014.
1 Chapter 4. INTERNAL REPRESENTATION OF FILES THE DESIGN OF THE UNIX OPERATING SYSTEM Maurice J. bach Prentice Hall.
Css430 file-system implementation1 CSS430 File-System Implementation Textbook Ch12 These slides were compiled from the OSC textbook slides (Silberschatz,
Annotated by B. Hirsbrunner File Systems Chapter Files 5.2 Directories 5.3 File System Implementation 5.4 Security 5.5 Protection Mechanism 5.6 Overview.
1 File Processing : File Organization and File Systems 2015, Spring Pusan National University Ki-Joune Li.
Linux File system Implementations
Css430 file-system implementation1 CSS430 File-System Implementation Textbook Ch11 These slides were compiled from the OSC textbook slides (Silberschatz,
THE FILE SYSTEM Files long-term storage RAM short-term storage Programs, data, and text are all stored in files, which is stored on.
File Systems. Linked block allocation Each block contains a header with –Number of bytes in the block –Pointer to next block Blocks need not be contiguous.
Today topics: File System Implementation
ThreadOS: File System Implementation
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
UNIX File Systems (Chap 4. in the book “the design of the UNIX OS”)
Internal Representation of Files
Chapter 12: File-System Implementation CSS503 Systems Programming
File Systems.
Mr. M. D. Jamadar Assistant Professor
Presentation transcript:

1 Overview Assignment 11: hints File systems Assignment 10: solution Deadlocks & Scheduling

2 UNIX Filesystem References: M. Bach, The Design of the UNIX Operating System, Prentice Hall Each file has a unique inode containing: ownership type access rights size access/creation/… time location of the data on disk

3 Disk Layout A disk contains: boot block: bootstrap code super block: state of the file system inode list: list of file descriptors data blocks boot block super block inode listdata blocks

4 Inode: Example owner: corti group: inf type: regular file permissions: rwxr-xr-x accessed: Jan :45 P.M. modified: Jan :30 A.M. inode: Jan :45 P.M. disk addresses

5 File Structure data blocks inode direct 0 direct 1 direct 2 direct 3 direct 4 direct 5 direct 6 direct 7 direct … direct 11 single indirect double indirect triple indirect

6 Directories A directory is a normal file with a list of names and inodes. Example: Inode NumberFile Name init 1276fsck 85clri 1268motd 1799mount

7 Processes, File Table, … 0stdin 1stdout 2stderr 3 4 …… 0stdin 1stdout 2stderr 3 4 …… count 1, rd count 1, rd-wr count 1, rd count 1, wr count 1, rd user file descriptor file table count 3 (/a/b) count 1 (local) count 1 (private) inode table

8 Mounting /etc /mnt /cdrom /dos /home /proc /usr /var ext2 \dos \windows fat /pictures iso9660 /user1 /user2 /user3 ext2 /meminfo /cpu procfs

9 A11 Ex1 – File size Calculate the maximum size of a UNIX file on a disk with 2KB data blocks

10 A11 Ex2 – File access Append one byte at the end of a file Filename./a/b/c/f Size 1G Which sequence of disk accesses is necessary (worst case, no caching)

11 A11 Ex3 – Redirection Used for output input redirects./cmd outfile./cmd | grep keyword Which mechanisms are used? Which data structures are needed?

12 A11 Ex4 – Mounting Which mechanisms are used to support different kinds of file systems? Hint: different file system structures

13 Overview Assignment 11: hints File systems Assignment 10: solution Deadlocks & Scheduling

14 A10 Ex1 – Deadlocks Give a real-life example of deadlock. (4) Cars arriving at an intersection at the same time Is it possible to have a deadlock with one process/thread only? Non-reentrant locks

15 A10 Ex2 – Synchronization Primitives Assumption: OS with only a yield() system call Pseudo-code implementation of lock, unlock, wait, and notify Data structures: a list of ready threads a flag to mark an object as locked a per-object lock list (list of threads waiting for the lock) a per-object wait list (list of threads waiting for notification)

16 lock() If the object (o) is unlocked we lock it, otherwise we move the thread to the lock list. IF o is not locked THEN mark o as locked; ELSE remove the thread from the ready list; insert the thread in the lock list of the object; yield(); END

17 unlock() We unlock the object and we move one of the waiting threads to the ready list and call yield(). IF the lock list is not empty THEN remove a thread from the objects lock list and put it on the ready list; ELSE mark o as unlocked; END; yield();

18 wait() We have first to unlock the object and then to move the current thread into the wait list. unlock(o); remove the current thread from the ready list; put the current thread in the objects wait list; yield();

19 notify() A thread is awakened and must wait for the object to be unlocked. take a thread t from the wait list of o; remove t from the wait list; put t in the objects lock list; yield();

20 notifyAll() All the objects are awakened and they must wait for the object to be unlocked. FOR thread t in the wait list of o DO remove t from the wait list; put t in the objects lock list; END; yield();