Well, you can run multitasking in TSRs & keyboard interrupt handlers (the original event loop)… implementing a window manager and TCP stack is left as an exercise to the reader…
I'm pretty sure both of those have implementations available for DOS already.