From: Johnny Billquist <bqt@softjar.se>
Subject: Re: KDA-50 on eBay
Date: Mon, 04 Jul 2011 11:54:34 +0200 [thread overview]
Message-ID: <ius2kq$3m1$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <4e1106f1$0$304$14726298@news.sunsite.dk>
On 2011-07-04 02.19, Jerome H. Fine wrote:
> >Johnny Billquist wrote:
>
>>> I know that under TSX-Plus, programs with MEMMAP level
>>> of security have access to the IOPAGE registers, so even though
>>> it is equally certain that the PSW is set at 17xxxx, as long as PAR7
>>> is able to access the IOPAGE registers directly, that program has
>>> complete control of all of the hardware. However, based on your
>>> answer, it seems likely that RSX-11 never allows direct access to
>>> the IOPAGE registers. Is my assumption correct?
>>
>> Correct. You can, as a system administrator, create a common region
>> which happens to be the I7O page, and then user programs could map
>> that in, with the normal system calls, into their address space. But
>> the sysadm who do this, is asking for his system to crash.
>
> I completely understand your refusal to ever allow a user program
> under a mapped RSX-11 to have even read access to the IOPAGE
> registers, let alone write access. I was just wondering it there was
> any way that it might be possible.
Of course there is. You can write a privileged program. That has access
to everything in the kernel. Of course, a normal user cannot run such a
program. But I suspect that is what you are asking for.
> You have confirmed that read / write access is possible via the MTPx
> and MFPx instructions, respectively. What would be "nice" is if those
> instructions could be handled on an exception basis and restricted to
> users who have the authorization - along with some method to retain
> 14xxxx in the PSW. This might be a feature for RSX-11 in the future
> when running under an emulator is a standard feature of an ALL Qbus
> hardware implementation (i.e. the Qbus CPU board actually runs under
> emulator code for a CPU with a different instruction set which implements
> the PDP-11 architecture).
>
> Such a possibility would substantially enhance the capability of RSX-11
> with there being a requirement to modify RSX-11 in a manner which
> needed only very minor changes.
*No*
I don't know how many times I have to say no before you understand,
Jerome. This is a bad idea in so many ways. There already exists a right
way to do this: write a device driver to handle it. Why do you insist on
trying to break the OS?
The moment you allow the PSW to be something else than 17xxxx for a user
program, you might as well give him access to everything, because he
already have it anyway. And it you want to give access to everything,
there is already a way of doing that: give the program privileges. But
then again, that is not something you want to allow normal users to
have, because they can go around protections, security, and crash the
OS, and do all kind of other bad stuff as well, when they have this right.
All of which are things all other users probably would be very upset about.
>> Also, I hope you are aware that any RTI or RTT is going to reset the
>> PSW to 17xxxx as well.
>
> Obviously that would be one of the minor (???) changes that
> would be required, i.e. retaining 14xxxx in the PSW when
> the user program is again placed into execution.
Feel free to propose that. But such a machine would no longer be a
PDP-11, but an incompatible clone on which you would not want to run
RSX, RSTS/E or Unix.
>>> The reason that I am suggesting that there might be a valid
>>> reason for the PSW to be 14xxxx is specifically under E11
>>> when the user is provided access to the actual PC memory
>>> via the EMEM.DLL program. I have used it under RT-11
>>> to support using up to 1.2 GB of the PC's memory rather
>>> than using emulated PDP-11 memory via the VIRTUAL
>>> statement in FORTRAN.
>>
>> What I would do is to create a device driver to control access to such
>> a thing.
>
> I remember now that you suggested this alternative before.
> However, the reason to take advantage of using the MTPx
> and MFPx instructions to access the IOPAGE registers is
> to reduce the access time to very little more than it takes
> to access a word in user space. A device driver will take
> at least an order of magnitude longer, perhaps two orders
> of magnitude.
Sure. But that is the price of running a proper OS.
You could argue the same thing for any device access. Writing to the
console could be extremely more efficient as well, by writing to the I/O
registers instead of going through the console, but it is also not done.
Apart from the efficiency point, there is also another issue here, which
you seem to ignore (probably because the issue don't exist in RT-11),
and that is the question of what happens when you have simultaneous
access by several independent programs. You basically cannot have access
to hardware in an uncontrolled way like this in a multi-user system,
because it will not work.
> Of course, since this "new" PDP-11 feature requires an emulator
> in the first place, there is really no reason why completely
> different (currently unused op codes) can not be used. In that
> case, it might be extremely easy to add a feature to RSX-11
> which handles all of the authorization to use the "new" instructions
> to access the GB of memory available via this "new" feature.
> One aspect of the "new" instructions would be that they always
> use KERNAL mode for the PREVIOUS MODE rather than
> what the PSW is actually set for. You understand RSX-11
> quite well. Would some sort of password authorization
> sent by RSX-11 from KERNAL mode be difficult to arrange?
> If the authorization had to be renewed after every million
> accesses or every hour, which ever occurred first, that might
> also help. Just thinking of some ridiculous possibilities.
Yes, they are ridicoulus. How would an OS know how often, or how many
times, a program did an MTPx or MFPx instruction? Also, what would the
point be in having the OS authorize this access? The OS have access to
all hardware resources already. It is the user program that would need
authorization. The emulator have no idea which user program is running.
In short - this is a stupid and unusable proposition. If you want to add
a new device, you add a new device driver. Period. There is no need to
try and change the universe to match your ideas.
>>> In that regard, does RSX-11 FORTRAN support the
>>> VIRTUAL statement and is the implementation via an
>>> EMT request or the modification of the PAR registers
>>> as is done under RT-11?
>>
>> As I've said any number of times now, no program under RSX can modify
>> the PAR/PDR registers themself. It is all under control of the kernel.
>> Even if you had access to the I/O page under RSX (which you don't),
>> any modifications you would do to the PAR/PDR registers will disappear
>> again within moments, as RSX loads the values into these registers
>> from it's own concept of your memory mappings at every context switch.
>> So, it does not even preserve what you might have written there
>> yourself, if you were to try that.
>>
>> So yes, assuming you had a virtual statement in FORTRAN, which mapped
>> to memory, it would have do to that mapping through system calls. Now,
>> I don't remember totally for sure, but I seem to remember that VIRTUAL
>> under FORTRAN (alteast under RSX) only could map to a file, and not
>> memory, so that would make this whole question purely theoretical as
>> well, but I can check if it can do virtual arrays in memory later.
>
> Under RT-11, FORTRAN use of VIRTUAL arrays uses the
> PAR/PDR registers as the default to access extended memory.
> DECUS code is available as an alternative to use files which
> are read / write to access the same data, but they are much
> slower when the references are completely random since so
> much disk I/O must be done. In addition, what is the maximum
> size of a file under RSX-11? With the "new" feature, the size
> of the VIRTUAL arrays is GB and the access time is about the
> same as normal user memory.
The maximum size of a file in RSX is more or less unlimited. But yes
virtual arrays are slow.
Also, virtual arrays are limited by the fact that indexes are 16 bits,
so you can never get anywhere near the file size limits.
And you are still trying to design a system which works if there is ever
only one user of the feature. Such a solution is useless on multiuser
systems.
> Just in case you protest that there is no such Qbus board that
> can perform as I suggested, such an implementation has been
> available for a few years. I understand it runs about 100 times
> as fast as a PDP-11/93. It is expensive, probably something
> that only a commercial user can consider or a VERY rich
> hobby user.
I don't see any problems with having a device which gives access to
plenty of memory. It's no different than any other device on the bus
that gives access to plenty of memory, such as a disk.
Johnny
next prev parent reply other threads:[~2011-07-04 9:54 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-19 20:48 KDA-50 on eBay Bill Gunshannon
2011-06-20 18:48 ` Fritz Wuehler
2011-06-28 12:12 ` Bill Gunshannon
2011-06-28 17:28 ` glen herrmannsfeldt
2011-06-29 15:29 ` Rob Brown
2011-06-28 21:01 ` Dave Wade
2011-06-29 13:10 ` Bill Gunshannon
2011-06-28 21:56 ` Nomen Nescio
2011-06-28 22:27 ` Scott Dorsey
2011-06-29 13:30 ` Bill Gunshannon
2011-06-29 13:49 ` Scott Dorsey
2011-06-29 14:45 ` Bill Gunshannon
2011-06-29 13:23 ` Bill Gunshannon
2011-06-29 1:35 ` Jerome H. Fine
2011-06-29 1:58 ` Johnny Billquist
2011-07-01 0:32 ` Jerome H. Fine
2011-07-01 5:57 ` Johnny Billquist
2011-07-02 1:18 ` Jerome H. Fine
2011-07-01 23:49 ` Johnny Billquist
2011-07-01 23:56 ` glen herrmannsfeldt
2011-07-02 0:01 ` Johnny Billquist
2011-07-03 11:47 ` Jerome H. Fine
2011-07-03 16:23 ` Johnny Billquist
2011-07-03 16:28 ` Scott Dorsey
2011-07-03 16:35 ` Johnny Billquist
2011-07-03 18:19 ` Jerome H. Fine
2011-07-03 19:40 ` Johnny Billquist
2011-07-04 0:19 ` Jerome H. Fine
2011-07-04 9:54 ` Johnny Billquist [this message]
2011-07-04 12:03 ` Jerome H. Fine
2011-07-04 13:44 ` Johnny Billquist
2011-07-04 18:21 ` ChrisQ
2011-07-04 22:20 ` Johnny Billquist
2011-07-08 22:04 ` ChrisQ
2011-07-08 23:21 ` Johnny Billquist
2011-07-10 10:49 ` Jerome H. Fine
2011-07-04 20:37 ` Jerome H. Fine
2011-07-04 22:06 ` Johnny Billquist
2011-07-02 2:10 ` Jerome H. Fine
2011-07-05 13:20 ` Bob Koehler
2011-07-05 13:34 ` Johnny Billquist
2011-07-05 14:12 ` paramucho
2011-07-05 17:33 ` Bob Koehler
2011-07-05 23:13 ` Johnny Billquist
2011-07-06 16:09 ` Rob Brown
2011-07-06 17:01 ` Johnny Billquist
2011-07-06 17:52 ` Johnny Billquist
2011-07-06 18:13 ` Rob Brown
2011-07-07 3:03 ` paramucho
2011-07-07 3:19 ` paramucho
2011-07-07 5:11 ` paramucho
2011-07-07 22:27 ` Johnny Billquist
2011-07-08 9:57 ` Hans Vlems
2011-07-08 12:16 ` Jerome H. Fine
2011-07-08 19:40 ` Jerome H. Fine
2011-07-06 13:56 ` Bob Koehler
2011-07-06 16:41 ` Johnny Billquist
2011-07-06 11:38 ` John Wallace
2011-07-06 13:59 ` Bob Koehler
2011-07-01 23:54 ` glen herrmannsfeldt
2011-06-29 2:07 ` Johnny Billquist
2011-06-29 13:40 ` Bill Gunshannon
2011-06-29 21:11 ` Johnny Billquist
2011-06-30 13:19 ` Bill Gunshannon
2011-07-01 0:21 ` Jerome H. Fine
2011-07-01 18:56 ` jjh
2011-07-01 6:45 ` Hans Vlems
2011-06-30 17:58 ` Rob Doyle
2011-07-01 17:55 ` Tom Lake
2011-07-01 23:04 ` glen herrmannsfeldt
2011-07-02 13:34 ` Thomas Laus
2011-07-02 14:30 ` Bill Gunshannon
2011-07-02 14:56 ` Tom Lake
2011-07-02 21:44 ` Nomen Nescio
2011-07-03 15:45 ` David Riley
2011-07-07 7:29 ` glen herrmannsfeldt
2011-07-12 13:01 ` Free Stuff Was: " Bill Gunshannon
2011-07-12 18:08 ` Bill Gunshannon
2011-07-12 21:11 ` Jerome H. Fine
2011-07-12 21:53 ` Nomen Nescio
-- strict thread matches above, loose matches on Subject: below --
2011-06-29 13:52 Dale R Worley
2011-06-29 15:06 ` Bill Gunshannon
2011-06-29 15:09 ` Scott Dorsey
2011-06-29 15:22 ` Bill Gunshannon
2011-06-30 15:36 Dale R Worley
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