Article View: comp.sys.powerpc
Article #1359Fixing Macintosh's multitasking
From: Bill Moyer
Date: Mon, 21 Aug 1995 05:24
Date: Mon, 21 Aug 1995 05:24
42 lines
2895 bytes
2895 bytes
In article <417c7k$ndh@sundog.tiac.net>,
Jim Williams <williams@tiac.net> wrote:
>Wouldn't it be obvious to continue providing for the app's
>volunary giving up time? This is certainly what I'm used to from an OS --
>if it isn't true in Unix I may find myself doing some Linux kernel hacking
>sooner than I expected.
Unixes and OS/2 do this more intelligently in the kernel than could
be done in the application (theoretically; a real good programmer might
be able to choose more-optimal times, but that's sort of in the realm
of the "assembly programmer vs. optimizing compiler" argument). There
are conditions under which the OS pre-empts a process before its CPU
quanta is consumed, like when the app tries to access a locked shareable
resource or blocks on peripheral input. There might be a system call
for semiblocking (ie, deliberately giving up the remainder of a quanta),
but it's been a while since I did Unix system programming.
>(Also, it would a bit of a kludge but it would be easy to fake giving
>the app uninterrupted access to a system struct.)
This struck me as the easiest and most-reliable way of making sure
that old apps behave properly in a pre-emptive multitasking environ-
ment. Since MacOS already provides logically remapped memory (which
is part of, but distinct form, VM) it wouldn't be hard to convince
each app that it's really accessing the shared system structure at
address X when each process' logical address X points to a different
physical address; that way, if a task is pre-empted in the middle of
a fake co-operative task switch, then when it came back the structure
would look just like it'd left it. The OS could give the app all the
signals it expects after the fake co-operative task switch.
I presume the same sort of thing could be done to fix MSWindows'
multitasker? Heh.. Reminds me of today's Doonesbury, where the
kid sat down at a computer running Win95 and noticed, "Ah! An OS
I haven't seen.. Nifty.. The multitasking seems to be broken,
though. That's okay, I'll rewrite it (..) there, all better."
-- ttk@rahul.net
Chief of Computer Science, ZuulOS Development Labs
(please excuse the next couple of lines; this net provider insists
--
Bill Moyer <ttk@rahul.net>
Technical Details
Message-ID:
<4195ac$c4d@bug.rahul.net>Path:
arc1-ca.pugleaf.net!ttk.a2i!ttkReferences:
<40t7qa$gap@nntp5.u.washington.edu> <416q7e$6ik@bug.rahul.net> <1995Aug20.092448.13521@kuentos.guam.net> <417c7k$ndh@sundog.tiac.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!ttk.a2i!ttk From: Bill Moyer <ttk@rahul.net> Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel,alt.2600,alt.destroy.microsoft Subject: Fixing Macintosh's multitasking Date: 21 Aug 1995 05:24:28 GMT Organization: ZuulOS Development Labs Distribution: usa Message-ID: <4195ac$c4d@bug.rahul.net> References: <40t7qa$gap@nntp5.u.washington.edu> <416q7e$6ik@bug.rahul.net> <1995Aug20.092448.13521@kuentos.guam.net> <417c7k$ndh@sundog.tiac.net> NNTP-Posting-Host: jive.rahul.net NNTP-Posting-User: ttk