* [TUHS] 2.9BSD on an actual rl02 - swap confusion
@ 2015-02-08 20:42 Noel Chiappa
2015-02-08 20:52 ` Jacob Ritorto
2015-02-08 22:03 ` Clem Cole
0 siblings, 2 replies; 7+ messages in thread
From: Noel Chiappa @ 2015-02-08 20:42 UTC (permalink / raw)
> From: Jacob Ritorto
> I'm having trouble understanding how to get my swap configured. Since
> rl02s are so little, the MAKE file in /dev doesn't partition them into
> a, b, c, etc. However, when MAKE makes the /dev/rl0 device, it uses
> only 8500 of its 10000 blocks, so what would presumably be intended as
> swap space does exist. Swap is usually linked to the b partition,
> right? So how do I create this b partition on an rl02?
I don't know how the later systems work, but in V6, the swap device, and the
start block / # of blocks are specified in the c.c configuration file (i.e.
they are compiled into the system). So you can take one partition, and by
specifying less than the full size to 'mkfs', you can use the end of the
partition for swap space (which is presumably what's happening with /dev/rl0
here).
Noel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
2015-02-08 20:42 [TUHS] 2.9BSD on an actual rl02 - swap confusion Noel Chiappa
@ 2015-02-08 20:52 ` Jacob Ritorto
2015-02-08 22:03 ` Clem Cole
1 sibling, 0 replies; 7+ messages in thread
From: Jacob Ritorto @ 2015-02-08 20:52 UTC (permalink / raw)
Hey, thanks Guys! Ok, good that the kernel already knows about it.
The actual problem I'm having is that ps doesn't work.
I assume it tries to look at /dev/swap as its pointer, but since there's
no /dev/rl0a, dev/swap has nothing reasonable to point to, so ps fails with
/dev/swap: no such device (iirc).
Was thinking of experimentally linking /dev/swap to rl0 but logic
dictates that would trash the root filesystem (which is nbd since I can
easily restore the 2.9 rl02 root from the archives with Warren's vtserver!)
Gonna go read some source. Thanks!
jake
On Sun, Feb 8, 2015 at 3:42 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu>
wrote:
> > From: Jacob Ritorto
>
> > I'm having trouble understanding how to get my swap configured. Since
> > rl02s are so little, the MAKE file in /dev doesn't partition them
> into
> > a, b, c, etc. However, when MAKE makes the /dev/rl0 device, it uses
> > only 8500 of its 10000 blocks, so what would presumably be intended
> as
> > swap space does exist. Swap is usually linked to the b partition,
> > right? So how do I create this b partition on an rl02?
>
> I don't know how the later systems work, but in V6, the swap device, and
> the
> start block / # of blocks are specified in the c.c configuration file (i.e.
> they are compiled into the system). So you can take one partition, and by
> specifying less than the full size to 'mkfs', you can use the end of the
> partition for swap space (which is presumably what's happening with
> /dev/rl0
> here).
>
> Noel
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150208/542acca4/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
2015-02-08 20:42 [TUHS] 2.9BSD on an actual rl02 - swap confusion Noel Chiappa
2015-02-08 20:52 ` Jacob Ritorto
@ 2015-02-08 22:03 ` Clem Cole
2015-02-08 22:09 ` Ronald Natalie
1 sibling, 1 reply; 7+ messages in thread
From: Clem Cole @ 2015-02-08 22:03 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]
On Sun, Feb 8, 2015 at 3:42 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu>
wrote:
> I don't know how the later systems work, but in V6, the swap device, and
> the
> start block / # of blocks are specified in the c.c configuration file (i.e.
> they are compiled into the system). So you can take one partition, and by
> specifying less than the full size to 'mkfs', you can use the end of the
> partition for swap space (which is presumably what's happening with
> /dev/rl0
> here).
>
Ah Noel - Thanks for the refresher course. That's right. I now remember
it. I knew it was compiled into the kernel but I had forgotten the details.
It was not until much later that the swap image became less screwed
down/more reflexible. You first needed to get to larger disks (rp05/rp06)
which had to be partitioned because they overflowed a 16 bit integer.
Once people started to partition them, then all sort of new things occurred
and I that's when the idea of a dedicated swap partition came up. I've
forgotten if that was a BSDism or UNIX/TS. Certainly by the time of Sam's
4.1A?? configuration tool that created conf.c and low.s it had already been
in for a while.
As I recall in V6 and I think V7, the process was first placed in the swap
image before the exec (or at least space reserved for it). So you had to
have a swap space to boot because to fork the "init" it needed to assigned
to the swap space (chick/egg issue). When demand support was added to the
kernel, the process did not have to have that requirement, so it meant swap
set up could be a post initial program load operation for the start
sequence.
Clem
Clem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150208/72b8c8bf/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
2015-02-08 22:03 ` Clem Cole
@ 2015-02-08 22:09 ` Ronald Natalie
0 siblings, 0 replies; 7+ messages in thread
From: Ronald Natalie @ 2015-02-08 22:09 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
Yep, certain of the smaller drives like RK05’s had no way of “partitioning them.” So you needed the swapstart to put it at the end of the volume.
Even before we got large drives, we put our swap on it’s own fixed head disk (RS-11). Actually, in retrospect it probably would have been better to put temp there rather than swap, but it seemed to be a good idea at the time. Later we got the bulk core boxes that emulated the fixed head disks and did put temp there.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
2015-02-08 22:42 Noel Chiappa
@ 2015-02-08 23:45 ` Clem Cole
0 siblings, 0 replies; 7+ messages in thread
From: Clem Cole @ 2015-02-08 23:45 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
On Sun, Feb 8, 2015 at 5:42 PM, Noel Chiappa <jnc at mercury.lcs.mit.edu>
wrote:
> But this is kind of confusing, because when I was bringing up V6 under the
> Ersatz11 simulator, I had a problem where the swapper (process 0) was
> trying
> to fork (with the child becoming 1 and running /etc/init), and it did the
> 'swap out' thing. But there was a ton of free memory at that point, so...
> why
> was it doing a swap? Eh, something to investigate sometime...
>
I'm relying on very old memory here ... but my memory is that before
either fork or exec or maybe both (I forget all of this and don't have the
code on my laptop to check) the kernel did something in the swap area/maps.
It may have been just preallocate the data area for the process. But if
there was not enough space/got an error of some type, the system call
failed.
What this meant was the even if you has free ram, you had to have a working
swap device very early in the start up. I wish I could remember those
details - hard to believe I spent so many hours (of fun) hacking on the
kernel of those systems ;-)
Clem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150208/d0aa6d3a/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
@ 2015-02-08 22:42 Noel Chiappa
2015-02-08 23:45 ` Clem Cole
0 siblings, 1 reply; 7+ messages in thread
From: Noel Chiappa @ 2015-02-08 22:42 UTC (permalink / raw)
> From: Clem Cole <clemc at ccc.com>
> Once people started to partition them, then all sort of new things
> occurred and I that's when the idea of a dedicated swap partition came
> up. I've forgotten if that was a BSDism or UNIX/TS.
Well, vanilla V6 had i) partitioned drives (that was the only way to support
an RP03), and ii) the swap device in the c.c config file. That's all you need
to put swap in its own partition. (One of the other MIT-LCS groups with V6
did that; we didn't, because it was better to swap off the RK, which did
multi-block transfers in a single I/O operation.)
> As I recall in V6 and I think V7, the process was first placed in the
> swap image before the exec (or at least space reserved for it).
As best I understand it, the way fork worked in V6 was that if there was not
enough memory for an in-core fork (in which case the entire memory of the
process was just copied), the process was 'swapped out', and the swapped out
image assumed the identity of the child.
But this is kind of confusing, because when I was bringing up V6 under the
Ersatz11 simulator, I had a problem where the swapper (process 0) was trying
to fork (with the child becoming 1 and running /etc/init), and it did the
'swap out' thing. But there was a ton of free memory at that point, so... why
was it doing a swap? Eh, something to investigate sometime...
Noel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [TUHS] 2.9BSD on an actual rl02 - swap confusion
@ 2015-02-08 19:28 Jacob Ritorto
0 siblings, 0 replies; 7+ messages in thread
From: Jacob Ritorto @ 2015-02-08 19:28 UTC (permalink / raw)
Hi,
I'm having trouble understanding how to get my swap configured. Since
rl02s are so little, the MAKE file in /dev doesn't partition them into a,
b, c, etc. However, when MAKE makes the /dev/rl0 device, it uses only 8500
of its 10000 blocks, so what would presumably be intended as swap space
does exist. Swap is usually linked to the b partition, right? So how do I
create this b partition on an rl02? Or am I getting this horribly wrong?
thx
jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150208/e62b7e99/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-02-08 23:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 20:42 [TUHS] 2.9BSD on an actual rl02 - swap confusion Noel Chiappa
2015-02-08 20:52 ` Jacob Ritorto
2015-02-08 22:03 ` Clem Cole
2015-02-08 22:09 ` Ronald Natalie
-- strict thread matches above, loose matches on Subject: below --
2015-02-08 22:42 Noel Chiappa
2015-02-08 23:45 ` Clem Cole
2015-02-08 19:28 Jacob Ritorto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).