From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,32247abf28da27d4 X-Google-NewGroupId: yes X-Google-Thread: 1164f8,32247abf28da27d4 X-Google-NewGroupId: yes X-Google-Thread: f7344,32247abf28da27d4 X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,gid3717dac89a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!novia!usenet.stanford.edu!news.ucr.edu!nntp-server.caltech.edu!not-for-mail From: glen herrmannsfeldt Newsgroups: alt.sys.pdp11,comp.sys.dec,comp.os.vms Subject: Re: QBUS Prototyping Date: Mon, 19 Apr 2010 01:39:40 +0000 (UTC) Organization: California Institute of Technology, Pasadena Message-ID: References: <8265dgFs33U3@mid.individual.net> <82e4csF6ndU2@mid.individual.net> NNTP-Posting-Host: thalia.ugcs.caltech.edu X-Trace: naig.caltech.edu 1271641180 18638 131.215.176.116 (19 Apr 2010 01:39:40 GMT) X-Complaints-To: abuse@caltech.edu NNTP-Posting-Date: Mon, 19 Apr 2010 01:39:40 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.26-2-686 (i686)) Xref: g2news2.google.com alt.sys.pdp11:1456 comp.sys.dec:1916 comp.os.vms:30304 In alt.sys.pdp11 Johnny Billquist wrote: (snip, I wrote) >> 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. I believe OS/360 assembler and PL/I both call it locate mode. I hadn't thought before about the possibility of doing it with fixed sized blocks. It does seem that if you avoid crossing block boundaries that it works. It seemed more obvious with variable sized blocks. > 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. I was wondering not so long ago about an NFS client for CP/M. It seems that CP/M people like to keep the higher level (BDOS) routines and only change the lower level (BIOS), but to do NFS right you need to change BDOS. > 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. (snip, I wrote) >> 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. It seems that what the z/OS one does is let you add options onto the file name that you specify. It seems that won't work for RSX. > 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. (snip) >>> 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. Well, it seems usual that the administrator has enough control over the machine to make sure that bad things don't happen. When I first knew NFS, the NFS server was kept locked in an air conditioned room, while all the clients were out in ordinary rooms. It wasn't a big place, and everyone knew everyone else, so it was mostly for the machine to stay cool. One that I still remember from those days is that I needed to have two names for a directory, and didn't know about symbolic links. (Previous unix systems I had used didn't have them.) According to the man page, only superusers can create hard links to directories, but I knew (was allowed to know) the root password. As soon as I created the hard link to a directory the file server died. (This is also before I knew much of the details about NFS.) So the file server restarted and as soon as it was running again and NFS was running it crashed again. It seems that the NFS server dies when it detects a hard link (that is, more than one) to a directory. As soon as NFS restarted, the client recreated the link. (It might be that we had to do something special to get the server to restart while deleting the link.) I think that was when I first understood the idea of NFS clients surviving a server reboot. >>>>>> 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. (snip on ftp) > You are stuck in the sense that you don't have tar for RSX, true. > But that is another kind of problem. Well, it is just C, so should not be hard to do. > 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. I know about VMS zip, but have never used it. (snip) >> 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? I don't think so. But maybe they don't get the same specialness that they do on RSX. > Actually, the remapping of UID 0 to -2 is done on the server side, and > not the client side, by the way... Yes. I guess I didn't say that. (snip) >>>> 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. It seems that all NFS operations use a file handle which is opaque to the client. I believe that unix (and similar) systems use the inode number as part of the file handle. (Other parts need to identify the specific file system it applies to.) Unix doesn't make it easy to find a file from the inode number. I do remember once doing find -i to find a file, which requires a search of the whole file system. -- glen