What Is The Difference Between Multi-Core and Multi-task?

What Is The Difference Between Multi-Core and Multi-task?

Quote "When running on a multicore system, multitasking OSs can truly execute multiple tasks concurrently. The multiple computing engines work independently on different tasks.

For example, on a dual-core system, four applications - such as word processing, e-mail, Web browsing, and antivirus software - can each access a separate processor core at the same time. You can multitask by checking e-mail and typing a letter simultaneously, thus improving overall performance for applications."

>>can each access a separate processor core at the same time.
this means there won't be any time sharing between these four processors. right?
LVL 1
F-J-KAsked:
Who is Participating?
 
sistemuConnect With a Mentor Commented:
Until the multi-processor appeared, multi-tasking was only "pseudo-multi-tasking". Multiple tasks were possible, but at one particular moment, only one program was running.
Now, with multiple processes on our hands, multi-tasking is real, and yes, two programs can run simultaneously(or at least one thread of each program).
Time sharing will exist while users will run more programs than cores on a computer.
0
 
Infinity08Connect With a Mentor Commented:
multi-core refers to the CPU having multiple cores - the CPU is basically not just one CPU, but a set of a few CPU's that run at the same time.

multi-task refers to a capability of the OS, namely to run multiple programs at the same time, and taking care of giving each of those programs a fair share of CPU time (note that most modern OSs are multi-task OSs).

If such an OS has a multi-core CPU, it can take advantage of that fact by truly running multiple applications at the same time (by running them on different cores).
0
 
itsmeandnobodyelseConnect With a Mentor Commented:
>>>> multi-tasking was only "pseudo-multi-tasking".
Even for one processor and one core, any modern computer will run at least 10 to 100 processes (each process with at least one thread) same time. The switching between threads is so fast that in most cases it makes no difference whether processes run concurrently or mutually exclusive.  So it seems to me the ability of an operation system to run multiple 'tasks' concurrently cannot be called a 'pseudo-multitasking'. It includes a very fast scheduling and a complete separation of each task (of course beside of usage of shared resources).

If any pair of threads were sharing the same piece of memory they would need to synchronize access to that memory regardless whether the threads were running on different cores or on the same core. If they do not it could happen that thread 1 reads a value nearly same time than thread 2 makes an update to that value. Hence any further update made by thread 1  was based on wrong information.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
sistemuConnect With a Mentor Commented:
I apologize, I didn't use in the proper place the pseudo prefix :D It's a partially-altered memory from high-school where we learned that even though multitasking OS's run many processes simultaneously, it's in fact only pseudo-simultaneous (till the appearance of multi-core and multi-CPU computers) because on a core only one thread can run at a particular moment.
0
 
itsmeandnobodyelseConnect With a Mentor Commented:
>>>> I apologize
You must not. It is true that with multi-processors and multi-cores there is a new quality as the operation system needs to synchronize and manage the cores and their access to all shared resources. My point is that for the application development there is little difference whether the multi-tasking happens at one core or at different cores. One difference is that incrementing a global integer can no longer be expected to happen as an atomic operation. You may argue that you can't expect that on a single-core either but actually I made a 24-hour test a few years ago and never had one single case where two threads would read the same global value but only one incrementation was performed.  I was talking from synchronization code like

      while (++g_sync > 1)
      {
            // coming here two threads have incremented nearly same time
            // redo the incrementation and try again
            --g_sync;
      }

It was in 1983 when I first used code like the above on a multi-processor machine (VAX8350). And once in a few months it actually happened that two clients both tried to communicate with the database server what led to a database communication error (thus we found it out). We changed the above code to

       while (atomic_increment(g_sync) > 1)
      {
            // coming here two threads have incremented nearly same time
            // redo the incrementation and try again
            atomic_decrement(g_sync);
      }

and it worked.
0
 
F-J-KAuthor Commented:
Great!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.