1 / 37

COMS 414 - Prelim 2 Review Session

Learn about DNS (Domain Name System), CDN (Content Distribution Networks), UDP (User Datagram Protocol), TCP (Transmission Control Protocol), VPN (Virtual Private Network), NAT (Network Address Translation), network failures, IP multicast, and virtual memory management.

cmeekins
Télécharger la présentation

COMS 414 - Prelim 2 Review Session

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. COMS 414 - Prelim 2 Review Session Biswanath Panda bpanda@cs.cornell.edu

  2. Outline • Networks • Memory • Homework

  3. < DNS > • DNS == Domain Name System • Why do we need Domain Name? • Domain names are easier to remember than IP addresses • IP addresses can be dynamically changing. • IP addresses may not be unique. • Why do we need DNS? • Mapping between domain name and IP addresses.

  4. Biswanath Panda: DNS information distrbuted across all hosts. Each domain level has its own name server. Caching for faster lookups. TTL field so that stale entires are removed and rechecked < DNS > • By maintaining distributed host table • Scalability !!! • How changes to [domain name – IP address] mapping will be updated? • Caching… • TTL…

  5. < DNS > • Name resolution commands • NSLookup [ipaddress | sitename] • ping -a • Query scheme is simple • Query( domain name, RR type ) • Answer( values, additional RRs ) • RR == Resource record

  6. DNS tree structure NS RR “pointers” . edu. com. jp. us. cornell.edu. cmu.edu. mit.edu. cs.cornell.edu. eng.cornell.edu. foo.cs.cornell.edu A 10.1.1.1 bar.cs.cornell.edu A 10.1.1.1

  7. < CDN > • CDN == Content Distribution Networks • Replication of web servers • CDN V.S. Centralized server • Less latency, better performance • More robust service availability

  8. < CDN > • Cached CDN – cache contents on cache miss • Pushed CDN – push contents up-front • Issues • Difficulty with dynamic contents • Cache performance V.S. Content synchronization.

  9. < UDP > • Unreliable / Out-of-order message delivery. • Connection-less. • Datagram based. • Messages > MTU will be dropped. • MTU == Maximum Transmission Unit • Default ~1460bytes with Cisco routers • No flow control • No congestion control

  10. < TCP > • Reliable / In-order message delivery. • Connection-oriented. • Stream based - thus no restriction on transmission size • Flow control • Congestion control

  11. TCP connection establishment SYN, SeqNum=x • Three-way handshake • 1. SYN • 2. ACK + SYN • 3. ACK • Connection established only after all three steps. • If not, time-out. SYN+ACK, SeqNum=y, Ack=x+1 ACK, Ack=y+1 Client (active) Server (passive)

  12. TCP-SYN Attack • Classic DOS (Denial of Service) attack. • Attack by creating myriads of half-established connections.

  13. TCP Sliding Window • This is how below TCP properties come to life • Reliable delivery • In-order delivery • Any size message (stream based) • Flow control • Sliding window can’t slide if messages in the window didn’t get through.

  14. TCP Sliding Window • Advertisement of Window size via ACK • Small sliding window • Low performance due to delay waiting on ACK. • Bad with network with large RTT (Round Trip Time) • Large sliding window • Send data as a bulk, waiting ACK as a bulk. • Bad if network congestion, as bulk transfer will make circumstance worse.

  15. TCP Congestion Control • Interpret dropped packets as congestion • Maintain congestion window size • Additive Increase/Multiplicative Decrease TCP sawtooth pattern KB Time (seconds)

  16. Wireless environment • Issues • High RTT(Round Trip Time) • Message loss pattern differs from wired network • What do ‘dropped packets’ indicate? • TCP assumes congestion. • But it could be just lossy medium. • How will UDP/TCP behave on wireless?

  17. VPN == Virtual Private Network • remote client can communicate with the company network securely over the public network as if it resided on the internal LAN

  18. NAT == Network Address Translation • allows an IP-based network to manage its public (Internet) addresses separately from its private (intranet) addresses. • popular technology DSL or cable LANs

  19. Network Failure • Packet drop or packet delay • System Crash / halt • Byzantine failure • Some systems behaves incorrectly or unexpectedly • Could be a malicious attacker • Network Partition • Also known as “Split Brain Syndrome” • Some nodes in a cluster no longer communicate with each other

  20. IP Multicast • Reduces overhead for sender • Reduces bandwidth consumption in network • Useful in small subnet • I.e.) virtual meeting broadcast within a corporate network

  21. 0: 1: CPU N-1: < Virtual Memory Overview > Memory Page Table Virtual Addresses Physical Addresses 0: 1: P-1: Disk Address Translation: Hardware converts virtual addresses to physical addresses via an OS-managed lookup table (page table)

  22. Virtual Memory yet another picture.. Virtual Page Number Valid Physical Memory 1 1 0 1 1 1 0 1 0 Disk Storage (swap file or regular file system file) 1 Memory resident page table (physical page or disk address)

  23. Multi-Level Page Tables • multi-level page tables • Level 1 table: • 1024 entries, each of which points to a Level 2 page table. • Level 2 table: • 1024 entries, each of which points to a page ... Level 1 Table Level 2 Tables

  24. Page Faults • PTE == Page Table Entry • Each entry is (pointer to physical address, flags) • If a process tries to access a page not memory •  Page Fault Interrupt •  OS exception handler “page-fault trap”

  25. Paging and swapping Before fault After fault Memory Memory Page Table Page Table Virtual Addresses Physical Addresses Virtual Addresses Physical Addresses CPU CPU Disk Disk

  26. < Page replacement schemes > • FIFO– first in first out • OPT - (or MIN) optimal page replacement • LRU– least recently used • LRU Approximation • Mimicking LRU when no hardware support for LRU • Reference bits • Additional reference bits algorithm • Second chance algorithm • LFU– least frequently used • MFU– most frequently used

  27. FIFO and Belady's Anomaly  For some page replacement algorithms, the page fault rate may increase as the number of allocated frames increases.

  28. OPT (or MIN) • Assumes knowledge for future requirement. • Replace the page that will not be used for the longest period of time • Doesn’t show Belady’s anomaly • But practically too difficult to implement !

  29. LRU • Assume pages used recently will be used again • throw away page not used for longest time • Popular policy to be taken • Doesn’t show Belady’s anomaly • Implementation options • Counters • Stack

  30. Second-chance • LRU Approximation • Reference Bits + FIFO • if set, a page will be granted for second chance. • If a page used often enough, it will never be replaced. • Implementation by “Circular Queue” • Bad if all bits are set  degenerates to FIFO.

  31. LFU • Assumes pages used actively will be used again. • What about a page used heavily only in the beginning? •  shift count by 1 at regular intervals

  32. Virtual Memory Programmer’s view • Large “flat” address space • Can allocate large blocks of contiguous addresses • Processor “owns” machine • Has private address space • Unaffected by behavior of other processes

  33. Virtual Memory System’s view • virtual address space created by page mapping • Address space need not be contiguous • Allocated dynamically • Multi-processing performance • Switching to other processes when servicing disk I/O for page fault

  34. CPU C a c h e regs Levels in Memory Hierarchy virtual memory cache Memory disk 8 B 32 B 4 KB Register Cache Memory Disk Memory size: speed: $/Mbyte: line size: 32 B 1 ns 8 B 32 KB-4MB 2 ns $100/MB 32 B 128 MB 50 ns $1.00/MB 4 KB 20 GB 8 ms $0.006/MB larger, slower, cheaper

  35. Virtual Memory+ Cache miss VA PA Trans- lation Cache Main Memory CPU hit data • Problem? • Performs Address Translation before eachcache lookup • Which may involve memory access itself (of the PTE) • We could cache page table entries…

  36. hit miss VA PA TLB Lookup Cache Main Memory CPU miss hit Trans- lation data Virtual Memory+ Cache + TLB  Speed up Address translation

  37. < How to Prepare Prelim > • Make sure to review homework problem sets. • Practice writing synchronization code on your own !! • Sleep well and have your brain ready to think ! • http://www.cs.cornell.edu/Courses/cs414/2004fa/ • http://www.cs.cornell.edu/Courses/cs414/2003fa/

More Related