Open In App

Challenges in programming for Multicore system

Last Updated : 19 May, 2022
Comments
Improve
Suggest changes
6 Likes
Like
Report

Multicore System consists of two or more processors which have been attached to a single chip to enhance performance, reduce power consumption, and more efficient simultaneous processing of multiple tasks. Multicore system has been in recent trend where each core appears as a separate processor. Multicore system is capable of executing  more than one threads parallelly whereas in Single core system only one thread can execute at a time. 

Implementing Multicore system is more beneficial than implementing single core system by increasing number of transistors on single chip to enhance performance because increasing number of transistors on a single chip increases complexity of the system. 


Challenges of multicore system : 
Since multicore system consists of more than one processors, so the need is to keep all of them busy so that you can make better use of multiple computing cores. Scheduling algorithms must be designed to use multiple computing core to allow parallel computation. The challenge is also to modify the existing and new programs that are multithreaded to take advantage of multicore system. 

In general five areas present challenges in programming for multicore systems : 

  1. Dividing Activities : 
    The challenge is to examine the task properly to find areas that can be divided into separate, concurrent subtasks that can execute parallelly on individual processors to make complete use of multiple computing cores. 
     
  2. Balance : 
    While dividing the task into sub-tasks, equality must be ensured such that every sub-task should perform almost equal amount of work. It should not be the case that one sub task has a lot of work to perform and other sub tasks have very less to do because in that case multicore system programming may not enhance performance compared to single core system. 
     
  3. Data splitting : 
    Just as the task is divided into smaller sub-tasks, data accessed and manipulated by that task must also be divided to run on different cores so that data can be easily accessible by each sub-tasks. 
     
  4. Data dependency : 
    Since various smaller sub-tasks run on different cores, it may be possible that one sub-task depends on the data from another sub tasks. So the data needs to be examined properly so that the execution of whole task is synchronized. 
     
  5. Testing and Debugging : 
    When different smaller sub-tasks are executing parallelly, so testing and debugging such concurrent tasks is more difficult than testing and debugging single threaded application. 
Suggested Quiz
4 Questions

Which of the following is a major challenge when dividing a task for multicore execution?

  • A

    Ensuring tasks run in a single thread

  • B

    Finding subtasks that can run concurrently

  • C

    Reducing the number of processors used

  • D

    Increasing sequential execution

Explanation:

The task must be divided into independent concurrent subtasks to utilize multiple cores.

The challenge of Balance in multicore programming refers to:

  • A

    Assigning more work to faster cores

  • B

    Ensuring each subtask performs nearly equal work

  • C

    Giving priority to I/O-bound tasks

  • D

    Reducing the number of subtasks

Explanation:

Uneven subtasks reduce performance and fail to utilize multicore systems effectively.

Why is Data Splitting important in multicore systems?

  • A

    It allows each core to access the required data easily

  • B

    It reduces the number of threads

  • C

    It eliminates the need for synchronization

  • D

    It combines all subtasks into one process

Explanation:

Data must be divided so each core can access what it needs without conflicts.

Which challenge arises when one subtask relies on data produced by another subtask?

  • A

    Load balancing

  • B

    Pipeline hazard

  • C

    Task merging

  • D

    Data dependency

Explanation:

Subtasks depending on each other's data require careful synchronization.

Quiz Completed Successfully
Your Score :   2/4
Accuracy :  0%
Login to View Explanation
1/4 1/4 < Previous Next >

Article Tags :

Explore