What is Multi-Tasking ?

Metehan Akbaba
3 min readSep 22, 2021

--

I am gonna go through kind of a history of multi-tasking and talk about what it really is. I think most of us have at least a vague idea of what multitasking and multithreading are. Despite, there is some nuance that I think is important to really understand for the purpose of this article.

Once Upon A Time, we only had a single process.

If we go way back in time we only had a single process at least in the personal PC world. So, if we think back to the days of MS-DOS or the original Apple OS unlike the Apple to see and things like that before the Mac now these are command-line interfaces. In these, they only had the ability to run a single thing at a time. There was no concept of running more than one piece of code at the same time, there were no background tasks, there were no running multiple programs. Each operating system is a program in itself. So, that program would kind of run and you would tell it to run another program that would stop. The OS would actually stop running and you would start running another application. When it was done it would actually start back up the OS again. Actually, this is super super limited and we know we wanted the ability to run multiple things at a time. This concept called cooperative multitasking and this made the world quite a bit better so this is a model of being able to run more than one program at the same time. We first saw this introduction in kind of the early PC computing days with the early days of both Windows and the early Mac OS systems it’s the way that cooperative multitasking works is. You have an app and it’s kind of going on and kind of doing its job.

Eventually get to a point where the app will say. All right, I can go ahead and take a break now and this would happen that in the application. You would usually call a method called yield. There are a few other variants that will do the same thing but basically you know the app will actually have code that was written into it they would say “okay, I can pause now and we can let something else run” so when an application called yield, you know that would signal back to the operating system who’d start up running again be like okay this one is done who else who needs to run next and even go and run something else. there’s nothing else to run then you would give the operating system itself a chance to run but of course there is a flaw in this that you may have already noticed. this is dependent on the user’s application actually calling yield. If the application didn’t call yield then what that mean is that single application would just keep running and running and running and it wouldn’t give anything else a chance to run. So for those of you who remember the windows like 95 and 98 days you know you would get an application that would start in this behaving say the application would crash or something like that. When that happened though it wouldn’t just cause the app to crash you would take your entire system down with it. You probably never be able to grab a window that was frozen and like move it around on the screen it would ghost and it just completely destroy your entire display well this is actually the reason why under the hood. It’s because all of the versions of Windows that were based on DOS as well as all of the original versions of Mac OS up through Mac OS 9. Use this system and so when an app misbehaved there’s no way for the operating system to recover from that.

--

--