From: Johnny Billquist <bqt@softjar.se>
Subject: Re: QBUS Prototyping
Date: Sun, 18 Apr 2010 15:23:08 +0200 [thread overview]
Message-ID: <hqf13t$e29$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <hqdjta$3dh$1@naig.caltech.edu>
glen herrmannsfeldt wrote:
> In alt.sys.pdp11 Johnny Billquist <bqt@softjar.se> wrote:
>> glen herrmannsfeldt wrote:
>>> In alt.sys.pdp11 Johnny Billquist <bqt@softjar.se> wrote:
>> Meaning a lot of intelligence must go into the client, which means
>> (in this case) the RSX side, where we least can afford it.
>
> Well, with memory mapping you should at least be able to find
> a place to put the code. I am also interested in NFS for CP/M,
> which will likely also need some memory mapping to have enough
> room for it.
Yes. I can play around with memory mapping in RSX. And yes, I don't
consider this an impossible mission. Just one that gives enough
headaches that I'm not keen on doing it.
>> And my problem is exactly that placing a lot of smarts in the
>> NFS client is difficult.
>
> Difficult because it takes a lot of code? Add more memory unless
> you are out of physical address space. You could also put a processor
> on the interface card to do some of the work.
I have enough physical memory in a PDP-11 to manage. So it's just
difficult because it's a lot of code, and I also have to design it so
that I can map in different parts as appropriate.
>>> The NFS READ and WRITE requests take a byte offset and byte
>>> length specifier. There are complications due to EOF, which it
>>> seems where improved in NFSv3, but at least back to NFSv2 they
>>> are specified at byte boundaries.
>
>> Ok. I had to read through the NFS rfc. Yet are right, the operations are
>> not on blocks, but bytes. However, that helps nothing. What would have
>> helped would have been if they had operated on records...
>
> It is likely that it is often done in multiples of 512, and is
> likely faster that way.
Yes. It usually don't make sense to do it otherwise on a Unix system,
since the OS does the deblocking afterwards anyway, so it's easier to
just treat it the same was as other disk devices.
And this design allows for blocksizes different thatn 512 without any
problems.
> 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.
> Yes, so according to the NFS model, those disk blocks would be passed
> directly between server and client. Note the difference with
> z/OS (descendent from MVS and OS/360) where the record structure
> actually exists on the disk hardware. Among the features of the
> IBM disk controller is a search for a record by key. You can
> specify a record (block) key and the disk hardware will search
> (linearly) through the file until it finds the record (block)
> with that key. It made a lot of sense in S/360 days, but processors
> speeds have increased much faster than disk speeds, and memory
> sizes have also increased.
>
> That is the reason for the extra complication for the z/OS
> NFS server.
You would want to implement the NFS server for RSX in exactly the same
way, or it wouldn't be very useful. Atleast that is my opninion. Except
that the server itself would need to do the deblocking, it's not done by
the hardware.
But the NFS server would have to go through the normal F11ACP in RSX.
meaning that you cannot access anything but 512 byte blocks. So the byte
offsets and sizes that might show up in NFS requests cannot be mapped
directly to disk operations anyway. So you would need to run through
disk blocks. And if the file accessed over NFS is a variable record file
with implicit CRLF, I believe the NFS server should present the file as
a stream of the contents, with CRLF appended after each record, the
record lengths and paddings be removed, and there you are. Full
transformation required.
>> 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.
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.
It's definitely an alternative solution. Worth considering... But for
me, NFS looses a lot of its point if I am sortof incompatible with the
rest of the NFS-aware world. I think it might even be difficult having
two RSX systems talk NFS to each other with that solution (not that I
see how any other solution would work either...).
>> And the exact offset from which to read is also unknown,
>> except for offset 0.
>
> What some IBM C systems do is, instead of supplying the byte
> offset as the return from ftell(), they return
> (record number)*32768+(offset into record). (The usual files
> structures don't allow records larger than 32767 bytes.)
Yes. And that was what I described the C system on RSX is doing. :-)
And, as I pointed out, that still makes no difference, since it's all
information on the local system. You have a second layer of translation
in NFS, in addition to the one provided by the file system, which the C
functions are adopted to.
>>> 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
>> the conversions have been done, in order to then be able to give a
>> correct file size, and end pointer to the user application. That means a
>> lot of work just because you open the file. Meaning very slow, and
>> reading through a lot of file for nothing. On the client side. Which
>> also means a lot of network traffic.
>
> 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.
>>> The opaque model for NFS seems to indicate that your write data
>>> blocks to the server, and read them back. Is this format only
>>> for text files? So programs running on RSX can read disk blocks
>>> directly and process accordingly? That would allow for conversion
>>> programs to be written for either side.
>
>> 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).
To, and from RSX systems in this case will obviously work just fine.
Binary files are sent without this transformation done, and things will
survive fine as well.
You can even send special meta-information about files in ftp. Which
means one RSX could send any type of file to another RSX system with all
file attributes preserved. Some of those files cannot be transferred to
another system at all, without corruption (well, you could probably make
it compatible with VMS, so that they could interoperate correctly in
this aspect, but not very many other systems).
This is a much more attractive problem to solve, since it is way more
useful than NFS in my mind.
FTP and TELNET for RSX are the two most needed programs, in my opinion.
SSH would be nice, but realistically, the CPU is way to slow to handle
the math to make SSH work.
>> In RSX, programs *always* read/write disk blocks. There is nothing else.
>> All else are code that exist inside the user program.
>
> Then again, for ftp you need TCP, where you only need UDP
> to do NFS. (Well, there is tftp...)
Indeed. TFTP I have already done. So I can already transfer files back
and forth to RSX.
I'm working on TCP (on and off). It's a complex protocol, but still not
that difficult to actually do. Heck, for 2.11BSD, it's already there...
>>> Owner and file protection is also well known. (Especially for
>>> DOS which has none of either.) In some cases special servers
>>> exist to do the conversion, but otherwise NFS works with numeric
>>> UID and GID and the usual unix rwx protections. As well as I
>>> remember, the rwx idea came from DEC systems, so might work
>>> with RSX.
>
>> Exist, yes. Map right, no. In RSX, user and group identities are only 8
>> bits. And you have four access bits for each category, not 3 like in
>> Unix. And some of those bits have meanings that don't translate.
>> And user and group are tightly connected in RSX. A user is actually
>> identified by the user and group value as a combination. You can have
>> different users with the same user field value, but different group
>> values. They are different users in RSX, unlike in Unix.
>
> As explained in some of those documents, they don't even all
> translate unix to unix. One unix feature is the ability to
> open a file and then unlink (rm or delete) it. The file stays
> open and usable until it is closed by the last program with
> it open. That doesn't translate well to a stateless NFS server,
> so a unix NFS client actual does a rename instead of unlink
> to a temporary (hidden) file name. Normally, the client will
> remove the file when it is finally closed, but if the client
> crashes before that, the file will be left on the server.
Well, that's not a file attribute, but yes. NFS semantics don't exactly
match Unix semantics at all times. The same problems you see in Unix
here are relevant for RSX as well.
(RSX semantics in how files live more match Unix than NFS.)
> 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.
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.
>> You could say that uids (in RSX) are gid local.
>
> NFS matches files by numeric UID and GID. That assumes
> that the all users have the same UID and GID on all client systems.
> Even more, it assumes that there are UID and GID. I believe
> that the PCNFS clients had special servers to get around that,
> I am not sure what Windows does. (At least NT has user IDs.)
Yes, I was just pointing out that the way Unix and RSX use thses differ.
In Unix you have the UID and GID. Which are two independen numbers.
In RSX you have something called a UIC, which consist of two parts. A
group number and a member number. And they are connected.
>> 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.)
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.
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
next prev parent reply other threads:[~2010-04-18 13:23 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 [this message]
2010-04-18 16:58 ` glen herrmannsfeldt
2010-04-18 23:02 ` Johnny Billquist
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