Скачать презентацию Section 10 Last section Final review 1 Скачать презентацию Section 10 Last section Final review 1

ed03be89986d798d64f37905ad4361a9.ppt

  • Количество слайдов: 21

Section 10: Last section! Final review 1 Section 10: Last section! Final review 1

Processes n What is a process? What does it virtualize? n n differences between Processes n What is a process? What does it virtualize? n n differences between program, process, thread? what is contained in process? n n state queues? n n n what does PCB contain? which states, what transitions are possible? when do transitions happen? Process manipulation n n what does fork() do? how about exec()? how do shells work?

Threads n What is a thread? n n why are they useful? user-level vs. Threads n What is a thread? n n why are they useful? user-level vs. kernel-level threads? n n n performance implications functionality implications How does thread scheduling differ from process scheduling? n n n what operations do threads support? what happens on a thread context switch? what is saved in TCB? preemptive vs. non-preemptive scheduling?

Scheduling n n Long term vs. short term When does scheduling happen? n n Scheduling n n Long term vs. short term When does scheduling happen? n n Scheduling goals? n n n job changes state, interrupts, exceptions, job creation maximize CPU utilization maximize job throughput minimize {turnaround time | waiting time | response time} batch vs. interactive: what are their goals? What is starvation? what causes it? FCFS/FIFO, SPT, SRPT, priority, RR, …

Synchronization n Why do we need it? n n data coordination? execution coordination? what Synchronization n Why do we need it? n n data coordination? execution coordination? what are race conditions? when do they occur? when are resources shared? (variables, heap objects, …) What is mutual exclusion? n n what is a critical section? what are the requirements of critical sections? n n mutex, progress, bounded waiting, performance what are mechanisms for programming critical sections? n locks, semaphores, monitors, condition variables

Locks n n What does it mean for acquire/release to be atomic? how can Locks n n What does it mean for acquire/release to be atomic? how can locks be implemented? n n n spinlocks? interrupts? OS/thread-scheduler? test-and-set? limitations of locks?

Semaphores and Monitors n Semaphores and Condition Variables n n basic operations: wait vs. Semaphores and Monitors n Semaphores and Condition Variables n n basic operations: wait vs. signal? difference between semaphore and CV? when and how do threads block on semaphores? CVs? when do they wake? bounded buffers problem n n n readers/writers problem how is all of this implemented n n producer/consumer Moving descriptors on and off queues Monitors n the operations and their implementation

Deadlock n n static prevention, dynamic avoidance, detection/recovery tradeoffs among these graph reducibility approaches Deadlock n n static prevention, dynamic avoidance, detection/recovery tradeoffs among these graph reducibility approaches n n Hold and wait Resource ordering Banker’s algorithm Detect and eliminate

Memory Management n Mechanisms for implementing memory management n n physical vs. virtual addressing Memory Management n Mechanisms for implementing memory management n n physical vs. virtual addressing base/limit registers partitioning, paging, segmentation Internal and external fragmentation

Review: virtual memory n n n What is paging? What is segmentation? How are Review: virtual memory n n n What is paging? What is segmentation? How are both used? How does copy-on-write work? What is it used for? What is the Optimal Page Replacement Algorithm? What is Belady's anomaly? Is LRU Page Replacement the most practical algorithm? Why Not? 10

Review: virtual memory n Linux uses both paging and segmentation n How does copy-on-write Review: virtual memory n Linux uses both paging and segmentation n How does copy-on-write work? What is it used for? n n n Optimal page replacement – evict page the won’t be needed longest into the future What is Belady's anomaly? n n Writeable page mapped into multiple address spaces as one copy until first write. Useful fork – why? What is The OPT algorithm? n n Paging allows independent address spaces for each process. Segmentation sets up “kernel memory” and “user memory” segments – limited use in linux. Bad property of FIFO – fault rate can increase with more allocated frames LRU has great performance but is inefficient in practice. 11

Review: n Consider a modern desktop computer on which the hard disk is spinning. Review: n Consider a modern desktop computer on which the hard disk is spinning. What is the most significant delay in reading from a 4 K byte file that has not been accessed in a long time? 12

Review: Disks n Consider a modern desktop computer on which the hard disk is Review: Disks n Consider a modern desktop computer on which the hard disk is spinning. What is the most significant delay in reading from a 4 K byte file that has not been accessed in a long time? latency awaiting disk rotation and arm movement 13

Unix File System Source: wikipedia 14 Unix File System Source: wikipedia 14

Review: file systems Given 4 k data blocks, a 8 entry data table with Review: file systems Given 4 k data blocks, a 8 entry data table with 6 direct entries, one single-indirection entry, and one double-indirection entry, what is the maximum file size?

FS cont. Explain the benefit of cylinder groups introduced in the BSD FFS? . FS cont. Explain the benefit of cylinder groups introduced in the BSD FFS? . . . What problems were JFS addressing and how? . . .

Networking n n n ISO 7 -layer model Ethernet protocol IP and routing TCP Networking n n n ISO 7 -layer model Ethernet protocol IP and routing TCP principles (sending a long message via postcards) Protocol encapsulation

RPC n n n Basic idea – what does it buy you over message RPC n n n Basic idea – what does it buy you over message passing? Subtopics: interface description language, stubs, stub generation, parameter marshaling, binding, runtime/transport, error handling, performance, thread pools Transparency: when is distribution transparent, when is it not?

Distributed File Systems n n What are some difficult issues in distributed FSs? What Distributed File Systems n n What are some difficult issues in distributed FSs? What are some design decisions that NFS makes? 19

Distributed File Systems n What are some difficult issues in distributed FSs? n Naming: Distributed File Systems n What are some difficult issues in distributed FSs? n Naming: how to ensure uniqueness n Performance: how to hide network delay n n n Replication: how to maintain replicas consistent Master Issues: n n n Caching: how to make caches coherent How to vote on a unique master How to prevent master from being a bottleneck? NFS Design decisions n NFS: n n n For LANs (low-latency networks) Small in-mem caches flush on close 20

Last slide n n Good luck on the exam and the rest of your Last slide n n Good luck on the exam and the rest of your filesystems project! Congratulations on making it through a tough class 21