|
OS/400 will overwrite the real storage frame without first saving the previous page contents on backing store (DASD).The difference between the single level store the i uses and the swapThat really depends on the nature of the page being swapped out. Say you
file system used by other systems, is that when the i swaps data out
of memory, it only exists in one place on disk. Whereas with other
systems, data is swapped out of memory into a specific swap file on
disk plus the original copy of the data still resides on the file
system.
fault in a page of an RPG program, and then the machine needs to use
that memory elsewhere, the i will simply drop that page on the floor
since it knows it can read that page from disk again. BTW, other OSs
will do that too. If Windows needs to swap out a DLL it will simply drop
it on the floor, it doesn't need to save it to the swap file.
However, if the memory page you're working with has modifications thenIn "Single Level Storage" as implemented by CPF, OS/400 and i5/OS, there is nothing like a "swap file" anywhere in the architecture. There are only MI objects existing in single-level storage; that is to say, they have a SLS address (128 bits or 16 bytres long), aka. an MI pointer. They may optionally have a "name" in CPF or XPF, but that is mostly done "above the MI" layer. When an MI object is created, it is designated as either "temporary" or "permanent", which controls whether they will persist across an IPL boundary. Once assigned a virtual address (MI pointer), and real DASD pages get assigned and allocated to that object, these pages never "move around" -- if paged in, and then later paged out again, each page will go right back where it came from -- to the same DASD device and block where it "resides".
the i has to swap that page out to some sort of swap file as it can't
reload it from disk as the changes haven't made it to disk yet (and
might not ever do so). Likewise, if you've changed a page in memory on
Windows and windows needs that memory it has no choice but to write it
out to swap.
Of course, the nature of i programming makes it less likely you'llA typical OS/400 application, let's say, an RPG program, reads a row from a table, or a record from a file, (in OS/400, they are the same thing). What happens is, the data management layer, having opened the file object, and resolved to the virtual address in SLS, now has pointers to the data space and data space index MI objects, so it can use MI instructions like FNDINDEN (find index entry) to search that index, and get a "pointer" to the corresponding "row" or record of data in the data space (in what is called a "cursor"). There are no "FILEs" in the traditional sense; there is no "read" and "write" of each individual record or row directly from disk -- there is only demand paging-in of the pages of the data space that contain the desired rows or records. The data management routines (QDBGET, QDBPUT, etc.) use special database MI instructions to copy the data from the data space to the application program's buffers. Similarly, if the application writes or updates a row or record, the database management layer uses special MI database instructions to copy the updated record data in the program's buffers back to the appropriate places within the data space. Then, eventually, (only) the "changed" pages of the data space will get "paged out" back to their permanent locations on DASD (unless you force "flushing" of changed pages to disk, e.g. using the FRCRATIO parameter of the CHGPF command, which causes the changed pages to get written back to disk right away, with a penalty of some performance loss for the application, which must wait for this actual disk I/O to complete, before it can continue.)
modify pages of information as most things can't be changed by a
programmer.
-WaldenI hope that helps to clarify some things for some folks.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.