Hi, Steve:

With all those other operating systems, including Unix and Linux and Windows, when you mmap() a file, you are mapping from a file system, where a file resides somewhere on disk, into the private address space of your job (or process).

With i5/OS. teraspace simulates a "private address space" in that each job (MI process) has its own unique teraspace address space, so when you mmap() a streamfile from the IFS, it does not directly reside on one disk unit, but rather, it resides within the IFS portion of the "single level storage" -- so the actual pages that comprise the streamfile may be allocated on many different DASD devices, and i5/OS attempts to "spread" them around, just like it does with any other object that resides in single-level storage, in order to maximize the number of heads and arms available to load the data "on demand" when needed, into the real main storage "cache".

IBM does not support use of the mmap() API to map QSYS.LIB objects into teraspace. I suppose this is because single-level storage MI objects are "encapsulated" so you do not get direct access to their "internals", only via supported interfaces and MI instructions, except for "space" objects (e.g. *USRSPC)l, which is just an array of bytes (up to the 16 MB limit you like to talk about) that can be accessed directly via a MI space pointer ( *SPCPTR).

SLS is a very different way of organizing data on one or more DASD volumes. Consider that, above the MI layer, OS/400 or i5/OS is not really even aware of "disk drives". It is all just "available space" within the single-level storage, waiting to be allocated by one of the various "create" MI instructions (to create the various kinds of MI objects that reside within SLS.) In other words, the SLIC kernel is aware of disk units, but then, once they are added to the System ASP, a User ASP, or an Independent ASP, they become part of the single-level storage. The rest of OS/400 or i5/OS "above the MI layer" (above the SLIC kernel) is blissfully unaware of the existence of individual disk units. This one design feature means that, unlike any other OS I am aware of, you, as a user, never have to be concerned with allocating files on certain disk volumes, or running out of space on one volume, and so having to move files to a different disk unit, etc. -- all of those issues just "go away" with SLS. And, in fact, in i5/OS or OS/400, you cannot designate what disk volume to use when creating an object; all you can do is to specify what ASP to create the object in (where the object "resides" within single-level storage).

With multiple Independent ASPs, you really have several different "single-level stores", one for the system ASP, and one for each independent disk pool. You (temporarily) attach or "mount" a given Independent ASP disk pool using the SETASPGRP command. This "mounts" this IASP so it appears to be part of the SLS. This is roughly analogous to mounting a disk unit in Unix or other operating systems, thus making "visible" all of the objects that reside within that IASP.

Hope that helps,


> Steve Richter wrote:
I am not sure. I dont know enough about the memory mapping APIs in IBM
i, Unix and Windows. It does raise a larger question in my mind, which
is, if all operating systems can map memory to stream files, what is
special about SLS?


On Thu, Aug 13, 2009 at 9:02 PM, Mark S.
Waterbury<mark.s.waterbury@xxxxxxx> wrote:
Hi, Steve:

We already have the ability in OS/400 to use the UNIX mmap() API to map
any streamfile into teraspace. You can use mmap64() to map files larger
than 4GB into teraspace. This has been available almost since Teraspace
was first introduced (around V4R4).

Using this approach, you can directly address the contents of
streamfiles via pointers. Is this not what you are asking for? :-o

Mark S. Waterbury

> Steve Richter wrote:
when explaining SLS to those on another platform, keep in mind r that
you have to be prepared to make the case of how SLS is better than a
traditional system. In SLS you have the same way of addressing bytes
in a permanent user space as in program allocated memory. However,
there is the 16 meg segment size limit which complicates the work of
coding for spaces. We have teraspace, but teraspace can only be used
only for progam allocated memory.

Consider the improvements which could be made to SLS. Without the
segment limit, stream files could be addressed as an array of bytes.
No need for teraspace, since objects on the system could be the size
of all the dasd on the system. Program memory could be allocated from
permanent user space like objects, making it possible for the system
to store the complete program memory state of an abended job.

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 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.