Block and Character Devices  Block devices include disk drives  Commands include read, write, seek  Raw I/O, direct I/O, or file-system access  Memory-mapped file access possible    File mapped to virtual memory and clusters brought via demand paging DMA Character devices include keyboards, mice, serial ports  Commands include get(), put()  Libraries layered on top allow line editing Operating System Concepts – 9th Edition 13.20 Silberschatz, Galvin and Gagne ©2013
View full slide show




Block and Character Devices  Block devices include disk drives  Commands  Raw include read, write, seek I/O or file-system access  Memory-mapped file access possible  Character devices include keyboards, mice, serial ports  Commands  Libraries include get(), put() layered on top allow line editing Operating System Concepts with Java – 8th Edition 12.37 Silberschatz, Galvin and Gagne ©2009
View full slide show




Block and Character Devices   Block devices include disk drives  Commands include read, write, seek  Raw I/O or file-system access  Memory-mapped file access possible Character devices include keyboards, mice, serial ports  Commands include get, put  Libraries layered on top allow line editing Operating System Concepts – 8th Edition 13.16 Silberschatz, Galvin and Gagne ©2009
View full slide show




Replay    QoE measurement  Old way: QoE = Server + Network  Modern way: QoE = Servers + Network + Browser Browsers are smart  Parallelism on multiple connections  JavaScript execution can trigger additional queries  Rendering introduces delays in resource access  Caching and pre-fetching HTTP replay cannot approximate real Web browser access to resources 0.25s 0.25s 0.06s 1.02s 0.67s 0.90s 1.19s 0.14s 0.97s 1.13s 0.70s 0.28s 0.27s 0.12s 3.86s 1.88s Total network time GET /wiki/page 1 Analyze page GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET GET combined.min.css jquery-ui.css main-ltr.css commonPrint.css shared.css flaggedrevs.css Common.css wikibits.js jquery.min.js ajax.js mwsuggest.js plugins...js Print.css Vector.css raw&gen=css ClickTracking.js Vector...js js&useskin WikiTable.css CommonsTicker.css flaggedrevs.js Infobox.css Messagebox.css Hoverbox.css Autocount.css toc.css Multilingual.css mediawiki_88x31.png 2 Rendering + JavaScript GET GET GET GET GET GET GET GET GET ExtraTools.js Navigation.js NavigationTabs.js Displaytitle.js RandomBook.js Edittools.js EditToolbar.js BookSearch.js MediaWikiCommon.css 3 Rendering + JavaScript GET GET GET GET GET GET GET GET GET GET GET 4 GET GET GET GET GET GET page-base.png page-fade.png border.png 1.png external-link.png bullet-icon.png user-icon.png tab-break.png tab-current.png tab-normal-fade.png search-fade.png Rendering search-ltr.png arrow-down.png wiki.png portal-break.png portal-break.png arrow-right.png generate page send files send files mBenchLab – [email protected] BROWSERS MATTER FOR QOE? send files send files + 2.21s total rendering time 6
View full slide show




Producer Consumer Synchronized Circular Buffer Produced 1 into cell 0 write 1 read 0 buffer: Produced 2 into cell 1 write 2 read 0 buffer: Consumed 1 from cell 0 write 2 read 1 buffer: Produced 3 into cell 2 write 3 read 1 buffer: Produced 4 into cell 3 write 4 read 1 buffer: Produced 5 into cell 4 write 0 read 1 buffer: Produced 6 into cell 0 write 1 read 1 buffer: BUFFER FULL WAITING TO PRODUCE 7 Consumed 2 from cell 1 write 1 read 2 buffer: Produced 7 into cell 1 write 2 read 2 buffer: BUFFER FULL WAITING TO PRODUCE 8 Consumed 3 from cell 2 write 2 read 3 buffer: Produced 8 into cell 2 write 3 read 3 buffer: BUFFER FULL WAITING TO PRODUCE 9 Consumed 4 from cell 3 write 3 read 4 buffer: Produced 9 into cell 3 write 4 read 4 buffer: BUFFER FULL WAITING TO PRODUCE 10 Consumed 5 from cell 4 write 4 read 0 buffer: Produced 10 into cell 4 write 0 read 0 buffer: BUFFER FULL ProduceInteger finished producing values Terminating ProduceInteger 1 -1 -1 -1 -1 1 2 -1 -1 -1 1 2 -1 -1 -1 1 2 3 -1 -1 1 2 3 4 -1 1 2 3 4 5 6 2 3 4 5 Consumed 6 from cell 0 write 0 read 1 buffer: Consumed 7 from cell 1 write 0 read 2 buffer: Consumed 8 from cell 2 write 0 read 3 buffer: Consumed 9 from cell 3 write 0 read 4 buffer: Consumed 10 from cell 4 write 0 read 0 buffer: BUFFER EMPTY ConsumeInteger retrieved values totaling: 55 Terminating ConsumeInteger 6 6 6 6 6 6 2 3 4 5 6 7 3 4 5 6 7 3 4 5 6 7 8 4 5 6 7 8 4 5 6 7 8 9 5 6 7 8 9 5 6 7 8 9 10 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 Ref: http://userhome.brooklyn.cuny.edu/irudowdky/OperatingSystems.htm & Silberschatz, Gagne, & Galvin, Operating Systems Concepts, 7th ed, Wiley (ch 1-3)
View full slide show




Application API • Block devices include disk drives – Commands include read, write, seek – Raw I/O or file-system access – Memory-mapped byte streams using virtual memory facilities • Character devices (keyboards, mice, serial ports) – Commands include get, put – Libraries layered on top allow line editing (backspace etc.) • Network devices – Incorporates protocol, flow control, and pipelining – Separates network protocol from network operation – Includes select functionality (socket port numbers) • Clocks and Timers for current time and elapsed time – Course grain regular interval interrupts – Programmable non-interruptible timers for fine grain resolution
View full slide show




HDFS (Hadoop Distributed File System) is a distr file sys for commodity hdwr. Differences from other distr file sys are few but significant. HDFS is highly fault-tolerant and is designed to be deployed on low-cost hardware. HDFS provides hi thruput access to app data and is suitable for apps that have large data sets. HDFS relaxes a few POSIX requirements to enable streaming access to file system data. HDFS originally was infrastructure for Apache Nutch web search engine project, is part of Apache Hadoop Core http://hadoop.apache.org/core/ 2.1. Hardware Failure Hardware failure is the normal. An HDFS may consist of hundreds or thousands of server machines, each storing part of the file system’s data. There are many components and each component has a non-trivial prob of failure means that some component of HDFS is always non-functional. Detection of faults and quick, automatic recovery from them is core arch goal of HDFS. 2.2. Streaming Data Access Applications that run on HDFS need streaming access to their data sets. They are not general purpose applications that typically run on general purpose file systems. HDFS is designed more for batch processing rather than interactive use by users. The emphasis is on high throughput of data access rather than low latency of data access. POSIX imposes many hard requirements not needed for applications that are targeted for HDFS. POSIX semantics in a few key areas has been traded to increase data throughput rates. 2.3. Large Data Sets Apps on HDFS have large data sets, typically gigabytes to terabytes in size. Thus, HDFS is tuned to support large files. It provides high aggregate data bandwidth and scale to hundreds of nodes in a single cluster. It supports ~10 million files in a single instance. 2.4. Simple Coherency Model: HDFS apps need a write-once-read-many access model for files. A file once created, written, and closed need not be changed. This assumption simplifies data coherency issues and enables high throughput data access. A Map/Reduce application or a web crawler application fits perfectly with this model. There is a plan to support appending-writes to files in future [write once read many at file level] 2.5. “Moving Computation is Cheaper than Moving Data” A computation requested by an application is much more efficient if it is executed near the data it operates on. This is especially true when the size of the data set is huge. This minimizes network congestion and increases the overall throughput of the system. The assumption is that it is often better to migrate the computation closer to where the data is located rather than moving the data to where the app is running. HDFS provides interfaces for applications to move themselves closer to where the data is located. 2.6. Portability Across Heterogeneous Hardware and Software Platforms: HDFS has been designed to be easily portable from one platform to another. This facilitates widespread adoption of HDFS as a platform of choice for a large set of applications. 3. NameNode and DataNodes: HDFS has a master/slave architecture. An HDFS cluster consists of a single NameNode, a master server that manages the file system namespace and regulates access to files by clients. In addition, there are a number of DataNodes, usually one per node in the cluster, which manage storage attached to the nodes that they run on. HDFS exposes a file system namespace and allows user data to be stored in files. Internally, a file is 1 blocks stored in a set of DataNodes. The NameNode executes file system namespace operations like opening, closing, and renaming files and directories. It also determines the mapping of blocks to DataNodes. The DataNodes are responsible for serving read and write requests from the file system’s clients. The DataNodes also perform block creation, deletion, and replication upon instruction The NameNode and DataNode are pieces of software designed to run on commodity machines, typically run GNU/Linux operating system (OS). HDFS is built using the Java language; any machine that supports Java can run the NameNode or the DataNode software. Usage of the highly portable Java language means that HDFS can be deployed on a wide range of machines. A typical deployment has a dedicated machine that runs only the NameNode software. Each of the other machines in the cluster runs one instance of the DataNode software. The architecture does not preclude running multiple DataNodes on the same machine but in a real deployment that is rarely the case. The existence of a single NameNode in a cluster greatly simplifies the architecture of the system. The NameNode is the arbitrator and repository for all HDFS metadata. The system is designed in such a way that user data never flows through the NameNode. 4. The File System Namespace: HDFS supports a traditional hierarchical file organization. A user or an application can create directories and store files inside these directories. The file system namespace hierarchy is similar to most other existing file systems; one can create and remove files, move a file from one directory to another, or rename a file. HDFS does not yet implement user quotas or access permissions. HDFS does not support hard links or soft links. However, the HDFS architecture does not preclude implementing these features. The NameNode maintains the file system namespace. Any change to the file system namespace or its properties is recorded by the NameNode. An application can specify the number of replicas of a file that should be maintained by HDFS. The number of copies of a file is called the replication factor of that file. This info is stored by NameNode. 5. Data Replication: HDFS is designed to reliably store very large files across machines in a large cluster. It stores each file as a sequence of blocks; all blocks in a file except the last block are the same size. The blocks of a file are replicated for fault tolerance. The block size and replication factor are configurable per file. An application can specify the number of replicas of a file. The replication factor can be specified at file creation time and can be changed later. Files in HDFS are write-once and have strictly one writer at any time. The NameNode makes all decisions regarding replication of blocks. It periodically receives a Heartbeat and a Blockreport from each of the DataNodes in the cluster. Receipt of a Heartbeat implies that the DataNode is functioning properly. A Blockreport contains a list of all blocks on a DataNode
View full slide show




Write-back State Machine-III CPU Read hit • State machine for CPU requests for each cache block and for bus requests for each cache block Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU read miss CPU Read miss for this block Write back block, Place read miss Write Back Place read miss on bus CPU Write Block; (abort on bus Place Write Miss on Bus memory access) Cache Block State CPU read hit CPU write hit 03/24/19 Exclusive (read/write) Read miss for this block Write Back Block; (abort memory access) CPU Write Miss Write back cache block Place write miss on bus 39
View full slide show




Write-back State Machine - All Requests CPU Read hit • State machine for CPU requests for each cache block and for bus requests for each cache block Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU Read miss CPU read miss for this block Place read miss Write Back Write back block, on bus Block; (abort Place read miss CPU Write memory on bus access) Place Write Miss on Bus Read miss Cache Block for this block Write Back States Exclusive Block; (abort (read/write) memory access) CPU read hit CPU Write Miss Write back cache block CPU write hit Place write miss on bus 38 3/24+4/5-7/10 CSE502-S10, Lec 16-18-SMP
View full slide show




CPE 631 AM Snoopy-Cache State Machine-III CPU Read hit State machine for CPU requests for each cache block and for bus requests for each cache block Cache State Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus 24/03/19 UAH-CPE631 3
View full slide show




6. The Persistence of File System Metadata: The HDFS namespace is stored by the NameNode. The NameNode uses a transaction log called the EditLog to persistently record every change that occurs to file system metadata. For example, creating a new file in HDFS causes the NameNode to insert a record into the EditLog indicating this. Similarly, changing the replication factor of a file causes a new record to be inserted into the EditLog. The NameNode uses a file in its local host OS file system to store the EditLog. The entire file system namespace, including the mapping of blocks to files and file system properties, is stored in a file called the FsImage. The FsImage is stored as a file in the NameNode’s local file system too. The NameNode keeps an image of the entire file system namespace and file Blockmap in memory. This key metadata item is designed to be compact, such that a NameNode with 4 GB of RAM is plenty to support a huge number of files and directories. When the NameNode starts up, it reads the FsImage and EditLog from disk, applies all the transactions from the EditLog to the in-memory representation of the FsImage, and flushes out this new version into a new FsImage on disk. It can then truncate the old EditLog because its transactions have been applied to the persistent FsImage. This process is called a checkpoint. In the current implementation, a checkpoint only occurs when the NameNode starts up. Work is in progress to support periodic checkpointing in the near future. The DataNode stores HDFS data in files in its local file system. The DataNode has no knowledge about HDFS files. It stores each block of HDFS data in a separate file in its local file system. The DataNode does not create all files in the same directory. Instead, it uses a heuristic to determine the optimal number of files per directory and creates subdirectories appropriately. It is not optimal to create all local files in the same directory because the local file system might not be able to efficiently support a huge number of files in a single directory. When a DataNode starts up, it scans through its local file system, generates a list of all HDFS data blocks that correspond to each of these local files and sends this report to the NameNode: this is the Blockreport. 7. The Communication Protocols: All HDFS communication protocols are layered on top of the TCP/IP protocol. A client establishes a connection to a configurable TCP port on the NameNode machine. It talks the ClientProtocol with the NameNode. The DataNodes talk to the NameNode using the DataNode Protocol. A Remote Procedure Call (RPC) abstraction wraps both the Client Protocol and the DataNode Protocol. By design, the NameNode never initiates any RPCs. Instead, it only responds to RPC requests issued by DataNodes or clients. 8. Robustness: The primary objective of HDFS is to store data reliably even in the presence of failures. The three common types of failures are NameNode failures, DataNode failures and network partitions. 8.1. Data Disk Failure, Heartbeats and Re-Replication: Each DataNode sends a Heartbeat message to the NameNode periodically. A network partition can cause a subset of DataNodes to lose connectivity with the NameNode. The NameNode detects this condition by the absence of a Heartbeat message. The NameNode marks DataNodes without recent Heartbeats as dead and does not forward any new IO requests to them. Any data that was registered to a dead DataNode is not available to HDFS any more. DataNode death may cause the replication factor of some blocks to fall below their specified value. The NameNode constantly tracks which blocks need to be replicated and initiates replication whenever necessary. The necessity for re-replication may arise due to many reasons: a DataNode may become unavailable, a replica may become corrupted, a hard disk on a DataNode may fail, or the replication factor of a file may be increased. 8.2. Cluster Rebalancing: HDFS arch is compatible with data rebalancing . A scheme might automatically move data from 1 DataNode to another if the free space on a DataNode falls below a certain threshold. In the event of a sudden high demand for a particular file, a scheme might dynamically create additional replicas and rebalance other data in the cluster. These types of data rebalancing schemes are not yet implemented. 8.3. Data Integrity: It is possible that a block of data fetched from a DataNode arrives corrupted. This corruption can occur because of faults in a storage device, network faults, or buggy software. The HDFS client software implements checksum checking on the contents of HDFS files. When a client creates an HDFS file, it computes a checksum of each block of the file and stores these checksums in a separate hidden file in the same HDFS namespace. When a client retrieves file contents it verifies that the data it received from each DataNode matches the checksum stored in the associated checksum file. If not, then the client can opt to retrieve that block from another DataNode that has a replica of that block.
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory  A file is initially read using demand paging  A page-sized portion of the file is read from the file system into a physical page  Subsequent reads/writes to/from the file are treated as ordinary memory accesses  Simplifies and speeds file access by driving file I/O through memory rather than read() and write() system calls  Also allows several processes to map the same file allowing the pages in memory to be shared  But when does written data make it to disk?  Periodically and / or at file close() time  For example, when the pager scans for dirty pages Operating System Concepts Essentials – 8th Edition 8.59 Silberschatz, Galvin and Gagne ©2011
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory.  A file is initially read using demand paging. A page-sized portion of the file is read from the file system into a physical page. Subsequent reads/writes to/from the file are treated as ordinary memory accesses.  Simplifies file access by treating file I/O through memory rather than read() write() system calls.  Also allows several processes to map the same file allowing the pages in memory to be shared. Operating System Concepts with Java – 8th Edition 9.52 Silberschatz, Galvin and Gagne ©2009
View full slide show




Not All 20 Point Fonts Are Equal 20  A - Can You Read B - Can You Read C - Can You Read D - Can You Read E - Can You Read F - Can You Read G - Can You Read H - Can You Read I - Can You Read 16  J - Can You Read K - Can You Read L - Can You Read M - Can You Read N - Can You Read O - Can You Read P - Can You Read Q - Can You Read R - Can You Read 14  J - Can You Read K - Can You Read L - Can You Read M - Can You Read O - Can You Read P - Can You Read Q - Can You Read R - Can You Read 12  J - Can You Read K - Can You Read L - Can You Read M - Can You Read N - Can You Read O - Can You Read P - Can You Read Q - Can You Read R - Can You Read My Students Tell Me That They Like The Readability Of Ariel Font I never use fonts smaller than 20 point for lecture.
View full slide show




Snoopy-Cache State Machine CPU Read hit Cache State Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus Write miss CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus
View full slide show




Snoopy-Cache State Machine • State machine for CPU requests for each cache block and for bus requests for each cache blockWrite miss Cache State 03/24/19 CPU Read hit Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus UAH-CPE 631 4
View full slide show




Snoopy-Cache State Machine-III • State machine for CPU requests for each cache block and for bus requests for each cache blockWrite miss Cache State 03/24/19 CPU Read hit Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus UAH-CPE 631 10
View full slide show




Snoopy-Cache State Machine-III • State machine for CPU requests for each cache block and for bus requests for each cache blockWrite miss Cache State 03/24/19 CPU Read hit Write miss for this block Shared CPU Read Invalid (read/only) Place read miss on bus CPU Write Place Write Miss on bus CPU read miss CPU Read miss for this block Write back block, Place read miss Place read miss on bus Write Back CPU Write on bus Block; (abort Place Write Miss on Bus memory access) Block Read miss Write Back for this block Block; (abort Exclusive memory access) (read/write) CPU Write Miss CPU read hit Write back cache block CPU write hit Place write miss on bus UAH-CPE 631 27
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory  A file is initially read using demand paging  A page-sized portion of the file is read from the file system into a physical page  Subsequent reads/writes to/from the file are treated as ordinary memory accesses  Simplifies and speeds file access by driving file I/O through memory rather than read() and write() system calls  Also allows several processes to map the same file allowing the pages in memory to be shared  But when does written data make it to disk?  Periodically and / or at file close() time  For example, when the pager scans for dirty pages Operating System Concepts – 9th Edition 9.57 Silberschatz, Galvin and Gagne ©2013
View full slide show




Disk Scheduling  The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk bandwidth  Access time has two major components  Seek time is the time for the disk to move the heads to the cylinder containing the desired sector  Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head  Minimize seek time  Seek time  seek distance  Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer Operating System Concepts with Java – 8th Edition 12.8 Silberschatz, Galvin and Gagne ©2009
View full slide show




Memory-Mapped File Technique for all I/O  Some OSes uses memory mapped files for standard I/O  Process can explicitly request memory mapping a file via mmap() system call   Now file mapped into process address space For standard I/O (open(), read(), write(), close()), mmap anyway  But map file into kernel address space  Process still does read() and write()   Copies data to and from kernel space and user space Uses efficient memory management subsystem  Avoids needing separate subsystem  COW can be used for read/write non-shared pages  Memory mapped files can be used for shared memory (although again via separate system calls) Operating System Concepts Essentials – 8th Edition 8.60 Silberschatz, Galvin and Gagne ©2011
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory  A file is initially read using demand paging. A page-sized portion of the file is read from the file system into a physical page. Subsequent reads/writes to/from the file are treated as ordinary memory accesses.  Simplifies file access by treating file I/O through memory rather than read() write() system calls  Also allows several processes to map the same file allowing the pages in memory to be shared Operating System Concepts – 7th Edition, Feb 22, 2005 9.50 Silberschatz, Galvin and Gagne ©2005
View full slide show




C:\UMBC\331\java> java.ext.dirs=C:\JDK1.2\JRE\lib\ext java.io.tmpdir=C:\WINDOWS\TEMP\ os.name=Windows 95 java.vendor=Sun Microsystems Inc. java.awt.printerjob=sun.awt.windows.WPrinterJob java.library.path=C:\JDK1.2\BIN;.;C:\WINDOWS\SYSTEM;C:\... java.vm.specification.vendor=Sun Microsystems Inc. sun.io.unicode.encoding=UnicodeLittle file.encoding=Cp1252 java.specification.vendor=Sun Microsystems Inc. user.language=en user.name=nicholas java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport... java.vm.name=Classic VM java.class.version=46.0 java.vm.specification.name=Java Virtual Machine Specification sun.boot.library.path=C:\JDK1.2\JRE\bin os.version=4.10 java.vm.version=1.2 java.vm.info=build JDK-1.2-V, native threads, symcjit java.compiler=symcjit path.separator=; file.separator=\ user.dir=C:\UMBC\331\java sun.boot.class.path=C:\JDK1.2\JRE\lib\rt.jar;C:\JDK1.2\JR... user.name=nicholas user.home=C:\WINDOWS C:\UMBC\331\java>java envSnoop -- listing properties -java.specification.name=Java Platform API Specification awt.toolkit=sun.awt.windows.WToolkit java.version=1.2 java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment user.timezone=America/New_York java.specification.version=1.2 java.vm.vendor=Sun Microsystems Inc. user.home=C:\WINDOWS java.vm.specification.version=1.0 os.arch=x86 java.awt.fonts= java.vendor.url=http://java.sun.com/ user.region=US file.encoding.pkg=sun.io java.home=C:\JDK1.2\JRE java.class.path=C:\Program Files\PhotoDeluxe 2.0\Adob... line.separator=
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory.  A file is initially read using demand paging. A page-sized portion of the file is read from the file system into a physical page. Subsequent reads/writes to/from the file are treated as ordinary memory accesses.  Simplifies file access by treating file I/O through memory rather than read() write() system calls.  Also allows several processes to map the same file allowing the pages in memory to be shared. Operating System Concepts 10.16 Silberschatz, Galvin and Gagne 2002
View full slide show




Memory-Mapped Files  Memory-mapped file I/O allows file I/O to be treated as routine memory access by mapping a disk block to a page in memory  A file is initially read using demand paging. A page-sized portion of the file is read from the file system into a physical page. Subsequent reads/writes to/from the file are treated as ordinary memory accesses.  Simplifies file access by treating file I/O through memory rather than read() write() system calls  Also allows several processes to map the same file allowing the pages in memory to be shared Operating System Concepts 9.48 Silberschatz, Galvin and Gagne ©2005
View full slide show




Memory-Mapped File Technique for all I/O  Some OSes uses memory mapped files for standard I/O  Process can explicitly request memory mapping a file via mmap() system call   Now file mapped into process address space For standard I/O (open(), read(), write(), close()), mmap anyway  But map file into kernel address space  Process still does read() and write()   Copies data to and from kernel space and user space Uses efficient memory management subsystem  Avoids needing separate subsystem  COW can be used for read/write non-shared pages  Memory mapped files can be used for shared memory (although again via separate system calls) Operating System Concepts – 9th Edition 9.58 Silberschatz, Galvin and Gagne ©2013
View full slide show




Preamble “Post-amble” Block Execution: 3 Detail Observing Block Observing Block “Post-amble” “Post-amble” 3 Observing Block Observing Block ok Measurement Set ready “Post-amble” EVLA Data Processing PDR Observing Observing Block Block Observing Observing Block Block Failed! Preamble “Post-amble” Preamble ok ?4 5 Preamble ready Preamble Observing Observing Block Block Observing Observing Block Block Observing Block Observing Block Measurement Set “Post-amble” “Post-amble” Preamble Preamble “Post-amble” Measurement Set “Post-amble” “Post-amble” “Post-amble” July 18 - 19, 2002 2 2 Observing Observing Block Block Block Observing Observing Observing Block Block ok Archive: Preamble Observing Block Observing Block 34 ready Preamble “Post-amble” 1 3 Observing Block Observing Observing Block Block Observing Block Observing Observing Block Block ready Preamble Execution: Preamble ready Observing Observing Block Block Observing Observing Block Block Preamble Observing Block Observing Block 22 “Post-amble” “Post-amble” Preamble Preamble 1 “Post-amble” Preamble Input Queue: ok Measurement Set Boyd Waters 13
View full slide show