1 / 23

Discussion Week 6

Discussion Week 6. TA: Kyle Dewey. Overview. Project #2 questions Project #2 test cases Exam sample questions Project #3 high level overview. Project #2 Error Conditions. Do not worry about error codes Still should check for error conditions for your own testing. Project #2 Questions?.

Download Presentation

Discussion Week 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discussion Week 6 • TA: Kyle Dewey

  2. Overview • Project #2 questions • Project #2 test cases • Exam sample questions • Project #3 high level overview

  3. Project #2 Error Conditions • Do not worry about error codes • Still should check for error conditions for your own testing

  4. Project #2 Questions?

  5. Project #2 Test Cases • In code/test • These will be used to test your code, along with similar variants of them • Altogether, they have wide coverage

  6. Some Cases • fork.c • ncat.c • test1.c

  7. Exam Sample Questions

  8. Question: “Do OSes actually swap anything anymore?”

  9. Relevance • Modern systems have tons of memory • Usually a lot more free memory than in use • Setups vary widely

  10. Memory Usage • Linux has the free command • Shows free and used memory, along with swap

  11. Occasional Webserver total used free shared buffers cachedMem: 3962 3782 179 0 181 3009-/+ buffers/cache: 591 3370Swap: 1983 0 1983

  12. Occasional Fileserver total used free shared buffers cachedMem: 496 481 14 0 270 65-/+ buffers/cache: 144 351Swap: 792 1 790

  13. CSIL Under Load total used free shared buffers cachedMem: 8072 7493 579 0 277 3292-/+ buffers/cache: 3923 4149Swap: 12229 205 12023

  14. Server After Load Spike total used free shared buffers cachedMem: 8002 7697 304 0 2098 4652-/+ buffers/cache: 946 7055Swap: 1811 353 1458

  15. Virtualization • Multiple OSes feed off the same memory • Memory tends to be the greatest limitation • Special software used to force OS to page in one VM when another is starved for memory

  16. Virtualized Memory 4 GB total 4 GB total Needs 3 GB Needs 2 GB OS1 OS2 Machine 4 GB total

  17. On Paging • Paging is a last resort mechanism • A private, lightly loaded system will likely never need it • In enterprise environments, it ranges from very nice to absolutely vital

  18. Project #3 Overview

  19. Part I • Need to implement paging • Tests will be so large as to need paging • Paging algorithm cannot be naive • Least recently used (LRU) • Second chance FIFO queue

  20. FIFO Queue Oldest Page Newest Page Page 1 Page 2 Page 3 Page 4 Page swapped in Page 2 Page 3 Page 4 Page 5 Oldest Page Newest Page

  21. FIFO + Second Chance Page 1 Ref: true Page 2 Ref: true Page 3 Ref: false Page 4 Ref: true Page swapped in Page 4 Ref: true Page 1 Ref: false Page 2 Ref: false Page 5 Ref: true

  22. Part 2 • Make the NACHOS filesystem more useful • Will be using the NACHOS disk for this • Flat file hierarchy

  23. Part 2 • Implement Create(), Open(), Remove(), List(), Seek(), Read(), ReadAt(), Write(), WriteAt(), and Length()

More Related