Role of OS in filesystem (was "File types")

Don THX1138 at
Wed Aug 30 13:06:26 CDT 2006

Michael B. Brutman wrote:
> Don wrote:
>> Michael B. Brutman wrote:
>>> I don't know if anybody pointed it out already but the IBM S/38, 
>>> AS/400 and derivatives have strongly typed 'objects', not files.  It 
>>> doesn't matter what you name a database table, an Ethernet line 
>>> description, or a user profile - the OS knows what those things are 
>>> and will not interpret them differently if you copy or rename them.
>> Does the *application* (that created the object) tag the file?
>> Or, must the OS be made aware of the file's type (by inspection,
>> etc.)?
>> If the former, how do competing applications "register" their
>> ability to handle a particular "type"?  (e.g., the example
>> from a previous post of wanting to "open" JPG's with different
>> applications -- as a function of the JPG itself)
>>> As a concession to hierarchical filesystems like the ones used by 
>>> Unix there is a 'file system' where the OS refuses to interpret what 
>>> the files are and just considers them streams of bytes.
> The applications use OS services to create the objects.  There are APIs 
> for creating all of the different types of objects on the system, and 
> the OS handles the tagging.

OK, but it does so at the behest of the application.  I.e. it
is an inherent consequence of the way the file is created
(and not some "afterthought" like "Oh, by the way, let's call
this a database file...")

> Keep in mind that OS/400 (or whatever the current name is) has a fairly 
> limited set of objects.  The job queues, user profiles, subsystem 
> descriptions, database tables, etc. are all 'objects'. Things like 
> generic files that are not interesting to the machine but might be 
> interesting to client machines that connect to OS/400 get dumped in 
> generic 'stream files' in a hierarchical filesystem.

So, the OS's involvement is only to the extent that those
objects affect the OS itself.  E.g., it wouldn't think
JPEGs were "anything special".  So, it doesn't extend
the concept of file types outside it's own domain.

> The OS enforces correct usage of these objects.  You can read or access 
> a database table as a different type of object.  The OS implements this 
> by storing meta data in each object and managing object types in a 
> centralized manner.

The meta data is stored *in* the object?  So, it can't tell
what type of object it has without *open()*-ing it?

More information about the cctalk mailing list