1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
V125BC [204]
2 years ago
8

Which threading model is best for achieving true parallelism and how?

Computers and Technology
1 answer:
WITCHER [35]2 years ago
7 0

Answer:

The explantion of this question is given below in the explanation section.              

Explanation:

Parallelism means that an application is split into smaller subtasks that can be processed in parallel on multiple CPU at the same time. Parallelism is related to application handling individual tasks on multiple CPUs. To achieve true parallelism your application must have more than one thread running, schedule the task into other threads, graphics cards, and CPU, etc.  

It is noted that parallelism is a concept while multiple threading in computer programing is its implementation. Some operating systems provide a multiple threading that combined the user-level thread and kernel-level thread facility. In such a system, multiple threads within the same application can run in parallel on multiple CPU or processors

There are three types of Multithreading Model

• Many to many relationships.

• Many to one relationship.

• One to one relationship.

Many to many relationship

This model multiplexes any number of user threads onto an equal or smaller number of kernel threads. However, this model provides the best accuracy to concurrency. However, using this model, true parallelism can be achieved, if the system has multiprocessor.  

Many to One model

This model maps the user-level threads to one kernel-level thread and its management is done in userspace by the thread library. In this model, only one thread can access the Kernal at a time, so multiple threads are unable to run on multiple CPU in parallel.  

One to one relationship

This model provides one to one relationship between the user and kernel-level thread. This model is better than the many-to-one model. It allows another thread to execute when a thread makes a blocking system call. However, it supports multiple threads to execute in parallel on the microprocessor. This model provides true parallelism.  

                                                                  

You might be interested in
What is the difference between the (BIOS) basic.input.output.system and R.O.M
abruzzese [7]
EX: A BIOS is a file used to make an emulator work properly. <span>A ROM is a copy of a game downloadable online.</span>
6 0
3 years ago
When do we use an if- statement ​
wel

Answer:

You'd use an if statement if something happens. What I mean is that {If this happens} Then that happens but if the if doesnt happen then the then doesnt happen

Explanation:

3 0
3 years ago
Read 2 more answers
If the object instance is created in a user program, then the object instance can access both the public and private members of
rewona [7]

Answer:

False

Explanation:

The private member of a class is not accessible by using the Dot notation ,however the private member are those which are not accessible inside the class they are accessible outside the class  .The public member are accessible inside the class so they are accessible by using the dot operator .

<u>Following are the example is given below in C++ Language </u>

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {     return 3.14*r*r;  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 3.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Output:

compile time error is generated

<u>The correct program to access the private member of class is given below </u>

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {    

r1=r;

double t2=3.14*r2*r2;

return(t2); // return the value  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 1.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Therefore the given statement is False

5 0
3 years ago
A server is a special kind of computer that manages access to resources such as files, applications, peripherals, emails, and we
Basile [38]

Answer:

true

Explanation:

6 0
2 years ago
Read 2 more answers
For this exercise, you are going to complete the printScope() method in the Scope class. Then you will create a Scope object in
iragen [17]

Answer:

Explanation:

The following is the entire running Java code for the requested program with the requested changes. This code runs perfectly without errors and outputs the exact Sample Output that is in the question...

public class ScopeTester

{

public static void main(String[] args)

{

       Scope scope = new Scope();

       scope.printScope();

}

}

public class Scope

{

private int a;

private int b;

private int c;

public Scope(){

a = 5;

b = 10;

c = 15;

}

public void printScope(){

       System.out.println("a = " + a);

       System.out.println("b = " + b);

       System.out.println("c = " + c);

       System.out.println("d = " + getD());

       System.out.println("e = " + getE());

}

public int getA() {

return a;

}

public int getB() {

return b;

}

public int getC() {

return c;

}

public int getD(){

int d = a + c;

return d;

}

public int getE() {

int e = b + c;

return e;

}

}

4 0
2 years ago
Other questions:
  • In a social networking site your personal information is listed under your inbox. home. status. profile.
    11·1 answer
  • Which of the following is not a job title associated with a career in visual and audio technology? master control operator produ
    9·1 answer
  • Write a function that will alphabetize a string WITHOUT using the sort function :
    7·1 answer
  • If you cause a car accident, which type of insurance will require you to pay the least out of pocket?
    5·2 answers
  • What is the meaning of photography​
    5·2 answers
  • Using a third-party package of your choice, write a program that reads the contents of a csv file and saves it to an Excel file.
    10·1 answer
  • Create a paper of at least 1,800 words describing the situation you selected and explaining the logic that would support an arra
    15·1 answer
  • Anyone who know hacking​
    7·1 answer
  • You are starting a small web hosting business and
    11·1 answer
  • List and briefly define the four main elements of a computer.​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!