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*)
> From: "Ron Natalie"
> I'm pretty sure that swapping in V6 took place to a major/minor number
> configured at kernel build time.
Yup, in c.c, along with the block/character device switches (which converted
major device numbers to routines).
> You could create a dev node for the swap device, but it wasn't used for
> the actual swapping.
Yes.
> We actually dedicated a full 1024 block RF11 fixed head to the system in
> the early days
Speaking of fixed-head disks, one of the Bell systems used (IIRC) an RS04
fixed-head disk for the root. DEC apparently only used that disk for swapping
in their OS's... So the DEC diagnsotics felt free to scribble on the disk.
So, Field Circus comes in to work on the machine... Ooops!
Noel
> From: Clem Cole
> To be honest, I really don't remember - but I know we used letters for
> the different partitions on the 11/70 before BSD showed up.
In V6 (and probably before that, too), it was numbers:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man4/rp.4
So on my machine which had 2 x 50MB CalChomps, with a Diva controller, which
we had to split up into two partition each (below), they were dv00, dv01, dv10
and dv11. Letters for the partitions made it easier...
> The reason for the partition originally was (and it must have been 6th
> edition when I first saw it), DEC finally made a disk large enough that
> number of blocks overflowed a 16 bit integer. So splitting the disk
> into smaller partitions allowed the original seek(2) to work without
> overflow.
No, in V6 filesystems, block numbers (in inodes, etc - also the file system
size in the superblock) were only 16 bits, so a 50MB disk (100K blocks) had to
be split up into partitions to use it all. True of the RP03/04 in V6 too (see
the man page above).
Noel