lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Jun 21, 2016 3:54 PM, "Coda Highland" <chighland@gmail.com> wrote:
>
> On Tue, Jun 21, 2016 at 1:48 PM, Gregg Reynolds <dev@mobileink.com> wrote:
> >
> > On Jun 21, 2016 3:40 PM, "Coda Highland" <chighland@gmail.com> wrote:
> >>
> >> On Tue, Jun 21, 2016 at 1:37 PM, Gregg Reynolds <dev@mobileink.com> wrote:
> >> >
> >> > On Jun 21, 2016 3:31 PM, "Coda Highland" <chighland@gmail.com> wrote:
> >> >>
> >> >> On Tue, Jun 21, 2016 at 1:27 PM, Gregg Reynolds <dev@mobileink.com>
> >> >> wrote:
> >> >> >
> >> >> > On Jun 21, 2016 3:02 PM, "Coda Highland" <chighland@gmail.com> wrote:
> >> >> >>
> >> >> >> On Tue, Jun 21, 2016 at 12:45 PM, Gregg Reynolds <dev@mobileink.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> > On Jun 21, 2016 10:45 AM, "Roberto Ierusalimschy"
> >> >> >> > <roberto@inf.puc-rio.br>
> >> >> >> > wrote:
> >> >> >> > ...
> >> >> >> >> Right: couroutine is a specific use case of a Lua thread. As it
> >> >> >> >> is
> >> >> >> >> the
> >> >> >> >> only use of threads inside Lua code, we can say that, looking
> >> >> >> >> from
> >> >> >> >> Lua,
> >> >> >> >> coroutine = thread.
> >> >> >> >
> >> >> >> > Is it correct to say that a Lua thread is a fiber?  I.e. not an OS
> >> >> >> > or
> >> >> >> > pthread?
> >> >> >> >
> >> >> >> > - gregg
> >> >> >>
> >> >> >> Yes, that could be considered accurate, as fibers are a
> >> >> >> cooperative-multitasking construct.
> >> >> >>
> >> >> >
> >> >> > the amazingly cool thing is that we can have cooperative multitasking
> >> >> > even
> >> >> > with a single sequential thread of execution.  magic.  kinda makes
> >> >> > you
> >> >> > rethink your concept of execution,  thread, etc.
> >> >>
> >> >> The fun part is when you realize that before Windows 95, the entire
> >> >> Windows operating system was cooperatively multitasked, and apps were
> >> >> expected to yield quickly when awakened by the OS.
> >> >>
> >> > MS-DOS: the Original Embedded System.
> >>
> >> MS-DOS wasn't even cooperatively multitasked. It was TECHNICALLY
> >> preemptively multitasked, in that triggering a TSR through an
> >> interrupt routine could happen at effectively arbitrary times in
> >> program flow, but there was no timesharing and the TSR would have to
> >> clean itself up and return control to the original program on its own.
> >>
> > Oh man, you're taking me back!  The last time I heard "TSR" was about the
> > last time I heard "HCF" (Halt and Catch Fire, for the mainframe-naifs among
> > us).  But that means Windows was never merely cooperatively multitasked, no?
> >
> > I wonder, was there ever a purely cooperatively multitasked OS for PC-like
> > systems?
> >
> > g
>
> Windows didn't pull the TSR stunt and the only interrupt handler it
> didn't return quickly from was ctrl+alt+del. You can effectively
> consider Windows 3.x to be cooperatively multitasked and MS-DOS to be
> non-multitasked because the exceptions are nitpicky details that are
> effectively only there for the sake of supporting a broader set of
> hardware.
>
The things you learn on the lua mailing list!