1

I'm studying for CISSP exam and I've found a strange definition of multitasking

In computing, multitasking means handling two or more task simultaneously. In the past, most system did not truly multitask because they relied on the operative system to simulate multitasking by carefully structuring the sequence of commands sent to the CPU for execution. ... A single-core multi-tasking system is able to juggle more than one task or process at any given time.

A single core cannot be multitasking because it cannot process more than one task at given time...it usually performs a context-switching to simulate multitasking. It is more or less what was done by operative systems in the past (and now). So I don't unterstand the statemens above. Am I wrong?

Ana Maria
  • 301

3 Answers3

1

Context-switching is a heavy operation that involves saving all the registers of the current task and loading instead those of another task.

Multitasking is the ability of a computer to run more than one program or task at the same time. Multitasking contrasts with single-tasking, where one process must entirely finish before another can begin. Context-switching is the tool used for enabling multitasking.

MS-DOS is an example for a single-tasking environment.
Windows 3.1 and later are multi-tasking environments.

harrymc
  • 498,455
1

With a single-core CPU, the tasks can only be executed concurrently, rather than simultaneously. Back in the day when there were only single-core CPUs, the difference between concurrent and simultaneous was always stressed in OS classes & textbooks.

The techniques to achieve concurrent execution, such as context switching and scheduling methods (e.g. priority vs round-robin, preemptive vs cooperative) are still very relevant in an age of multi-core CPUs simply because the operating system is not assured of having an available core for every task it needs to execute.
The OS needs to assume the number of cores (or execution units) will be less than the number of tasks that need to be executed.

Hence all the concepts developed to perform concurrent execution of tasks are still employed in modern operating systems while performing a limited number of simultaneous executions of tasks.

sawdust
  • 18,591
0

Technically multitasking is different from multiprocessing.

Where I'd say that multiprocessing is prone to be hardware dependent to a higher degree; allowing true concurrent execution of (e.g.) cpu code: i.e. that is what you're discussing elsewhere above/below of here.

To have true gain from several cpu-cores for a single software project requires the software to be built with multiprocessing in mind (e.g Hugin-MP, for multi-image panorama stitching).

Opinion based on experience;
"Windows 3.1" uses/used cooperative multitasking, each task/program had to "let go" of the CPU (i.e. the task would block all other software from getting anywhere until it did).
This was VERY evident in how Windows 3 "multitasked".

The Amiga computer used "preemptive multitasking" on it's (pre multicore, WITH context switches) M68K and the experience was vastly different from Windows(3!).
Simple tasks as formatting one or even a few disks was nicely done,
while you spent time on other things;
e.g. burning a CD, playing music, editing a file, browsing the web and chatting; all at once.

This was NOT possible when using Windows; and that remained so - with minuscule improvements only - until "7" or so. Burning a CD alone required full availability to the CPU, or it failed with "buffer underrun" (the write buffer could not be filled quick enough).

Note also: The "retro" Amiga world exists and is thriving - even though slowly, even hardware-wise (new PCBS!). I'm not sure that is the case w.r.t Windows 3.

Hannu
  • 10,568