>Johnny Billquist wrote:
>On
2012-02-20 06.53, paramucho wrote:
>On Sat, 18 Feb 2012 21:58:28 +0100,
Johnny Billquist<bqt@softjar.se> wrote:
>On 2012-02-18 12:55, paramucho wrote:
On Fri, 17 Feb 2012 18:13:44 +0100,
Johnny Billquist<bqt@softjar.se> wrote:
EMT 374, subcode 3 is .PURGE. Channels 8. down to 0 are purged. .PURGE
checks the conditions I listed.
I didn't check now (sitting at the wrong machine), but does PURGE not
go through the USR lock?
The .Purge EMT requires only instructions and memory
(no disk I/O is ever required) when no "special directory"
aspects are associated with the device driver. For file
structured disks, the only essential requirement is that the
first word of the 5 word CSWs is set to zero. Otherwise,
the USR is entered and it would be probably be
necessary to initially lock the USR.
I could extend the functionality to
handle access control fairly
easily. It would just be a matter of having a queue for open
operations with potential sharing conflicts.
Right. But then you need to figure out if an open request is for a file
that is already open or not, and then do two different paths, depending
on that. And the paths are pretty much the same, except without the
shared access checks on one of them. And if you have lots of open
files,
then the checking can become a noticeable part of the operation. But
yes, there are possibly some optimization that could be done here. I
have not looked deep enough at it to tell for sure if they would be
enough to be worth the code.
At some point in the OPEN process you'd have to "register" an open
with the fully qualified, normalized file name/id and the access mode.
Yes. And then what? Need tp back out in case the open should be denied?
RT-11 is rather fast and loose, which I realized from Jerome's
comments. You can actually open files without involving USR at all,
since opening a file is really just a lookup of the file and noticing
which block it starts at.
RT-11 has absolutely no concept of sharing files. It is
quite possible to open the same file more than once
in the same program on different channels. Naturally,
no reasonable program would do so, but there is nothing
in RT-11 to stop this from taking place.
Obviously, if more than one program opens the same file,
both can also be performing disk I/O on the file. RT-11
controls disk I/O via five CSWs per file. If the program
knows the starting block number of a file on the disk, there
is nothing stopping the program from requesting access to
the total disk drive and performing disk I/O on absolute
blocks on the disk.
I must be getting old...I'm starting to
forget RT-11...
I occasionally get the same feeling about RSX when talking with you. I
really need to go and check stuff that I normally don't even think
about. :-)
I have to use RT-11 constantly to be able to remember.
At 73 years old, the senior moments seem to arrive
more frequently. So don't take what I say as guaranteed.
Usually, I check the code first, but sometimes I forget to
check the code to make sure.
Jerome Fine