Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Johnny Billquist <bqt@softjar.se>
Subject: Re: QBUS Prototyping
Date: Mon, 19 Apr 2010 01:02:58 +0200	[thread overview]
Message-ID: <hqg332$ms2$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <hqfdn6$dd5$1@naig.caltech.edu>

glen herrmannsfeldt wrote:
> In alt.sys.pdp11 Johnny Billquist <bqt@softjar.se> wrote:
> (snip)
> 
>>> Unlike unix, where the system buffers data blocks, the OS/360
>>> model writes data directly from the disk into user buffers.
>>> Among other features of OS/360 is locate mode I/O.  When reading,
>>> data goes directly into the desired location.  For writing, 
>>> the I/O system supplies a buffer address, data is written directly
>>> into the buffer, and then it is scheduled to be written.
>  
>> Same in RSX. It's optional for the programmer to do this, but it saves a 
>> lot of time not having to do the extra copying.
> 
> But only in 512 byte blocks, right?  The S/360 hardware formats
> the disk blocks to whatever size you want.  For RECFM=V, blocks
> are different sizes and there is a formula to tell you how they
> pack onto a disk track.  For example, the IBM 3330 track holds 
> 13165 bytes, with a 135 byte overhead (header) for each block.
> You can write one block of 13030 bytes, or 96 blocks of one byte.

Well, no. When you, as a programmer, request to read one record, you can 
specify if the data is to be moved into a second buffer in your program, 
or if you are just as happy if the code returns a pointer to the data 
inside the block as originally read from disk.
So either it is just one DMA, into your pogram, by the whole 512 byte 
block, but then you process the data in place in that buffer, or else 
FCS (or RMS) can transfer your current record to another buffer 
specified by you, on which you do your processing.

It's called locate mode or transfer mode.

And for both types, the operation also returns a pointer to the data, 
and the length of the data. So obviously, you can write your program to 
work correctly for both situations, and just flip a bit in the file 
operation call to get it either way.

Notice, however, that even if you specify locate mode, it will actually 
do a move for you, if the record you are about to access actually span 
several disk blocks. And of course, one attribute you can set when 
creating a file, is the information if it is acceptable for records to 
cross block boundaries. So if you really want fast access, you specify 
locate mode, and your files have the bit saying records are not allowed 
to span blocks.

> So far I have thought that an RSX based NFS client would be the
> most useful.  For NFS server, I suppose you would want to do that.
> It isn't likely that a unix based NFS server is going to implement
> special RSX features, though.

Both are interesting, in my mind.
But I would probably start with a client if I were to do this.

And no, any (other) NFS server is not likely to implement special RSX 
features. Especially since NFS don't seem to allow for special 
OS-specific extensions.

That is the same reason I see problems with an NFS client under RSX, 
which don't adhere to the Unix view when talking to the server, while 
presenting an RSX view to the local side.

>>>> So, if you read a text file from Unix, and expect to present it to an 
>>>> RSX application, you need to read some (unknown) amount of data from the 
>>>> Unix server, pack this into a 512 byte block for the RSX operation, with 
>>>> record lengths between the record of data, and padded appropriately, and 
>>>> pass that 512 byte block to the user application.
>  
>>> The way I would solve that case would be to give the blocks 
>>> to RSX directly, and have the user run some conversion program.
>>> This program would read unix file blocks and write RSX file
>>> records.  They could be written back to the file system in
>>> RSX format, to later be read by RSX application programs.
>  
>> Ah. Yes, now we're getting to the root of it all.
>> Your solution is indeed doable, and much easier. But that basically 
>> means that you will have an NFS file system on RSX, from which you can 
>> basically only do one thing: use a special program to read/write files, 
>> with possible conversions.
>> What is the point of that? That means you must definitely have local 
>> disk as well.
> 
> You can write the converted file back to the NFS disk.  

Ugh! Well, be going with your extended idea of the NFS client having two 
ways to deal with files. A naive way of dealing with any unknown files, 
and a way to identify "known" files, which are assumed to be compatible 
with other RSX files.
And trusting that noone on the NFS server machine ever much around with 
the "known" files.

Let me just call myself defensive when I prefer to no rely on that. :-)

>> The possible extension that the NFS client also can play RSX-style 
>> files, under special circumstances makes it possible to use the NFS 
>> mounted disks natively, but you'd have to (as a user) almost know which 
>> files are ok or not, or else your programs just barf at you when you try 
>> accessing many files.
> 
> If you do map the RSX file names directly, then it will be easy.
> You could, for example, code the RSX Radix 50 filename in some
> strange way and only recognize native files in that form.
> For example, convert the Radix 50 16 bit words to hex and use
> that for a file name.  Only such files would be visible to ordinary
> RSX programs.  The conversion program would recognize both names.
> 
> You could also have a program that you run before your actual
> program that tells the client what you want to do with the files.
> Clients are stateful, only servers are supposed to be stateless.

I find the whole idea of not being fully interoperable very 
unattractive. I guess that is what I've been trying to say the whole time.
For me, that is simply not something that interest me much.

If I implement NFS, I would definitely want to be able to access remote 
files in the same way as local files, even if they were created on the 
remote file system.

Or atleast be interoperable as far as possible. And for instance text 
files is possible to get interoperable, but it's a lot of fiddling to do it.

>>>>> As above, any such conversions are done by the NFS client.  
>   
>>>> Exactly. And that means the code inside RSX. Which needs to then read 
>>>> through the whole file to calculate the actual length of the file, once 
> (snip)
>  
>>> But only for non-native files.
>  
>> Yes. But then you have the question how you tell if a file is "native" 
>> to the client. NFS don't tell... And of course, a native file in the RSX 
>> case means we need information not possible to store in NFS, or Unix.
> 
> Well, as I said earlier you can store that in special files somewhere.
> You could also do it for directories, though I hadn't thought of
> that one before.

Directories are another headache. I haven't looked fully at how that 
works in NFS, but RSX have a rather different view on parts of that 
compared to Unix.

But storing special files, special filenames, or some similar solution 
is something I would very much want to avoid. It places way too much 
trust in the users on the users on the maching running the NFS server, 
as they can see and manipulate these files in a totally different way.

>>>>> The opaque model for NFS seems to indicate that your write data
>>>>> blocks to the server, 
> (snip)
>   
>>>> Oh sure. If you aren't really interested in NFS as a file system, but 
>>>> just as a file transportation device, then sure. But why use NFS in that 
>>>> case. FTP will work equally fine.
>  
>>> Well, ftp still has some of the problems, but yes that does help.
>  
>> Actually, ftp don't have these problems.
>> ftp was designed to walk around these exact problems. So, ftp deals with 
>> records, where each side are free to perform whatever stuff needed to 
>> figure out what a record is, how to store and retrieve it, and so on.
>> So for Unix systems, if you transfer in ASCII mode, a record is the data 
>> between two LF. The data is sent over, with the FTP definition of record 
>> terminator, and the other side then strip of the FTP record terminator, 
>> and writes the record to disk, with whatever tricks needed on that 
>> system (like adding an LF on a Unix system).
> 
> Well, for example, if you ftp a tar file then you are still stuck.
> Since ftp isn't very convenient for directory trees that is very
> common.

You are stuck in the sense that you don't have tar for RSX, true.
But that is another kind of problem.
The tar-file itself should (obviously) be transferred as a binary file, 
and will survive the trip just fine.
A tar extraction will probably create problems.
I believe ZIP might be better. There is ZIP for VMS, which seems to 
handle file attributes and other VMSism just fine, while still (I 
assume) be compatible with other ZIP implementations.

But these are not ftp problems.

>>> I belive that another case relates to the read and execute bits,
>>> in that a file can have execute but not read access.  As the
>>> NFS server has no way to know what the client is doing with
>>> the bits, you can read such a file.  It seems, then, that one
>>> maps protection bits as well as one can, but not always
>>> perfectly.
>  
>> The concept of execute protection don't exist in RSX. However, RSX 
>> differs betweem write access and extend access. Write access only allows 
>> you to write in the file, in blocks already existing in the file. Extend 
>> access allows you to grow the file.
> 
>> And then you have delete access for files. Unlike Unix, where you don't 
>> ever actually delete a file. In Unix, you just unlink files, and when 
>> there are no references to a file, it is deleted. In RSX, you can have 
>> references to deleted file, and files can exist, even though there are 
>> no references to it. In Unix-speak, link/unlink are separate operations 
>> from file creation/deletion.
> 
>> In order to "delete" a file in Unix, you need to have write access to 
>> the directory in which the file have a reference. In RSX you need to 
>> have delete rights to that specific file to delete the file. You need to 
>> have write access to the directory in order to remove the reference.
> 
> It isn't so obvious that all RSX attributes have to still work...

They obviously cannot be allowed to work in the same way. But the 
question is how to transmogrify this so that programs in RSX react the 
right way instead of throwing strange errors that noone will understand.

>> I can go on with more conflicting ways between RSX and Unix with regards 
>> to file protections...
>  
>> And as I said, in RSX you have four groups, not three as in Unix.
>> You have SYSTEM, OWNER, GROUP and WORLD. The system protection mask is 
>> applied to users who are in groups 0 to 7.
> 
> The NFS tradition is not to map client UID 0 to server UID 0, though
> it is done in special cases, mostly for diskless clients.  
> Continuing that, you would not allow SYSTEM access for clients.

Yes. UID 0 is noramlly mapped to UID -2. But Unix also basically don't 
do any protection checks if you have UID 0. RSX don't have such a 
powerful pass-all-checks mechanism.
Are you suggesting that I should map all 2048 different SYSTEM UICs in 
RSX to the same user when go over NFS?
Actually, the remapping of UID 0 to -2 is done on the server side, and 
not the client side, by the way...

>>>> Like I said from the start - I don't consider filename issues to be a 
>>>> problem. That part is easy...
>>>> But since you brought it up, I thought I'd just explain a little about 
>>>> how it works in RSX.
>  
>>> OK, I remember Radix 50 from RT-11, and sixbit from TOPS-10.
>  
>> RSX use Radix50, though. Just to clarify. In RSX, a filename is 9+3 R5 
>> characters (4 words total). And then you have a file version number, 
>> which is a 5th word. (All words are 16 bits.)
> 
> You could store the Radix 50 name, maybe converted to hex, as
> a hard link to the file with an ASCII name.  That would allow
> either system to see it.  

Could, but I think I would just transform "illegal" filenames from the 
server into something legal on the RSX side, and keep filenames which do 
fit just as they are.

>> And this in turn is then translated into a File ID, which is a 48-bit 
>> number, consisting of 3 16-bit parts, which is what all file operations 
>> are using when doing file operations. The FileID is very similar to the 
>> i-node number in Unix.
> 
> I think NFS can access files by inode, though I haven't thought
> about that for a while.  I am not sure how many bits go into
> an inode number on current systems.

NFS basically will have to support access by inode numbers, or RSX will 
work very badly on an RSX client, as it is not that uncommon for 
programs to actually open files by file id, and not filename.

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


  reply	other threads:[~2010-04-18 23:02 UTC|newest]

Thread overview: 146+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 13:52 QBUS Prototyping Bill Gunshannon
2010-04-08 14:38 ` Scott Dorsey
2010-04-08 14:58 ` Al Kossow
2010-04-08 15:44   ` Bill Gunshannon
2010-04-08 20:46     ` John Wallace
2010-04-08 21:01       ` Bill Gunshannon
2010-04-08 21:58         ` Rob Jarratt
2010-04-08 23:00           ` John Wallace
2010-04-09 11:22             ` David Riley
2010-04-09 18:08           ` Johnny Billquist
2010-04-09 18:22             ` Bill Gunshannon
2010-04-10 19:29               ` Johnny Billquist
2010-04-10 21:05                 ` Bill Gunshannon
2010-04-11  9:50                   ` Johnny Billquist
2010-04-11 14:13                     ` Bill Gunshannon
2010-04-09 19:20             ` glen herrmannsfeldt
2010-04-11 22:08             ` Dennis Boone
2010-04-12 11:41               ` dsnyder
2010-04-12 14:46                 ` Al Kossow
2010-04-13 11:08                   ` dsnyder
2010-04-15 17:27             ` Scott Dorsey
2010-04-15 18:29               ` Al Kossow
2010-04-09 19:14           ` glen herrmannsfeldt
2010-04-09 20:02             ` John Wallace
2010-04-09 20:28               ` David Riley
2010-04-10  1:28               ` glen herrmannsfeldt
2010-04-14 22:28               ` Bob Koehler
2010-04-08 21:59         ` glen herrmannsfeldt
2010-04-08 22:38           ` Bill Gunshannon
2010-04-11 10:16             ` glen herrmannsfeldt
2010-04-11 14:24               ` Bill Gunshannon
2010-04-11 17:10                 ` glen herrmannsfeldt
2010-04-12 21:25                 ` Johnny Billquist
2010-04-12 22:02                   ` John Wallace
2010-04-13  7:34                     ` Johnny Billquist
2010-04-19  2:25                       ` John Santos
2010-04-19 11:50                         ` John Wallace
2010-04-19 10:50                       ` VAXman-
2010-04-24 14:55                         ` Bill Gunshannon
2010-04-12 22:33                   ` glen herrmannsfeldt
2010-04-13  7:53                     ` Johnny Billquist
2010-04-13 12:01                       ` glen herrmannsfeldt
2010-04-16 23:44                         ` Johnny Billquist
2010-04-17  3:15                           ` glen herrmannsfeldt
2010-04-17 21:00                             ` Johnny Billquist
2010-04-18  0:31                               ` glen herrmannsfeldt
2010-04-18 13:23                                 ` Johnny Billquist
2010-04-18 16:58                                   ` glen herrmannsfeldt
2010-04-18 23:02                                     ` Johnny Billquist [this message]
2010-04-19  1:39                                       ` glen herrmannsfeldt
2010-04-19 20:22                                         ` Johnny Billquist
2010-04-19 21:27                                           ` glen herrmannsfeldt
2010-04-20 19:36                                           ` Hans Bachner
2010-04-24 15:36                                             ` Steven Schweda
2010-04-25  3:55                                               ` Johnny Billquist
2010-04-25  5:32                                                 ` Steven Schweda
2010-04-25 11:33                                                   ` Johnny Billquist
2010-04-25 12:17                                                     ` glen herrmannsfeldt
2010-04-25 13:31                                                       ` Johnny Billquist
2010-04-25 14:01                                                         ` Steven Schweda
2010-04-25 21:58                                                           ` Johnny Billquist
2010-04-25 13:58                                                     ` Steven Schweda
2010-04-25 21:47                                                       ` Johnny Billquist
2010-04-26 15:40                                                         ` Bob Koehler
2010-04-27  7:37                                                           ` Johnny Billquist
2010-04-27  7:58                                                             ` Bob Eager
2010-04-27 14:56                                                               ` Bob Koehler
2010-04-28  9:06                                                                 ` Johnny Billquist
2010-04-28 12:34                                                                   ` Bob Eager
2010-04-28 14:51                                                                   ` Bob Koehler
2010-04-29  0:18                                                                     ` Johnny Billquist
2010-04-29 15:16                                                                       ` Bob Koehler
2010-04-27 14:53                                                             ` Bob Koehler
2010-04-28  9:11                                                               ` Johnny Billquist
2010-04-28 14:52                                                                 ` Bob Koehler
2010-04-29  0:20                                                                   ` Johnny Billquist
2010-04-29  1:15                                                                     ` Johnny Billquist
2010-04-29  7:01                                                                       ` John Wallace
2010-04-29 11:19                                                                         ` Jerome H. Fine
2010-04-29 18:38                                                                           ` glen herrmannsfeldt
2010-04-29 19:53                                                                             ` Jerome H. Fine
2010-04-29 20:35                                                                               ` glen herrmannsfeldt
2010-04-29 21:43                                                                                 ` Bob Eager
2010-04-30  0:23                                                                                 ` Johnny Billquist
2010-04-30  1:39                                                                                   ` glen herrmannsfeldt
2010-04-30  0:19                                                                               ` Johnny Billquist
2010-04-30 15:04                                                                                 ` Bob Koehler
2010-04-30  0:09                                                                           ` Johnny Billquist
2010-04-30  0:51                                                                             ` Johnny Billquist
2010-04-30  0:58                                                                               ` Johnny Billquist
2010-04-30 11:44                                                                                 ` Jerome H. Fine
2010-04-30 14:59                                                                             ` Bob Koehler
2010-04-30 18:34                                                                               ` glen herrmannsfeldt
2010-04-29 15:19                                                                         ` Bob Koehler
2010-04-30  0:42                                                                           ` Johnny Billquist
2010-04-30  0:04                                                                         ` Johnny Billquist
2010-04-29 15:17                                                                     ` Bob Koehler
2010-04-27 15:43                                                             ` jjh
2010-04-27 16:04                                                               ` Richard B. Gilbert
2010-04-28  9:20                                                                 ` Johnny Billquist
2010-04-28 16:12                                                                   ` Richard B. Gilbert
2010-04-27 22:27                                                               ` Bob Koehler
2010-04-28  9:18                                                               ` Johnny Billquist
2011-04-18 13:00                                                           ` Bob Koehler
2011-04-18 15:06                                                             ` Johnny Billquist
2011-04-18 12:56                                                     ` Bob Koehler
2011-04-18 15:07                                                       ` Johnny Billquist
2011-04-18 17:26                                                         ` Michael Moroney
2011-04-18 17:53                                                           ` Bob Koehler
2011-04-19  3:35                                                           ` Johnny Billquist
2011-04-19 15:34                                                             ` Michael Moroney
2011-04-19 16:47                                                               ` Johnny Billquist
2011-04-18 17:49                                                         ` Bob Koehler
2011-04-19  3:36                                                           ` Johnny Billquist
2011-04-18 12:52                                   ` Bob Koehler
2011-04-18 15:11                                     ` Johnny Billquist
2011-04-18 17:51                                       ` Bob Koehler
2011-04-19 10:29                                     ` FTP is 40 years old Paul Sture
2010-04-09 14:39         ` QBUS Prototyping Bob Koehler
2010-04-09 16:00           ` Bill Gunshannon
2010-04-09 23:16             ` John E. Malmberg
2010-04-15  6:12           ` Antti Louko
2010-04-15 16:24             ` Run.PDP
2010-04-15 16:46               ` Al Kossow
2010-04-15 17:24                 ` glen herrmannsfeldt
2010-04-15 17:20               ` glen herrmannsfeldt
2010-04-16 23:54                 ` Johnny Billquist
2010-04-16 21:59               ` Bob Koehler
2010-04-16 23:56                 ` Johnny Billquist
2010-04-17  9:24               ` jjh
2010-04-17  9:56                 ` glen herrmannsfeldt
2010-04-17 21:04                   ` Johnny Billquist
2010-04-24 15:54                   ` Bill Gunshannon
2010-04-24 15:52                 ` Bill Gunshannon
2010-04-25  4:00                   ` Johnny Billquist
2010-04-25  6:29                     ` glen herrmannsfeldt
2010-04-25  7:42                       ` Wilm Boerhout
2010-04-25 19:57                         ` Antti Louko
2010-04-25 11:40                       ` Johnny Billquist
2010-04-25 21:47                         ` John Wallace
2010-04-26  0:32                           ` Johnny Billquist
2010-04-15 17:19         ` Scott Dorsey
2010-04-09  1:00       ` Richard
2010-04-09 11:34         ` David Riley
2010-04-09 21:24           ` Richard
2010-04-08 20:18 ` JF Mezei
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox