Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Important Announcements  Midterm 3 is on Wednesday, April 20 from 7pm to 8:30pm —Practice Midterm 1 released tonight —Please email me ASAP in case you.

Similar presentations


Presentation on theme: "1 Important Announcements  Midterm 3 is on Wednesday, April 20 from 7pm to 8:30pm —Practice Midterm 1 released tonight —Please email me ASAP in case you."— Presentation transcript:

1 1 Important Announcements  Midterm 3 is on Wednesday, April 20 from 7pm to 8:30pm —Practice Midterm 1 released tonight —Please email me ASAP in case you need a conflict  Final Exam (cumulative) is on Monday, May 9 from 1:30pm to 4:30pm —Please email me ASAP in case you need a conflict

2 2 Virtual Memory system virtual address data physical address TLB page table memory cache disk page offset virtual page number (VPN) PPN tag index block offset

3 3 Hard drives  The textbook shows the ugly guts of a hard disk —Data is stored on double-sided magnetic disks called platters —Each platter is arranged like a record, with many concentric tracks —Tracks are further divided into individual sectors, which are the basic unit of data transfer —Each surface has a read/write head like the arm on a record player, but all the heads are connected and move together  A 75GB IBM Deskstar has roughly: —5 platters (10 surfaces), —27,000 tracks per surface, —512 bytes per sector, —~512 sectors per track… …but this number increases going from the center to the rim

4 4  There are two fundamental performance metrics for I/O systems: 1.LatencyTime to initiate data-transfer(units = sec) 2.BandwidthRate of initiated data-transfer(units = bytes/sec) Time = latency + transfer_size / bandwidth sec bytes / (bytes/sec) I/O Performance Dominant term for small transfers Dominant term for large transfers

5 5 Accessing data on a hard disk  Factors affecting latency: —Seek time measures the delay for the disk head to reach the track —A rotational delay accounts for the time to get to the right sector  Factors affecting bandwidth: —Usually the disk can read/write as fast as it can spin —Bandwidth is determined by the rotational speed, which also determines the rotational delay  We can compute average seek time/rotational delay/etc. but careful placement of data on the disk can speed things up considerably: —head is already on or near the desired track —data in contiguous sectors —in other words, locality!  Even so, loading a page from the hard-disk can take tens of milliseconds

6 6 Parallel I/O  Many hardware systems use parallelism for increased speed  A redundant array of inexpensive disks or RAID system allows access to several hard drives at once, for increased bandwidth —similar to interleaved memories from last week

7 7 MP6: Due Friday 4/29  Input: A string s  Output: Maximum number of non-overlapping increasing substrings in s  A string x is larger than string y if —length(x)  length(y) (e.g. “aa”  “z”); or —length(x) = length(y) but x is lexicographically bigger (e.g. “z”  “a”)  Example 1: s = aaa splits into two increasing substrings “a” and “aa”  Example 2: s = abc splits into three increasing substrings “a”, “b”, “c”  Example 2: s = aaaa splits into two increasing substrings “a” and “aa”; or “a” and “aaa”  Example 3: s = aaaaaa splits into three increasing substrings “a”, “aa” and “aaa”

8 8 MP6: Algorithm  Recurrence:  C++ code: Uses a hashtable (STL map ) for best(index, substr) values  Optimization techniques: —Compiler optimizations —Better (more cache-friendly) data structure —Better algorithm —Exploit parallelism —Manual optimizations best(i, last) next ij = 1 + best(j, next) best(i+1, last)


Download ppt "1 Important Announcements  Midterm 3 is on Wednesday, April 20 from 7pm to 8:30pm —Practice Midterm 1 released tonight —Please email me ASAP in case you."

Similar presentations


Ads by Google