On 2018-04-25 23:14, Paul Winalski <paul.winalski(a)gmail.com> wrote:
> On 4/25/18, Ronald Natalie
> <ron(a)ronnatalie.com> wrote:
>> The fun argument is what is Virtual Memory. Typically, people align that
>> with paging but you can stretch the definition to cover paging.
>> This was a point of contention in the early VAX Unix days as the ATT (System
>> III, even V?) didn’t support paging on the VAX where as BSD did.
> In my book, virtual memory is any addressing scheme where the
> addresses that the program uses are different from the physical memory
> addresses. Nowadays most OSes use a scheme where each process has its
> own virtual address space, and virtual memory is demand-paged from
> backing store on disk. But there have been other schemes.
Yeah...
> Some PDP-11 models had a virtual addressing feature called PLAS
> (Program Logical Address Space). The PDP-11 had 16-bit addressing,
> allowing for at most 64K per process. To take advantage of physical
> memory larger than 64K, PLAS allowed multiple 64K virtual address
> spaces to be mapped to the larger physical memory. Sort of the
> reverse of the usual virtual addressing scheme, where there is more
> virtual memory than physical memory.
Note that PLAS is not a PDP-11 hardware thing. PLAS was the name for the
mechanism provided by the OS for applications to be able to access more
than 64K of memory while still be limited by the virtual address space
limit of 64K.
PLAS is in one way very similar to mmap, except that it's not backed by
a file. But you create a memory region though the OS (giving it a name
and a size, which can be more than 64K), and then you can map to it,
specifying the offset into it and window size, as well as where to map
to in your virtual address space.
This is realized by just using the pages of the MMU of the PDP-11 map to
different parts and things.
Any OS that had the PLAS capability by necessity had to have an MMU,
which was the hardware part that allowed this to be implemented.
So, all PDP-11s with an MMU could allow the OS running on it to provide
the PLAS capabilities.
A PDP-11 in general is "reversed" in that the physical address space is
much larger than the virtual one. Although, the same was also true on
the VAX in the last iteration where the NVAX implementation allowed for
a 34 bit physical address, while the virtual address space was still
only 32 bits.
But that doesn't make the virtual memory any less virtual.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
> From: Johnny Billquist
> I don't know exactly why DEC left the last three tracks unused. Might
> have been for diagnostic tools to have a scratch area to play with.
> Might have been that those tracks were found to be less reliable. Or
> maybe something completely different. But it was not for bad block
> replacement, as DEC didn't even do that on RK05
The "pdp11 peripherals handbook" (1975 edition at least, I can't be bothered
to check them all) says, for the RK11:
"Tracks/surface: 200+3 spare"
and for the RP11:
"Tracks/surface: 400 (plus 6 spares)"
which sounds like it could be for bad block replacement, but the RP11-C
Maintenance Manual says (pg. 3-10) "the inner-most cylinders 400-405 are only
used for maintenance".
Unix blithely ignored all that, and used every block available on both the
RK11 and RP11.
Noel
On 2018-04-25 16:39, arnold(a)skeeve.com wrote:
> Tim Bradshaw<tfb(a)tfeb.org> wrote:
>
>> Do systems with huge pages page in the move-them-to-disk sense I wonder?
>> I assume they don't in practice because it would be insane but I wonder
>> if the VM system is in theory even willing to try.
> Why not? If there's enough backing store availble?
>
> Note that many systems demand page-in the code section straight out of the
> executable, so if some of those pages aren't needed, they can just
> be released. And said pages can be shared among all processes running
> the same executable, for further savings.
Right.
>> Something I never completely understood in the paging vs swapping
>> thing was that I think that systems which could page (well, 4.xBSD in
>> particular) would*also* swap if pushed. I think the reason for that was
>> that, if you were really short of memory, swapping freed up the process
>> structure and also the page tables &c for the process, which would still
>> be needed even if all its pages had been evicted. Is that right?
> It depends upon the system. Some had pageable page tables, which is
> pretty hairy. Others didn't. I don't remember what 4BSD did on the
> Vax, but I suspect that the page tables and enough info to find everything
> on swap stayed in kernel memory. (Where's Chris Torek when you need
> him?:-)
The pages tables describing the users memory space are themselves
located in virtual memory on the VAX, so they can be paged out without
problem. If you refer to an entry in the user page table, and that page
itself is paged out, you'll get a page fault for the system page table,
so you'll need to page in that page of the system.
But I seem to remember 4BSD (as well as NetBSD) keep all of the kernel
in physical memory all the time, and don't page the kernel parts,
including process page tables.
> But yes, swapping was generally used to free up large amounts of memory
> if under heavy load.
Paging would free up the same amount of memory, if we talk about the
memory used by the process itself. However, there are various meta data
in the kernel itself that is needed for a process, which will remain in
memory even if no pages are in memory. Swapping will also move
non-essential kernel structures out to disk for the process, in addition
to the pages. Thus, there is a difference between swapping and paging.
The whole process context for example. Which includes both the page
tables as well as the kernel mode stack for the process, processor
registers, and possibly also open file contexts, and probably some other
things I'm forgetting now.
Very little needs to be kept in memory for a process if you are not
interested in resuming it on short notice.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
I came across this yesterday:
> Fun fact: according to unsubstantiated UNIX lore, "rm" is NOT short-hand
> for "remove" but rather, it stands for the initials of the developer that wrote
> the original implementation, Robert Morris.
>
> https://news.ycombinator.com/item?id=16916565
I was curious if there's any truth to it. I found
http://minnie.tuhs.org/cgi-bin/utree.pl and was poking around but
couldn't determine when the rm command came about.
Thoughts?
--
Eric Blood
winkywooster(a)gmail.com
On 2018-04-25 16:39, Ronald Natalie<ron(a)ronnatalie.com> wrote:
>
>> On Apr 24, 2018, at 9:27 PM, Dan Stromberg<drsalists(a)gmail.com> wrote:
>>
>> On Sun, Apr 22, 2018 at 2:51 PM, Dave Horsfall<dave(a)horsfall.org> wrote:
>>> Now, how many youngsters know the difference between paging and swapping?
>> I'm a mere 52, but I believe paging is preferred over swapping.
>>
>> Swapping is an entire process at a time.
>>
>> Paging is just a page of memory at a time - like 4K or something thereabout.
> Early pages were 1K.
What machines are we talking about then?
PDP-11 have 8K pages. VAX have 512 byte pages, if we talk about hardware.
(And yes, I know pages on PDP-11s are not fixed in size, but if you want
the page to go right up to the next page, it's 8K.)
> The fun argument is what is Virtual Memory. Typically, people align that with paging but you can stretch the definition to cover paging.
> This was a point of contention in the early VAX Unix days as the ATT (System III, even V?) didn’t support paging on the VAX where as BSD did.
> Our comment was that “It ain’t VIRTUAL memory if it isn’t all there” as opposed to virtual addressing.
Weird comment. What does that mean? On a PDP-11, all your virtual memory
was always there when the process was on the CPU, but it might not be
there at other times. Just as not all processes memory would be in
physical memory all the time, since that often would require more
physical memory than you had.
But you normally did not have demand paging, since that was not really
gaining you much on a PDP-11. On the other hand, overlays do the same
thing for you, but in userspace.
So you would claim that ATT Unix did not have virtual memory because it
didn't do demand paging?
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Fake news knocks on the doors of Unixland: there's absolutely
no truth to the claim that the rm command was written by
Robert Morris. Rm was there from the beginning, when only
two people wrote Unix code--Thompson and Ritchie. In fact,
it would have been on PDP8 Unix, which Morris never used.
Doug
On 4/22/18, Clem cole <clemc(a)ccc.com> wrote:
>
> BTW if you want to be correct about dates - the DEC released the Vax in 76
> not 78 ( I personally used to program Vax serial #1 at CMU under VMS 1.0
> before I was at UCB which is what Dan had asked).
As I remember it, DEC announced the VAX in 1976 or 1977, and first
official customer ship didn't happen until 1978. Holy Cross had one
of the hardware beta machines in 1977. It ran a beta version of VMS
(version X0.5 initially). I ported a bunch of programs to the VAX,
including the PDP-10 version of Adventure.
-Paul W.
On 2018-04-24 01:30, Grant Taylor <gtaylor(a)tnetconsulting.net> wrote:
> On 04/23/2018 04:15 PM, Warner Losh wrote:
>> It's weird. These days lower LBAs perform better on spinning drives.
>> We're seeing about 1.5x better performance on the first 30% of a drive
>> than on the last 30%, at least for read speeds for video streaming....
> I think manufacturers have switched things around on us. I'm used to
> higher LBA numbers being on the outside of the disk. But I've seen
> anecdotal indicators that the opposite is now true.
That must have been somewhere in the middle of history in that case. Old
(proper) drives had/have track 0 at the outer edge. The disk loaded the
heads after spin up, and that was at the outer edge, and then you just
locked on to track 0, which should be near.
Heads had to be retracted for the disk pack to be replaced.
But this whole optimization for swap based on transfer speeds makes no
sense to me. The dominating factor in spinning rust is seek times, and
not transfer speed. If you place the swap at one end of the disk, it
won't matter much that transfers will be faster, as seek times will on
average be much longer, and that will eat up any transfer gain ten times
over before even thinking. (Unless all your disk ever does is swapping,
at which time the heads can stay around the swapping area all the time.)
Which is also why the file system for RSX (ODS-1) placed the index file
(equivalent of the inode table) at the middle of the disk by default.
Not sure if Unix did that optimization, but I would hope so. (Never dug
into that part of the code.)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Computer pioneer Niklaus Wirth was born on this day in 1934; he basically
designed ALGOL, one of the most influential languages ever, with just
about every programming language in use today tracing its roots to it.
His name is pronounced "vurt" but he would accept "worth", and he joked
that you could call him by name or by value (you need to know ALGOL to
understand).
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
>Date: Mon, 23 Apr 2018 13:51:07 -0400
>From: Clem Cole <clemc(a)ccc.com>
>To: Ron Natalie <ron(a)ronnatalie.com>
>Cc: Tim Bradshaw <tfb(a)tfeb.org>, TUHS main list <tuhs(a)minnie.tuhs.org>
>Subject: Re: [TUHS] /dev/drum
>Message-ID:
> <CAC20D2PEzAayjfaQN+->kQS=H7npcEZ_OKXL1ffPxak5b2ENv4Q(a)mail.gmail.com>
>Content-Type: text/plain; charset="utf-8"
... some stuff removed ...
>Exactly... For instance an RK04 was less that 5K blocks (4620 or some
>such - I've forgotten the actually amount). The disk was mkfs'ed to the
>first 4K and the left over was give to the swap system. By the time of
>4.X, the RP06 was 'partitioned' into 'rings' (some overlapping). The 'a'.
>partition was root, the 'b' was swap and one fo the others was the rest.
>Later the 'c' was a short form for copying the entire disk.
Wondered why, but I guess now I know that's the reason Digital UNIX on
alpha used the same disk layout. From a AlphaServer DS10 running
DU4.0g, output "disklabel -r rz16a"
# /dev/rrz16a:
type: SCSI
disk: BB009222
label:
flags:
bytes/sector: 512
sectors/track: 168
tracks/cylinder: 20
sectors/cylinder: 3360
cylinders: 5273
sectors/unit: 17773524
rpm: 7200
interleave: 1
trackskew: 66
cylinderskew: 83
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg] #
NOTE: values not exact
a: 524288 0 AdvFS # (Cyl. 0 - 156*)
b: 1572864 524288 swap # (Cyl. 156*- 624*)
c: 17773524 0 unused 0 0 # (Cyl. 0 - 5289*)
d: 0 0 unused 0 0 # (Cyl. 0 - -1)
e: 0 0 unused 0 0 # (Cyl. 0 - -1)
f: 0 0 unused 0 0 # (Cyl. 0 - -1)
g: 4194304 2097152 AdvFS # (Cyl. 624*- 1872*)
h: 11482068 6291456 AdvFS # (Cyl. 1872*- 5289*)