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-Attributes: gide311f70d09,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.71.MISMATCH!xlned.com!feeder3.xlned.com!newsfeed1.swip.net!uio.no!news.ctrl-c.liu.se!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail Newsgroups: alt.sys.pdp11,comp.sys.dec,comp.os.vms Subject: Re: QBUS Prototyping Message-ID: From: Johnny Billquist Date: Mon, 19 Apr 2010 22:22:22 +0200 References: <8265dgFs33U3@mid.individual.net> <82e4csF6ndU2@mid.individual.net> Organization: Update Computer Club NNTP-Posting-Host: 178-83-32-41.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: Iltempo.Update.UU.SE 1271708543 12559 178.83.32.41 (19 Apr 2010 20:22:23 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Mon, 19 Apr 2010 20:22:23 +0000 (UTC) User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: Xref: g2news1.google.com alt.sys.pdp11:1417 comp.sys.dec:1759 comp.os.vms:27864 glen herrmannsfeldt wrote: > 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. Slight error on my part. The mode where you don't move the data is called locate mode in RSX, but the mode where the data is copied a second time is called move mode, not transfer 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. :-) You can actually do it with records crossing block boundaries as well, with RSX. It's just that those records that do cross blocks will be copied anyway. But for those that don't cross block boundaries, no copying takes place. The program can't tell which happened, without being more clever than it needs to. > (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. I don't know, but probably difficult. >>>> 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. That's still pretty common. But you don't need physical access. Normally, around where I've been, the machine exporting files over NFS have been machines that you also could log in to. Also, assuming another Unix box mount the same file system, the whole innards will be exposed to that client as well, and possible to manipulate by users there. > 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. He. I have (had) a similar story about creating a hard link to a directory. Never tried to do it over NFS, but I did it on a local file system on SunOS. Everything was fine until we removed the directory, at which point things started looking very strange. Had to reboot, and let fsck repair the bloody thing. :-) >> 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. Well, as long as you don't care what the end result is, sure... But assuming you extract a file from a tar archive, how should it be extracted? As a text file? Binary? Record lengths? As you see, it comes down to parts of the same problem as with NFS. It is simpler through, in that you are not expecting other programs to access it on the fly, or randomly, so there are some things you don't care about (such as seeking in the converted result). >> 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. Used it, and it works the way you would expect and want. Files get cipped/unzipped along with the VMS specific attributes. I haven't checked what happens if you extract a ZIP-file created on some other OS though. >>>> 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.) This could be ugly... A program that want to open a file in RSX reads in the directory file itself, and thereby locates the file entry, and the corresponding file id. It then open the file, using that file id. It can also store the file id, and reuse it later to open the same file. Also, there are a few file ids that are reserved, and essential for anything to work, such as file id (4,4,0), which is the MFD (root directory in Unix-speak). This is how a program finds a file. It starts by opening file (4,4,0), and then traverse down directories from there. (And yes, the MFD do exist in itself, normally under the name 000000.DIR) I would have to fake directory files for RSX, but I need to populate them with filename, *and* file ids. And the file ids must then match back to the filenames. I guess I could keep a translation table for this, but that table could become very large... > 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. Yes, find can take inode numbers as arguments, but I don't think any other program can. And find will (as you note) do a linear search of the whole file system. Oh headaches... 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