Re: ancient OS history, ARM is sort of channeling the IBM 360

Liste des GroupesRevenir à c arch 
Sujet : Re: ancient OS history, ARM is sort of channeling the IBM 360
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.arch
Date : 30. Jun 2024, 17:38:10
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Jun30.183810@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7
User-Agent : xrn 10.11
scott@slp53.sl.home (Scott Lurndal) writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
John Levine <johnl@taugh.com> writes:
As I think I said before, these days you map the file into your
address space and read or write it like a long string, so its all
locate all the time.
>
Reading with mmap() appears to be quite common, either directly or
through libaries like glibc which use mmap() for buffered input where
possible.  For writing, using mmap() poses some difficulties:
>
* Writing to an mmap()ed region has weaker atomicity semantics than
 write().
>
That depends - if all writers are using mmap, atomicity is provided
by other mechanisms (process-scope mutex, sysv or posix semaphores,
etc).
>
An application where one writes via mmap and others read
using stdio or read/write/pread/pwrite simulataneously
is poorly designed.

"An application"?  I live in a world where all kinds of programs can
access the same files.  How such a program works internally is often
not known to the designers of the others.

In practice your advice boils down to avoiding to write with mmap().

>
>
* mmap() works on pages (not in the interface, fortunately, but
 internally), but for writing you want byte granularity.  The
 difference is not a big problem for reading, but it is a bigger one
 for writing.
>
In my experience, mmap is most often used when record-granularity
is required, rather than treating the mapped region as a
stream-of-bytes.

I usually mmap() the whole file.

* You have to extend the file length with a separate system call, and
 then mmap() the new area, so you might just as well use write().
>
False economy.   ftruncate is a single system call.

Yes, that's the one that extends the file length.  ftruncate()
followed by mmap() are two system calls.  And at some point you also
want to msync() (although not for each ftruncate).

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Date Sujet#  Auteur
20 Jun 24 * ARM is channeling the IBM 360102John Savard
20 Jun 24 +* Re: ARM is sort of channeling the IBM 36095John Levine
21 Jun 24 i`* Re: ARM is sort of channeling the IBM 36094Lynn Wheeler
24 Jun 24 i `* Re: ARM is sort of channeling the IBM 36093Lawrence D'Oliveiro
24 Jun 24 i  +* Re: ancient OS history, ARM is sort of channeling the IBM 36090John Levine
24 Jun 24 i  i+* Re: ancient OS history, ARM is sort of channeling the IBM 36087Lynn Wheeler
24 Jun 24 i  ii+* Re: ancient OS history, ARM is sort of channeling the IBM 36082Lawrence D'Oliveiro
25 Jun 24 i  iii`* Re: ancient OS history, ARM is sort of channeling the IBM 36081John Levine
25 Jun 24 i  iii +* Re: ancient OS history, ARM is sort of channeling the IBM 36073Lawrence D'Oliveiro
25 Jun 24 i  iii i`* Re: ancient OS history, ARM is sort of channeling the IBM 36072Stephen Fuld
25 Jun 24 i  iii i +* Re: ancient OS history, ARM is sort of channeling the IBM 36064Stephen Fuld
26 Jun 24 i  iii i i`* Re: ancient OS history, ARM is sort of channeling the IBM 36063Stephen Fuld
26 Jun 24 i  iii i i `* Re: ancient OS history, ARM is sort of channeling the IBM 36062Lawrence D'Oliveiro
26 Jun 24 i  iii i i  +* Re: ancient OS history, ARM is sort of channeling the IBM 36057John Levine
26 Jun 24 i  iii i i  i`* Re: ancient OS history, ARM is sort of channeling the IBM 36056Lawrence D'Oliveiro
27 Jun 24 i  iii i i  i `* Re: ancient OS history, ARM is sort of channeling the IBM 36055John Levine
27 Jun 24 i  iii i i  i  `* Re: ancient OS history, ARM is sort of channeling the IBM 36054MitchAlsup1
28 Jun 24 i  iii i i  i   `* Re: ancient OS history, ARM is sort of channeling the IBM 36053Lawrence D'Oliveiro
28 Jun 24 i  iii i i  i    +- Re: TSS I/O, ancient OS history1John Levine
28 Jun 24 i  iii i i  i    `* Re: ancient OS history, ARM is sort of channeling the IBM 36051MitchAlsup1
28 Jun 24 i  iii i i  i     `* Re: ancient OS history, ARM is sort of channeling the IBM 36050Lawrence D'Oliveiro
29 Jun 24 i  iii i i  i      `* Re: ancient OS history, ARM is sort of channeling the IBM 36049Stephen Fuld
29 Jun 24 i  iii i i  i       `* Re: ancient OS history, ARM is sort of channeling the IBM 36048John Levine
30 Jun 24 i  iii i i  i        +* Re: ancient OS history, ARM is sort of channeling the IBM 36032Lawrence D'Oliveiro
30 Jun 24 i  iii i i  i        i+- Re: ancient OS history, ARM is sort of channeling the IBM 3601MitchAlsup1
30 Jun 24 i  iii i i  i        i`* Re: ancient OS history, ARM is sort of channeling the IBM 36030Stephen Fuld
30 Jun 24 i  iii i i  i        i +* Re: ancient OS history, ARM is sort of channeling the IBM 36024Lawrence D'Oliveiro
30 Jun 24 i  iii i i  i        i i+* Re: ancient OS history, ARM is sort of channeling the IBM 36022Lynn Wheeler
30 Jun 24 i  iii i i  i        i ii`* Re: ancient OS history, ARM is sort of channeling the IBM 36021John Dallman
30 Jun 24 i  iii i i  i        i ii +* Re: ancient OS history, ARM is sort of channeling the IBM 36019Thomas Koenig
30 Jun 24 i  iii i i  i        i ii i+* Re: ancient OS history, ARM is sort of channeling the IBM 3608Michael S
30 Jun 24 i  iii i i  i        i ii ii+* Re: ancient OS history, ARM is sort of channeling the IBM 3606Thomas Koenig
30 Jun 24 i  iii i i  i        i ii iii+* Re: ancient OS history, ARM is sort of channeling the IBM 3604Stephen Fuld
30 Jun 24 i  iii i i  i        i ii iiii`* Re: base registers, ancient OS history, ARM is sort of channeling the IBM 3603John Levine
1 Jul 24 i  iii i i  i        i ii iiii `* Re: base registers, ancient OS history, ARM is sort of channeling the IBM 3602Lawrence D'Oliveiro
1 Jul 24 i  iii i i  i        i ii iiii  `- Re: base registers, ancient OS history, ARM is sort of channeling the IBM 3601John Levine
30 Jun 24 i  iii i i  i        i ii iii`- Re: ancient OS history, ARM is sort of channeling the IBM 3601MitchAlsup1
30 Jun 24 i  iii i i  i        i ii ii`- Re: ancient OS history, ARM is sort of channeling the IBM 3601MitchAlsup1
30 Jun 24 i  iii i i  i        i ii i`* Re: ancient OS history, ARM is sort of channeling the IBM 36010John Dallman
30 Jun 24 i  iii i i  i        i ii i +- Re: ancient OS history, ARM is sort of channeling the IBM 3601MitchAlsup1
30 Jun 24 i  iii i i  i        i ii i `* Re: ancient OS history, ARM is sort of channeling the IBM 3608Stephen Fuld
30 Jun 24 i  iii i i  i        i ii i  +- Re: small old machines, ancient OS history, ARM is sort of channeling the IBM 3601John Levine
30 Jun 24 i  iii i i  i        i ii i  +* Re: ancient OS history, ARM is sort of channeling the IBM 3604John Dallman
30 Jun 24 i  iii i i  i        i ii i  i+* Re: ancient OS history, ARM is sort of channeling the IBM 3602Stephen Fuld
30 Jun 24 i  iii i i  i        i ii i  ii`- Re: ancient OS history, ARM is sort of channeling the IBM 3601John Dallman
30 Jun 24 i  iii i i  i        i ii i  i`- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lynn Wheeler
30 Jun 24 i  iii i i  i        i ii i  `* Re: ancient OS history, ARM is sort of channeling the IBM 3602MitchAlsup1
1 Jul 24 i  iii i i  i        i ii i   `- Re: ancient OS history, ARM is sort of channeling the IBM 3601moi
30 Jun 24 i  iii i i  i        i ii `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lynn Wheeler
30 Jun 24 i  iii i i  i        i i`- Re: ancient OS history, ARM is sort of channeling the IBM 3601Stephen Fuld
1 Jul 24 i  iii i i  i        i `* Re: ancient OS history, ARM is sort of channeling the IBM 3605Lawrence D'Oliveiro
2 Jul 24 i  iii i i  i        i  `* Re: ancient OS history, ARM is sort of channeling the IBM 3604John Levine
2 Jul 24 i  iii i i  i        i   `* Re: ancient OS history, ARM is sort of channeling the IBM 3603Lawrence D'Oliveiro
2 Jul 24 i  iii i i  i        i    `* Re: ancient OS history, ARM is sort of channeling the IBM 3602John Levine
2 Jul 24 i  iii i i  i        i     `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Dan Cross
30 Jun 24 i  iii i i  i        `* Re: ancient OS history, ARM is sort of channeling the IBM 36015Anton Ertl
30 Jun 24 i  iii i i  i         `* Re: ancient OS history, ARM is sort of channeling the IBM 36014Anton Ertl
30 Jun 24 i  iii i i  i          `* Re: streams and file locks, ancient OS history, ARM is sort of channeling the IBM 36013John Levine
1 Jul 24 i  iii i i  i           +* Re: streams and file locks, ancient OS history, ARM is sort of channeling the IBM 36010MitchAlsup1
1 Jul 24 i  iii i i  i           i`* Re: streams and file locks, ancient OS history, ARM is sort of channeling9John Levine
1 Jul 24 i  iii i i  i           i `* Re: streams and file locks, ancient OS history, ARM is sort of channeling8MitchAlsup1
1 Jul 24 i  iii i i  i           i  `* Re: streams and file locks, ancient OS history, ARM is sort of channeling7John Levine
1 Jul 24 i  iii i i  i           i   +* Re: streams and file locks, ancient OS history, ARM is sort of channeling2Lawrence D'Oliveiro
1 Jul 24 i  iii i i  i           i   i`- Re: streams and file locks, ancient OS history, ARM is sort of channeling1John Levine
1 Jul 24 i  iii i i  i           i   `* Re: streams and file locks, ancient OS history, ARM is sort of channeling4Michael S
1 Jul 24 i  iii i i  i           i    `* Re: streams and file locks, ancient OS history, ARM is sort of channeling3MitchAlsup1
2 Jul 24 i  iii i i  i           i     +- Re: streams and file locks, ancient OS history, ARM is sort of channeling1Michael S
2 Jul 24 i  iii i i  i           i     `- Re: streams and file locks, ancient OS history, ARM is sort of channeling1Michael S
1 Jul 24 i  iii i i  i           `* Re: streams and file locks, ancient OS history, ARM is sort of channeling the IBM 3602Lawrence D'Oliveiro
1 Jul 24 i  iii i i  i            `- Re: streams and file locks, ancient OS history1John Levine
26 Jun 24 i  iii i i  `* Re: ancient OS history, ARM is sort of channeling the IBM 3604Stephen Fuld
26 Jun 24 i  iii i i   +* Re: ancient OS history, ARM is sort of channeling the IBM 3602John Levine
26 Jun 24 i  iii i i   i`- Re: ancient OS history, ARM is sort of channeling the IBM 3601Stephen Fuld
27 Jun 24 i  iii i i   `- Re: ancient OS history, ARM is sort of channeling the IBM 3601MitchAlsup1
26 Jun 24 i  iii i `* Re: ancient OS history, ARM is sort of channeling the IBM 3607John Levine
26 Jun 24 i  iii i  `* Re: ancient OS history, ARM is sort of channeling the IBM 3606John Levine
27 Jun 24 i  iii i   `* Re: ancient OS history, ARM is sort of channeling the IBM 3605Thomas Koenig
27 Jun 24 i  iii i    `* Re: ancient OS history, ARM is sort of channeling the IBM 3604John Levine
27 Jun 24 i  iii i     +- Re: ancient OS history, ARM is sort of channeling the IBM 3601Thomas Koenig
28 Jun 24 i  iii i     +- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lawrence D'Oliveiro
28 Jun 24 i  iii i     `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lawrence D'Oliveiro
25 Jun 24 i  iii +* Re: ancient OS history, ARM is sort of channeling the IBM 3606Terje Mathisen
25 Jun 24 i  iii i+* Re: ancient OS history, ARM is sort of channeling the IBM 3602Lawrence D'Oliveiro
25 Jun 24 i  iii ii`- Re: ancient OS history, ARM is sort of channeling the IBM 3601Terje Mathisen
25 Jun 24 i  iii i`* Re: ancient OS history, ARM is sort of channeling the IBM 3603Michael S
26 Jun 24 i  iii i `* Re: ancient OS history, ARM is sort of channeling the IBM 3602Michael S
26 Jun 24 i  iii i  `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Terje Mathisen
25 Jun 24 i  iii `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lynn Wheeler
24 Jun 24 i  ii`* Re: ancient OS history, ARM is sort of channeling the IBM 3604Terje Mathisen
24 Jun 24 i  ii +* Re: ancient OS history, ARM is sort of channeling the IBM 3602Lawrence D'Oliveiro
24 Jun 24 i  ii i`- Re: ancient OS history, ARM is sort of channeling the IBM 3601Stephen Fuld
24 Jun 24 i  ii `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Thomas Koenig
24 Jun 24 i  i`* Re: ancient OS history, ARM is sort of channeling the IBM 3602Thomas Koenig
24 Jun 24 i  i `- Re: ancient OS history, ARM is sort of channeling the IBM 3601Lawrence D'Oliveiro
24 Jun 24 i  `* Re: ARM is sort of channeling the IBM 3602Stephen Fuld
24 Jun 24 i   `- Re: ARM is sort of channeling the IBM 3601Stephen Fuld
20 Jun 24 +* Re: ARM is channeling the IBM 3602moi
24 Jun 24 i`- Re: ARM is channeling the IBM 3601Lawrence D'Oliveiro
21 Jun 24 `* Re: ARM is channeling the IBM 3604MitchAlsup1
22 Jun 24  `* Re: ARM is channeling the IBM 3603John Dallman
22 Jun 24   +- Re: ARM is channeling the IBM 3601MitchAlsup1
22 Jun 24   `- Re: ARM is channeling the IBM 3601BGB

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal