542 views

1 Answer

2 votes
2 votes
  • Both are a form of an operating system. Sometimes, to complete a task, both methods needed to finish the task and sometimes one. The priority to select, which form is better, depends upon the requirement of system and according to that operating system coding created.

Yes, it is possible to have concurrency but not parallelism.

Concurrency:

Concurrency means where two different tasks or threads start working together in an overlapped time period, however, it does not mean they run at same instant.

Example:

Multi-task switch on a single-cored processor

In a Concurrency, minimum two threads are to be executed for processing.

A more generalized form of parallelism includes time-slicing which is a form of virtual parallelism.

Explanation:

Consider a scenario where Process 'A' and 'B' have four different task P1, P2, P3, and P4. So in order to go for execution, first Process 'A' of P1 executes, then Process 'B' of P1 executes, Secondly, Process 'A' of P2 executes, then Process 'B' of P2 executes and goes on until all the threads are finished for their execution.

Parallelism:

Parallelism is where two or more different tasks start their execution at the same time. It means that the two tasks or threads start working simultaneously.

Example:

Multi-cored Processor

Explanation:

Consider a Scenario, where Process 'A' and 'B' and each have four different tasks P1, P2, P3, and P4, so both process go for simultaneous execution and each works independently.

Therefore, concurrency can be occurring number of times which are same as parallelism if the process switching is quick and rapid. So, yes, it is possible to have concurrency but not parallelism.

Related questions

0 votes
0 votes
1 answer
2
akash.dinkar12 asked Mar 19, 2019
3,919 views
Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing cores and (b) four processing cores.
1 votes
1 votes
2 answers
3
akash.dinkar12 asked Mar 19, 2019
435 views
Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single processor system ? Explain.
0 votes
0 votes
0 answers
4
akash.dinkar12 asked Mar 19, 2019
225 views
Under what circumstances does a multithreaded solution using multiple kernel threads provide better performance than a single-threaded solution on a single-processor syst...