Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Multitasking, something we copied from computers (mikemwanje.dev)
31 points by mikemwanje on Sept 17, 2022 | hide | past | favorite | 33 comments


Multitasking existed long before computers, so I don't like the title much.

You probably can't cook a meal without multitasking. The author suggests that you are rapidly switching focus, but I don't agree - if you schedule things correctly you can jump from task to task without thinking about it. Eg if you know you need to make a burger with fries and a plate of nachos at the same time you can schedule the tasks based on how much time they take - burger on the grill, fries in the grease, start prepping the bun/plate, get the nachos built and in the broiler, pull the fries and let them drain, plate the burger, add the fries, pull the nachos out, out the window for service. You don't need to think much ahead to get it done while in the process, if you already know the plan and are used to it. Everything has a timer and you just need to move things when the timer says go. Bonus points if the timer is internal.


We can’t do parallelism, only concurrency on a cognitive level. Think of your brain like the CPU, while your appendages can be thought of as some PCIe connected device. The CPU can send tasks to those and given a well-known pattern it can execute them autonomously (e.g. you can walk without actively thinking about it. But if there is dog shit on the streets you want to avoid you will have to look up and allocate CPU time to the task)


> We can’t do parallelism, only concurrency on a cognitive level.

While that might be through of conscious thought, but there's definitely at least anecdotal evidence to suggest that the brain performs tasks in the background. Think about how many times you've struggled to remember the name of an author, a movie, an actor; only to have it come to you hours later while you're working on something entirely unrelated.


A computer accomplishes tasks by coordinating many subsystems. Not everything is done in the CPU, and the brain is similar. The central unit can make requests of other components (e.g. storage controller), and they go off and do it while the central unit does something else. Only the real heavy thinking/processing happens in the CPU, and that’s always what discussions about human multitasking are talking about. Brains and computer systems work in similar ways.


  > Only the real heavy thinking/processing happens in the CPU...
  > Brains and computer systems work in similar ways.
I think that this characterization is pretty simplistic. Perhaps it's useful as a model from time to time, but does not capture the massively complex reality, full of unknowns and poorly understood by science to this day.

Where is this "CPU" in the brain, of which you speak? I suppose the pre-frontal cortex? That zone is generally associated with orchestration/planning, that you mention. But to say that those functions constitute "the real heavy thinking" is a bit of a reach, I think.

It would be like saying the manager does the all the hard work (:

I'm no neuroscientist, but anecdotally, a good portion of my important mental results come from an unknown place — maybe bubbling to the forefront of consciousness when I'm sitting on the toilet, or in a dream. Not when my "CPU is spinning", so to speak.

YMMV.


Even the CPU itself has different processing units which it uses to delegate such tasks and achieve parallelism for tasks which don't have data dependencies


Don't we breath while we do anything else? That must account for parallelism


The limits of what we can and can't do are not well-explored, nor well-bounded.

For example, there was a fellow (his name escapes me at the moment) who had trained himself to be able to write a sentence with one hand while solving a mathematical equation with the other.

There's a reason why our minds evolved a "unitary" identity or ego, it's evolutionarily advantageous (tautologically, sorry), but it's an illusion. You can "divide" your mind among several tasks (in other words, the brain is not like a CPU, it's more like "the cloud", yeah?) but it's not really as useful as it might seem.

- - - -

(FWIW, my first thought on reading the title was "This person doesn't cook." ;P )


I learnt to do that in elementary school for fun, I would personally do it by doing it concurrently fast enough that the bottleneck was my hand writing instead of the thought, so all I was actually doing in parallel was writing things I had already thought out, so I don't know how much this brings to the concurrency/parallelism conscious thought question.


I think we can do some limited degree of parallelism. We can walk/run and talk at the same time. We can walk and operate a phone at the same time (albeit more poorly). Our two arms can work in parallel - rub your belly and pat your head. Or, for a better example, driving a manual transmission car -- you can shift gears, and modulate your steering and speed at the same time.

In the mental world, you can also listen to a couple conversations at once with effort.


Another one: turning the handle on my popcorn cooker and hitting microwave buttons to melt butter.

Steering with one hand and changing radio stations with the other.

One that I feel I can't do at all: hit a keyboard key really fast with one hand and hit another one more slowly with another. Unless I treat it like playing drums in a specific rhythm, my fast hand has to stop briefly to let my slow hand hit its key.


This level of parallelism feels more like my brain is abstracting two tasks into one. It takes a little practice and then you gain that ability


Interesting observation. Are you saying there IS a feeling of doing two things in parallel that you just don't feel for those tasks? Maybe that is what parallelism feels like.

But on the other hand, would I say that walking is itself parallel because it uses two legs, two feet, and two arms all doing things at once? I guess not.


Human twins are parallel processors, with two identical and independent cores.


What would you call walking and chewing gum?


> You probably can't cook a meal without multitasking

But cooking a meal is a task in itself ( consisting related of subtasks). When cooking a meal it is a good idea to avoid attempting other unrelated tasks such as responding to emails and such as the quality of the original task will decrease


Yeah but is that truly multi tasking? Seems more like an event loop. Which is a form of multi tasking I guess.


In CS, that is more generally called scheduling or pipelining. And they’re forms of queuing theory and capacity resource management. For me, multitasking is the introduction of prioritization into the task queue management. In the above post, there’s a Finish-to-Finish prioritization introduced. We want hot burgers and nachos to complete at the same time or nearly the same time. So, yeah, I’d call that multitasking.


Conscious multitasking is incredibly inefficient, but hardware accelerated (unconscious) multitasking works pretty well


Sounds a bit like “System 1/System 2” thinking.

can definitely drive and listen to a podcast when you’re good at it.

https://youtu.be/5eW6Eagr9XA


It's not like computers are that good at multitasking either:

- Lose our ability to focus for longer

Well, multitasking is bad for the caches and any attempts at speculation might have been ruined by the forced task switch

- Prone to errors due to shorter attention spans

Prone to errors due to Spectre and its followups. Some mitigations go as far as disabling hyper threading, due to leaks triggered by the really fast context switching between the two hyperthreads

- Waste time during context switching

Yep, CPUs need time for that too

- Less productivity

Oh yeah.. one old way of increasing throughput was longer time slices for less context switches. Eg the old Windows NTs differentiated on timeslice length in their server and workstation offerings.

it's just that CPUs are still a helluvalot faster than us


People can only do single-threaded concurrency, we have absolutely no way at doing true parallelism on a cognitive level+

I really don’t see the parallel you are trying to draw, computers do what they are instructed to do with very very very little chance of a hardware failure. Not wanted operations can happen, but they ultimately boil down to human error.

+ We are otherwise a heavily distributed system which has many autonomous systems interoperating at the same time


The parallel they are drawing is for multitasking on single-core computers, for which performance is impacted somewhat similarly to humans.

Of course, the same parallel cannot be drawn with multitasking on multiple cores; though other issues of communication between cores can (and have, extensively) be compared with parallelism between multiple humans.


> Not wanted operations can happen, but they ultimately boil down to human error.

This made me think. Is a cosmic ray human error because we were unable to prevent it damaging the system?


How many cosmic ray bitflips happen? Even without ECC ram I’m fairly sure I have never seen any affect me, so there is that (even data hoarders with terabytes of data stored with e.g. ZFS seldom report problems due to that - when they start to see checksum errors it likely means a soon to fail harddrive instead)

Also, if I’m not mistaken, in airplanes which are much more likely to get hit by cosmic rays at high altitude, they often use redundant CPUs that work in lockstep with each other. So.. in the end it is human error I guess? Handling unexpected cases should be done well as well.


Most "multi-tasking" is the combination of a rote / completely automated task with a task you are engaged in.

Rote: Walking Engaged: Talking

Rote: Washing dishes Engaged: Listening

I find that "music in the background" while coding only works if you either completely zone it out and it acts as white noise (rare) OR the task is so boring and routine that you need some other stimulus to avoid getting bored.


It's fun to see how some technical terms creep into social sciences and philosophy, and eventually into the wild.

Coming from a technical background, I never fully understood what is meant by "object oriented ontology".

Another nice example is stretching the concept of "open source" to include the wildest ideas.


(From Wikipedia:)

> Object-oriented ontology maintains that objects exist independently (as Kantian noumena) of human perception and are not ontologically exhausted by their relations with humans or other objects.

So, basically, it's your default assumption that the world exists independently of somebody being there to see it.

Looks like the clickbaity name is there as a prank, because it's a revolt against some newer philosophy that can't settle on the old "if a tree falls on the forest and nobody is around, does it make a sound?"

But I did never hear about this before, so I may have understood things wrong.


"He's like a machine". "Man of steel"....

Humans have long strived to emulate their metal tools.

To do the same thing over and over forever, perfectly. To keep a perfect schedule. To suffer terrible abuse without bending or breaking. To obey orders perfectly and without hesitation.

What's not to admire?


check also out the story of invention of boredom after the introduction of the mechanical clock: http://aotcpress.com/articles/timepass-boredom/


All the job ads nowadays require effective multitasking.


Which is funny, since there's no such thing.


Clickbait.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: