CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
-
Upload
emory-mcgee -
Category
Documents
-
view
219 -
download
0
Transcript of CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
![Page 1: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/1.jpg)
CSE 451: Operating
SystemsSection 10
Project 3 wrap-up, final exam review
![Page 2: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/2.jpg)
2
Final exam review
Goal of this section: key concepts you should understand Not just a summary of lectures Slides coverage and final exam topics are not
bijective
Goal of CSE 451: tools for life
Goal of your life: ???
12/5/2013
![Page 3: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/3.jpg)
3
Thread management
Queues Why do thread libraries make use of queues?
Synchronization What are the mechanisms for protecting critical
sections, how do they work, and when should one be used over another?
Preemption What is preemption and how does the process
of one thread preempting another work?12/5/2013
![Page 4: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/4.jpg)
4
Memory management
Purposes: Resource partitioning / sharing Isolation Usability
Paging
Segmentation
12/5/2013
![Page 5: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/5.jpg)
5
Virtual memory
What happens on a virtual memory access?
12/5/2013
![Page 6: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/6.jpg)
6
Virtual memory
What happens on a virtual memory access? Address translation: who performs it?
Page table lookup Translation Lookaside Buffer (TLB)
Page fault? Page replacement Process/queue management
How does all of this overhead pay off? Locality! Both temporal (in time) and spatial
(nearby). 12/5/2013
![Page 7: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/7.jpg)
© 2010 Gribble, Lazowska, Levy, Zahorjan 7
Virtual memory
pageframe 0
pageframe 1
pageframe 2
pageframe Y
…
pageframe 3
physical memory
offset
physical address
page frame #page frame #
page table
offset
virtual address
virtual page #
Note: Each process has its own page table!
12/5/2013
![Page 8: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/8.jpg)
8
Page replacement
Algorithms: Belady, FIFO, LRU, LRU clock / NRU, random,
working set… Local vs. global
How/why are any of these better or worse than the others?
What happens when paging goes wrong? Thrashing, 10-year old computers running XP?
12/5/2013
![Page 9: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/9.jpg)
9
Advanced virtual memory
What problem does a TLB address?
What problem do two-level page tables address? What’s the key concept?
12/5/2013
![Page 10: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/10.jpg)
10
Advanced virtual memory
What problem does a TLB address? Increases speed of virtual address translation
What problem do two-level page tables address? What’s the key concept?
Indirection
12/5/2013
![Page 11: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/11.jpg)
11
Secondary storage
Memory forms a hierarchy
Different levels of disk abstraction: Sectors Blocks Files
What factor most influences the ways that we interact with disks?
12/5/2013
![Page 12: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/12.jpg)
12
Secondary storage
Memory forms a hierarchy
Different levels of disk abstraction: Sectors Blocks Files
What factor most influences the ways that we interact with disks? Latency
12/5/2013
![Page 13: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/13.jpg)
13
Memory hierarchy
Each level acts as a cache of lower levels (Stats more or less for Core i7 3770)
CPU registers
L1 cache
L2 cache
Primary Memory
Secondary Storage
Tertiary Storage
128 bytes
32 KiB
4 x 256 KiB
8 GiB
1 TiB
1 PiB
30 million cycles
??? cycles
1 cycle
4 cycles
11 cycles
100 cycles
© 2010 Gribble, Lazowska, Levy, Zahorjan12/5/2013
L3 cache8 MiB 39 cycles
![Page 14: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/14.jpg)
14
File systems
What does a file system give you? Useful abstraction for secondary storage Organization of data
Hierarchy of directories and files Sharing of data
12/5/2013
![Page 15: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/15.jpg)
15
File system internals
Directories
Directory entries
Inodes
Files: One inode per file Multiple directory entries (links) per file
12/5/2013
![Page 16: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/16.jpg)
16
Inode-based file system
Sequence of steps when I run echo “some text” > /home/jay/file.txt ? Open file:
Get inode for / -> get data block for / Read directory entry for / -> get inode for /homes Repeat… -> get data block for file.txt, check permissions
Write to file: Modify data block(s) for file.txt in buffer cache
Close file: Mark buffer as dirty, release to buffer cache Kernel flushes dirty blocks back to disk at a later time12/5/2013
![Page 17: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/17.jpg)
17
Other file systems
What problem does each of these address? BSD Unix fast file system (FFS):
Performance: smarter physical disk layout Journaling file systems (JFS):
Reliability: transactions prevent inconsistencies after crash
Berkeley log-structured file system (LFS): Performance: even smarter physical disk layout?
12/5/2013
![Page 18: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/18.jpg)
18
RAID
Striping: read/write from multiple disks simultaneously Improves performance Hurts reliability
Parity: store redundant information to allow data recovery after disk failures Improves reliability Hurts performance
12/5/2013
![Page 19: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/19.jpg)
19
Devices and Drivers
How should the OS provide access to physical hardware to user processes? Multiplexing Mutual exclusion
UNIX / Linux device driver model
Virtual devices, and what they can do for you FUSE
12/5/2013
![Page 20: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/20.jpg)
20
Networking
Layering
Encapsulation
12/5/2013
![Page 21: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/21.jpg)
21
RPC
Benefits: Low-level details taken care of for you Natural interface
Implementation issues: Network failures / retries Architecture differences Performance
12/5/2013
![Page 22: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/22.jpg)
22
Distributed file systems
Why do we want them? Location independence Large-scale data sharing
Why are they hard? Consistency Replication Performance
Understand the target workloads12/5/2013
![Page 23: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/23.jpg)
23
Distributed systems
Scalability Limited by sharing
How does this relate to multi-core CPUs? Do more nodes equal more performance? How do companies like Amazon, Facebook,
Google, Microsoft, etc. parallelize workloads?
12/5/2013
![Page 24: CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.](https://reader036.fdocuments.net/reader036/viewer/2022070409/56649e915503460f94b97010/html5/thumbnails/24.jpg)
24
Virtual machine monitors
VMM is an additional layer between OS and hardware Can interpose on instruction execution, memory
accesses, I/O requests, and network communication
12/5/2013