Presentation is loading. Please wait.

Presentation is loading. Please wait.

Today’s agenda ~10min: file system (UNIX) ~1hr: final review + Q&A

Similar presentations


Presentation on theme: "Today’s agenda ~10min: file system (UNIX) ~1hr: final review + Q&A"— Presentation transcript:

1 Today’s agenda ~10min: file system (UNIX) ~1hr: final review + Q&A
CS354-Fall2018

2 FINAL: Wednesday December 12th, 3:30 PM, Fowler Hall
Bring your ID (will be checked) Closed everything (book, notes, calculator, cell phone, laptop, other electronic, discussion) Comprehensive: Chapters 1-10, 12-14, and supplementary materials + labs + xinu’s source codes After Midterm: a heavier weight Comprehensive questions cover materials before and after Midterm The exam will cover chapters 1-10, 12-14, and 19 of our XINU textbook, as well as all slides and additional notes covered in class. For Prof Comer's slides, the exam will cover CS354Presentation1.pdf to CS354Presentation6.pdf posted on Piazza. The introduction slides (1courseoverview), scheduling supplement, synchronization supplement, and virtual memory supplement are also included. CS354-Fall2018

3 FINAL Questions T/F will use bubblesheet
Multi-choice will use bubblesheet Other questions Similar to those in Midterm CS354-Fall2018

4 A Big Picture Please read Midterm review as well
OS overview (ch1, ch3) Process management (Core to OS) Process: concurrent execution (ch2, ch6) Process scheduling ( ch 5 + supplement) Process synchronization (ch 7 + supplement) Inter-processing communication (Message passing) (ch8) Memory management Low-level memory management (ch9) High-level memory management and virtual memory (ch10 + supplement) Device management Interrupt (ch12) Device driver (ch14) Clock management (ch13) File system (ch19) CS354-Fall2018

5 Quiz (Piazza) Check quiz solutions for both sections
All quizzes for section 2 + Quiz5 in section 1: file systems Question on quizs? CS354-Fall2018

6 Process states System calls State-transition HOW? When to call?
What else needed? WHY Data structures, global variables used CS354-Fall2018

7 Materials before Midterm (skipped today)
Please read Midterm review as well Process management (Core to OS) Process: concurrent execution (ch2, ch6) Process scheduling ( ch 5 + supplement) Process synchronization (ch 7 + supplement) CS354-Fall2018

8 Message passing Why do we need message passing? How?
receive(), recvclr() send() CS354-Fall2018

9 Sample Questions What is difference between receive() and recvclr()?
Synchronous vs asynchronous Will the process state change after calling recvclr()? (or receive())? If no, please explain. If yes, what are new states? recvclr(): no change receive(): RECEIVING (resched() called) if no message CS354-Fall2018

10 Low-level Memory Management
Why? Heap and stack How? Physical memory: bulk Free memory block list Allocation Strategies First-fit Last-fit Best-fit getmem(), freemem(), getstk(), freestk() CS354-Fall2018

11 Sample Questions Explain the results given certain operations Block 0
getmem(128), feemem(128) getstk(256), freestk(256) 32 512 1024 128 64 32 128 CS354-Fall2018

12 High-level memory management
Why? Abstract memory resources How? Bufferpool: for each subsystem Creation: init Allocation: dynamic Virtual memory Process: loading into memory Swapping, segmentation, paging On-demand paging CS354-Fall2018

13 High-level memory management
Demanding paging Page table (mapping from PHY memory to virtual memory) Page fault Page replacement Strategies: FIFO, LRU (and its variants), Belady (optimal), Global clock algorithms Multitasking Work set algorithm CS354-Fall2018

14 Sample Questions Given the following page reference string: Show the results for each paging replacement algorithms Count the number of page faults Compare which is better and explain why it is not good CS354-Fall2018

15 Device Management Interrupt Why? (OS, Devices) How?
OS, Processor (hardware), device hardware interrupt mask, disable/restore Dispatcher Interrupt handler CS354-Fall2018

16 Device Management Three rules: Which process calls interrupt handler?
Any current process Will interrupts be allowed during its execution? disable interrupt when running dispatcher Disable interrupt when the interrupt handler loads global variables…. (process stack ….) Will interrupt handlers change the process state? Yes, but only from current to ready (eligible state) Others are not allowed (wait, suspend, sleep, receive, not allowed) CS354-Fall2018

17 Device drivers Upper-half and lower-half Device table
Lower-half: ~ interrupt handler Device table Abstract operations: open, read, write, seek, control … Row and column CS354-Fall2018

18 Clock management Interrupt Clock handler
sleepms(), sleep() Delta list: sleeping processes Why? (O(1) operations) Intertd(), unsleep(), wakeup() CS354-Fall2018

19 Sample Questions Is context switch be allowed in an interrupt handler?
List potential interactions between processes and interrupt handling? Interrupt pile up… Update sleepq given different sleep or unsleep or wakeup operations? 3 A 2 B 2 C 3 D CS354-Fall2018

20 File System Why? How? (many design choices)
File: a better abstract than I/O (bytes) OS – DISK (hardware) How? (many design choices) Typed vs. untyped caching, sharing, allocation … XINU: directory, index blocks, data blocks Unix: differences (much more powerful) i-node (metadata, data points: direct and indirect) Blocks are loaded dynamically when needed CS354-Fall2018

21 Sample Questions Why XINU doesn’t scale?
What are pros and cons of a UNIX FS? Given a file size, calculate how many blocks (sectors) are needed? Describe how the following file access works Open() Read() or write() Seek() CS354-Fall2018

22 Some recap questions When to call resched()?
Describe how the OS runs when one process (A) requires input from disk (file systems: loading a block) while other processes (B and C) are running which also open and read a large file (10KB). Interaction between OS and Device I/O Process, memory management, device driver, file system A: File system  disk I/O; Interrupt from disk I/O  new process -> resched()  back to A (some time later…) What if page faults? (page replacement) CS354-Fall2018

23 Final word: Go through all the materials
Slides, textbooks, quizzes, labs, XINU codes Understanding HOW and WHY ================== Extra office hours Monday (Dec 10): 1:30PM-3:45PM Tue (Dec 11): 10AM-11:AM, 1:00PM-2PM Ask questions on Piazza Grades posted at BB before 8AM, Dec 17 (Monday) Contact me before 5PM, Dec 17 if you have any questions Remind: course evaluation (a few minutes only!) Good luck! CS354-Fall2018


Download ppt "Today’s agenda ~10min: file system (UNIX) ~1hr: final review + Q&A"

Similar presentations


Ads by Google