DOC PREVIEW
CORNELL CS 614 - Virtual Memory and IO

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Virtual Memory and I/OI/O SystemsTechniques to Improve I/O PerformanceOther Techniques to Improve I/O PerformanceSummary of First PaperSummary of Second PaperFeatures of IO-LiteRelated work before IO-LiteKey Data StructuresDiscussion IImpact of Immutable I/O BuffersDiscussion IIWhat does IO-Lite do?IO-Lite and IPCIo-Lite and FilesystemCopy Semantics Illustration 1Copy Semantics Illustration 2Copy Semantics Illustration 3More on File Cache Management & VM PagingIO-Lite and Network SubsystemA Cross-Subsystem OptimizationPerformance – CompetitorsPerformance – Static Content requestingPerformance – CGI ProgramsPerformance – Real WorkloadPerformance – WAN EffectsPerformance – Other ApplicationsConclusion on I/O-LiteSoftware Prefetching & Caching for TLBsIssues in Virtual MemoryMotivationsApproachDiscussionPrefetching: What entries to prefetch?Prefetching: DetailsPrefetching: PerformanceSlide 37Caching: Software Victim CacheCaching: BenefitsCaching: PerformanceSlide 41Prefetching + Caching: PerformanceSlide 43Virtual Memory and I/OMingsheng HongI/O SystemsMajor I/O HardwareHard disks, network adaptors …Problems related with I/O SystemsVarious types of Hardware – device drivers to provide OS with a unified I/O interfaceTypically much slower than CPU and memory speed – system bottleneckToo much CPU involvement in I/O operationsTechniques to Improve I/O PerformanceBufferinge.g. download a file from networkDMACachingCPU cache, TLB, file cache..Other Techniques to Improve I/O PerformanceVirtual Memory Page Remapping (IO-Lite)Allows (cached) files and memory to be shared by different processes without extra data copyPrefetching Data (Software Pretching and Caching for TLBs)Prefetches and caches page table entriesSummary of First PaperIO-Lite: A Unified I/O Buffering and Caching System (Pai et al. Best Paper of 3rd OSDI, 1999)A unified I/O SystemUses immutable data buffers to store all I/O data (only one physical copy)Uses VM page remappingIPCfile system (disk files, file cache)network subsystemSummary of Second PaperSoftware Prefetching and Caching for Translation Lookaside buffers (Bala et al. 1994)A software approach to help reduce TLB missesWorks well for IPC-intensive systemsBigger performance gain for future systemsFeatures of IO-LiteEliminates redundant data copyingSaves CPU work & avoids cache pollution Eliminates Multiple bufferingSaves main memory => improves hit rate of file cacheEnables cross-subsystem optimizationsCache Internet checksumSupports application-specific cache replacement policiesRelated work before IO-LiteI/O APIs should preserve copy semanticsMemory-mapped filesCopy On WriteFbufsKey Data StructuresImmutable Buffers and Buffer AggregatesDiscussion IWhen we pass a buffer aggregate from process A to process B, how to efficiently do VM page remapping (modify B’s page table entries)?Possible Approach 1: find any empty entry, and modify the VM address contained in buffer aggregateVery inefficientPossible Approach 2: reserve the range of virtual addresses of buffers in the address space of each process Basically limited the total size of buffers – How about dynamically allocated buffers?Impact of Immutable I/O BuffersCopy-On-Write OptimizationModified values are stored in a new buffer, as opposed to “in-place modification”Three situations when the data object is …Completely modifiedAllocates a new bufferPartially modified (modification localized)Chains unmodified and modified portions of dataPartially modified (modification not localized)Compares the cost of writing an entire object with that of chaining; chooses the cheaper methodDiscussion IIHow to measure the two costs?Heuristics neededFragmented data v.s. clustered dataChained data increase reading costSimilar to shadow page technique used in System RShould the cost of retrieving data from buffer also be considered?What does IO-Lite do?Reduces extra data copy in IPCfile system (disk files, file cache)network subsystemMakes possible cross-subsystem optimizationIO-Lite and IPCOperations on Buffers & AggregatesWhen I/O data is transferredPass related aggregates by valueAssociated buffers are passed by referenceWhen buffer is deallocatedBuffer returned to a memory poolBuffer’s VM page mappings persistWhen buffer is reused (by the same process)No further VM map changes required(Temporarily) grant write permission to associated producer processIo-Lite and FilesystemIO-Lite I/O APIs ProvidedIOL_read(int fd, IOL_Agg **aggr, size_t size)IOL_write(int fd, IOL_Agg **aggr)IOL_write operations are atomic – concurrency supportI/O functions in stdio library reimplementedFilesystem cache reorganized Buffer aggregates (pointers to data), instead of file data, are stored in cacheCopy Semantics ensuredSuppose a portion of a cached file is read, and then is overwrittenCopy Semantics Illustration 1Copy Semantics Illustration 2Copy Semantics Illustration 3More on File Cache Management & VM PagingCache replacement policy (can be customized)The eviction order is by current reference status & time of last file accessEvict one entry when the file cache “appears” to be too largeAdded one entry on every file cache missWhen a buffer page is paged out, data will be written back to swap space, and possibly to several other disk locations (for different files)IO-Lite and Network SubsystemAccess control and protection for processesACL related with buffer poolsMust determine the ACL of a data object prior to allocating memory for itEarly demultiplexing technique to determine ACL for each incoming packetA Cross-Subsystem OptimizationInternet checksum cachingCache the computed checksum for each slice of a buffer aggregateIncrement the version number when buffer is reallocated – can be used to check whether data changed Works well for static files. Also has a big benefit on the CGI programs that chain dynamic data with static dataPerformance – CompetitorsFlash Web server – a high performance HTTP serverFlash-Lite – A modified version of Flash using IO-Lite APIApache 1.3.1 – representing the widely used Web server todayPerformance – Static Content requestingPerformance – CGI ProgramsPerformance – Real


View Full Document

CORNELL CS 614 - Virtual Memory and IO

Documents in this Course
Load more
Download Virtual Memory and IO
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Virtual Memory and IO and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Virtual Memory and IO 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?