Answer to Question #249652 in C++ for John Rivers

Question #249652

Many programming languages, especially older ones, provide no language support for concurrency. C and C++ are examples of such languages. Is it essential that a language include syntax for concurrency to be able to write concurrent programs in that language? If not, how is it accomplished? What are the advantages and disadvantages of including support for concurrency in a language?


1
Expert's answer
2021-10-11T05:53:53-0400

It is not essential that a language include syntax for concurrency to be able to write concurrent programs in that language. It is accomplished by designing programs as independent processes working together in a specific composition.

Advantages

  1. Several jobs are completed at the same time.
  2. Supports time-sharing
  3. Scheduling becomes easy and processes are independent of a task and do not have to wait for it to finish.
  4. User can interact with application while tasks are running.
  5. It has availability of services.

Disadvantages


  1. Debugging is difficult.
  2. High complexity of the code.
  3. Deadlocks or race conditions may occur between processes.
  4. Concurrent tasks may corrupt consistent state of the program.
  5. Concurrent programs will run slower

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS