Re: [Fwd: Re: EDE - Personal Suggestions and Ideas]

David Given
2004-05-25T17:10:10Z

On Tuesday 25 May 2004 15:23, Miguel Bolanos wrote:
[...]
> > - swap support
>
> Without protected mode that could get sticky.  How can it be done cleanly
> and in a stable manner?

There's a difference between paging and swapping.

Paging is when you use the page-level MMU to copy individual pages to and from
disk on an on-demand basis. The application tries to access a page that has
no mapping to physical memory; an exception is raised; the kernel allocates a
page, reads it from disk, updates the virtual mapping, and the application
continues.

Swapping is when you read and write the entire application's address space
when the application get scheduled or descheduled. The application is waiting
for I/O; the kernel writes its data to disk and frees its memory; the I/O
becomes available; the kernel reads the data back in again, updates the
application's segment registers, and the application continues.

Paging can only be done with a page-level MMU, which only the 386 and above
had.

Swapping can be done on any segmented processor, even the 8086.

Swapping is slower, because you've got to read and write more memory, but
given the maximum size of a segment on ELKS is 64kB and each process can have
a maximum of two segments, you end up having to read a maximum of 128kB per
process. Which is not a lot. If you can swap to a ramdisk of some description
--- EMS cards are ideal for this --- the delay is negligable.

One interesting feature: remember that code is read-only. You don't need to
swap out an applications' text segment, it won't change. Just throw it away;
you can always reload it from the original binary when you need it...

[...]
> > - maybe ext2fs support.
>
> Perhaps, but will ext2 perform as well as a simpler filesystem on these old
> old machines?

Nah. You may as well stick to the Minix filesystem. It's much, much simpler,
and the performance benefits of ext2 don't really apply on machines that
small.

[...]
> > - A little "office" suite

Forget GUI and WYSIWYG packages; too big and complicated. If you want a
kick-ass office suite done the Unix way, look into using troff for
typesetting. Weird, yes, but deceptively powerful and it runs on tiny
systems.

(Don't believe me? On my Debian system:

zcat /usr/share/man/man1/gcc.1.gz | groff -man -Tps > out.ps

...will typeset a 110-page book. groff is big and chunky, but there are much
smaller implementations available, such as the one on Minix.)

For spreadsheets, look into sc. It's a character-cell spreadsheet that's
portable to practically everything.

For a database, use sc, or else use text files. You'd be amazed what you can
do with a few lines of awk.

You're not *going* to make an 8086 work the same way as a modern desktop.
There's just not enough room for a program that's a text entry application
*and* a typesetting application *and* a graphical preview application *and* a
file manager *and* a programming language, etc. Instead, divide and conquer.
Your text entry application is vi or uemacs. Your typesetting application is
troff. Your graphical preview application is ditview. Your file manager is
the shell. Your programming language is awk. Each tool is small enough to run
on a small system, and simple enough that it will run *well* on a small
system.

[...]
> Someone offer to help me learn C.

The best way to learn is to do something. Kernel hacking's not a good place to
start; it's too hard to debug, and there are too many knock-on effects (you
run the risk of accidentally breaking things without realising it).

Applications would probably be a good place to start. What tools do you want
on ELKS? Anything there you'd want to try and write?

--
+- David Given --McQ-+ "I love the way Microsoft follows standards. In
| dg@cowlark.com | much the same manner that fish follow migrating
| (dg@tao-group.com) | caribou." --- Paul Tomblin
+- www.cowlark.com --+
-
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html