Mon Feb 6 01:27:51 2023
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2015-09-01

LEARN

2023-02-06 | 2023-01-06 | 2022-12-06 | 2022-11-06 | 2022-10-06 | 2022-09-06 | 2022-08-06 | 2022-07-06 | 2022-06-06 | 2022-05-06 | 2022-04-06 | 2022-03-06 | 2022-02-06 | 2022-01-06 | 2021-12-06 | 2021-11-06 | 2021-10-06 | 2021-09-06 | 2021-08-06 | 2021-07-06 | 2021-06-06 | 2021-05-06 | 2021-04-06 | 2021-03-06 | 2021-02-06 | 2021-01-06 | 2020-12-06 | 2020-11-06 | 2020-10-06 | 2020-09-06 | 2020-08-06 | 2020-07-06 | 2020-06-06 | 2020-05-06 | 2020-04-06 | 2020-03-06 | 2020-02-06 | 2020-01-06 | 2019-12-06 | 2019-11-06 | 2019-10-06 | 2019-09-06 | 2019-08-06 | 2019-07-06 | 2019-06-06 | 2019-05-06 | 2019-04-06 | 2019-03-06 | 2019-02-06 | 2019-01-06 | 2018-12-06 | 2018-11-06 | 2018-10-06 | 2018-09-06 | 2018-08-06 | 2018-07-06 | 2018-06-06 | 2018-05-06 | 2018-04-06 | 2018-03-06 | 2018-02-06 | 2018-01-06 | 2017-12-06 | 2017-11-06 | 2017-10-06 | 2017-09-06 | 2017-08-06 | 2017-07-06 | 2017-06-06 | 2017-05-06 | 2017-04-06 | 2017-03-06 | 2017-02-06 | 2017-01-06 | 2016-12-06 | 2016-11-06 | 2016-10-06 | 2016-09-06 | 2016-08-06 | 2016-07-06 | 2016-06-06 | 2016-05-06 | 2016-04-06 | 2016-03-06 | 2016-02-06 | 2016-01-06 | 2015-12-06 | 2015-11-06 | 2015-10-06 | 2015-09-06 | 2015-08-06 | 2015-07-06 | 2015-06-06 | 2015-05-06 | 2015-04-06 | 2015-03-06 | 2015-02-06 | 2015-01-06 | 2014-12-06 | 2014-11-06 | 2014-10-06

Key: Value:

Key: Value:

MESSAGE
DATE 2015-09-18
FROM Ruben Safir
SUBJECT Subject: [LIU Comp Sci] Fwd: Re: fork() on a machine without paging hardware
From owner-learn-outgoing-at-mrbrklyn.com Fri Sep 18 11:54:09 2015
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: by mrbrklyn.com (Postfix)
id 04DB4161154; Fri, 18 Sep 2015 11:54:09 -0400 (EDT)
Delivered-To: learn-outgoing-at-mrbrklyn.com
Received: by mrbrklyn.com (Postfix, from userid 28)
id E4210161161; Fri, 18 Sep 2015 11:54:08 -0400 (EDT)
Delivered-To: learn-at-nylxs.com
Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89])
by mrbrklyn.com (Postfix) with ESMTP id 68AA7161154
for ; Fri, 18 Sep 2015 11:54:08 -0400 (EDT)
Received: from [10.0.0.19] (www.mrbrklyn.com [96.57.23.82])
by mailbackend.panix.com (Postfix) with ESMTPSA id 547FB1630B
for ; Fri, 18 Sep 2015 11:54:08 -0400 (EDT)
Message-ID: <55FC33A0.1010700-at-panix.com>
Date: Fri, 18 Sep 2015 11:54:08 -0400
From: Ruben Safir
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: learn-at-nylxs.com
Subject: [LIU Comp Sci] Fwd: Re: fork() on a machine without paging hardware
References:
In-Reply-To:
X-Forwarded-Message-Id:
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Sender: owner-learn-at-mrbrklyn.com
Precedence: bulk
Reply-To: learn-at-mrbrklyn.com




-------- Forwarded Message --------
Subject: Re: fork() on a machine without paging hardware
Date: Tue, 08 Sep 2015 17:49:28 -0500
From: Gordon Burditt
Newsgroups: comp.unix.programmer
References:

> AIUI fork() will duplicate a process' image including its address space.
> After the duplication both parent and child will have the same memory
> image they had before, including having all pointers pointing at the
> same memory locations. So they would both have to have the same data in
> the same places.

This also requires copy-on-write: if one process writes the data
in a page, it gets its own copy. If you can't do that, then
you need to copy immediately on fork().

> That duplication of addresses would normally be made possible by parent
> and child each running in its own address space. That is easy enough to
> achive if the OS has paging hardware available. But what happens if

You need memory management hardware for this, not necessarily paging
hardware, which requires memory management hardware and more.

> there is no paging hardware in use? Surely Unix has run on such
> machines. In that case:
>
> * is fork() prohibited or

fork() had better not be prohibited or the system won't get very
far in booting. It's a fundamental part of running a program.

> * does the OS swap the two tasks out and in or
> * something else?

the OS can swap segments in and out. *OR*, in the extreme I/O-limited
case, it can just be limited by available memory - there is *NO*
swap or page space. That is often the case in modern UNIX systems
when they are being installed, or are booting up. There is no
partition for swap/page space yet, or it hasn't been told to use
it yet. In the case of installation, / is likely located on a
CD-ROM which you just booted, or possibly an in-memory copy of a
filesystem it got from the CD-ROM.

Certain dedicated applications for UNIX, like the "router-on-a-floppy"
(or CD-ROM or DVD-ROM) don't run enough user programs to really
need any swap/page space. If you don't need logs, you can dispense
with having a hard disk.

Consider the Tandy 6000. It ran Microsoft Xenix with a 68000 (not
68020) processor, and had about the crudest memory mapping possible:
it had two base/limit registers which were active only in user mode.

The first base/limit register mapped virtual addresses 0x000000 -
0x7fffff to VAddr + Base1 thru VAddr + Base1 + Limit1. This was
the data segment. If you tried to access past the limit, you'd
get a fault.

The second base/limit register mapped virtual addresses 0x800000 -
0xffffff to VAddr + Base2 thru VAddr + Base2 + Limit2. This was
the code segment, and the user process couldn't write this segment.
If you tried to write the segment or access past the limit, you'd
get a fault.

To run a process, the OS needed to swap both segments of the process
in (if the process *had* a code segment - it was possible to link
everything into the data segment only), load up the base/limit
registers, restore the state of the process and run it. If they
could fit, you could have data and code segments for several processes
in memory at once. You just had to reload the base/limit registers,
along with the processor state, to switch processes. If a program,
like /bin/sh, was linked with shared-text, two processes could share
a code segment if they were both running the same program.

The 68000 did not have useful "page faults" (this is an important
difference between the 68000 and 68020). If it tried to access
memory that wasn't resident, it got a fault, but the instruction
completed. If, for example, it was an add-memory-to-register
instruction, it would take whatever trash was on the bus, and you
just lost the original contents of the register. You couldn't
restart the process; the only choice was to terminate it. So even
running a process with one segment not in memory and faulting it
in when needed wasn't possible.

Shared libraries were not supported. Linking programs shared-text
was a sort of poor-man's shared library. For that to work, you'd
really need another base/limit register, at minimum, and preferably
one base/limit register per shared library a program had. You
*could* sorta support shared libraries by not sharing them, but
there isn't much point in bothering if you can't really share at
least one library in each process.



  1. 2015-09-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Fwd: Panel about technology in higher education.
  2. 2015-09-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] C++ Fwd: Re: References to const
  3. 2015-09-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Re: [isoc-ny] WEBCAST TODAY: Armenian Internet Governance Forum
  4. 2015-09-09 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Artifical Intell
  5. 2015-09-09 mrbrklyn-at-panix.com Subject: [LIU Comp Sci] [csconnection-at-computer.org: VIEW NOW: The Total Economic Impact of
  6. 2015-09-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Artificial Intelligence and CLIPS
  7. 2015-09-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Fwd: Wednesday: Join us at "Freedom in my Heart"
  8. 2015-09-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Internt of things...
  9. 2015-09-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Fwd: Re: When to use threaded interrupts?
  10. 2015-09-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] IEEE Aritifical Intelligence
  11. 2015-09-18 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] AI lectures
  12. 2015-09-18 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Fwd: Re: "Know Your Language: C Rules Everything Around Me (Part
  13. 2015-09-18 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Fwd: Re: fork() on a machine without paging hardware
  14. 2015-09-23 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Writing Kernel Driver tutorial
  15. 2015-09-25 Ruben Safir <mrbrklyn-at-panix.com> Subject: [LIU Comp Sci] Artificial Intelligence in Perl

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!