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
Gnoma [55]
3 years ago
11

2- There are many different design parameters that are important to a cache’s overall performance. Below are listed parameters f

or different direct-mapped cache designs. Cache Data Size: 32 KiB Cache Block Size: 2 words Cache Access Time: 1 cycle Calculate the total number of bits required for the cache listed above, assuming a 32-bit address. Given that total size, find the total size of the closest direct-mapped cache with 16-word blocks of equal size or greater. Explain why the second cache, despite its larger data size, might provide slower performance than the first cache. You must show your work
Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
5 0

Answer:

1. 2588672 bits

2. 4308992 bits

3. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

Explanation:

1. Number of bits in the first cache

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^15 (1+14+(32*2^1)) = 2588672 bits

2. Number of bits in the Cache with 16 word blocks

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^13(1 +13+(32*2^4)) = 4308992 bits

3. Caches are used to help achieve good performance with slow main memories. However, due to architectural limitations of cache, larger data size of cache are not as effective than the smaller data size. A larger cache will have a lower miss rate and a higher delay. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

You might be interested in
In the Word 2016 window, where is the Status bar located?
klasskru [66]

Answer:

I hope this helps

Explanation:

The answer is B

4 0
3 years ago
Take some time to do some research about small businesses in your area. Select one and using HTML design a simple site that educ
lina2011 [118]

Answer:

All you have to do is whright about it

Explanation:

3 0
2 years ago
Write a program that reads numbers from a file (or allow user to input data) and creates an ordered binary tree. The program sho
IgorLugansk [536]

Answer:

See explaination

Explanation:

include<bits/stdc++.h>

using namespace std;

typedef struct Node

{

int data;

struct Node *left,*right;

}Node;

bool search(Node *root,int data)

{

if(root==NULL)

return false;

if(root->data==data)

return true;

queue<Node*> q;

q.push(root);

while(!q.empty())

{

Node *temp=q.front();

q.pop();

if(temp->data==data)

return true;

if(temp->left)

q.push(temp->left);

if(temp->right)

q.push(temp->right);

}

return false;

}

Node *insert(Node *root,int data)

{

if(root==NULL)

{

Node *temp=new Node();

temp->data=data;

temp->left=NULL;

temp->right=NULL;

return temp;

}

if(data < root->data)

root->left=insert(root->left,data);

if(data>root->data)

root->right=insert(root->right,data);

return root;

}

Node *get_smallest_element_right_subtree(Node *root)

{

while(root && root->left!=NULL)

root=root->left;

return root;

}

Node *delete_node(Node *root,int data)

{

if(root==NULL)

return root;

if(data < root->data)

root->left=delete_node(root->left,data);

else if(data > root->data)

root->right=delete_node(root->right,data);

else

{

if(root->left==NULL) //If right only presents means - delete the curr node and return right node

{

Node *temp=root->right;

free(root);

return temp;

}

else if(root->right==NULL) //If left only presents means - delete the curr node and return let node

{

Node *temp=root->left;

free(root);

return temp;

}

else

{

Node *temp=get_smallest_element_right_subtree(root->right);

root->data=temp->data;

root->right=delete_node(root->right,temp->data);

}

return root;

}

}

void inorder(Node *root)

{

if(root!=NULL)

{

inorder(root->left);

cout<<root->data<<" ";

inorder(root->right);

}

}

void postorder(Node *root)

{

if(root!=NULL)

{

inorder(root->left);

inorder(root->right);

cout<<root->data<<" ";

}

}

void preorder(Node *root)

{

if(root!=NULL)

{

cout<<root->data<<" ";

inorder(root->left);

inorder(root->right);

}

}

int main()

{

fstream f;

string filename;

cout<<"\n\n1 - Input through File ";

cout<<"\n\n2 - Input through your Hand";

int h;

cout<<"\n\n\nEnter Your Choice : ";

cin>>h;

Node *root=NULL; // Tree Declaration

if(h==1)

{

cout<<"\n\nEnter the Input File Name : ";

cin>>filename;

f.open(filename.c_str());

if(!f)

cout<<"\n\nError in Opening a file !";

else

{

cout<<"\n\nFile is Being Read ........";

string num;

int value;

int node=0;

while(f>> num)

{

value=stoi(num);

root=insert(root,value);

node++;

}

cout<<"\n\nTree has been successfully created with : "<<node<<" Nodes"<<endl;

}

}

if(h==2)

{

int y;

cout<<"\n\nEnter the Total No of Input :";

cin>>y;

int i=1,g;

while(i!=y+1)

{

cout<<"\n\nEnter Input "<<i<<" : ";

cin>>g;

root=insert(root,g);

i++;

}

cout<<"\n\nTree has been successfully created with : "<<y<<" Nodes"<<endl;

}

if(h>=3)

{

cout<<"\n\nInvalid Choice !!! ";

return 0;

}

int n=0;

while(n!=6)

{

cout<<"\n\n\n1 - Insert Element";

cout<<"\n\n2 - Remove Element";

cout<<"\n\n3 - Inorder (LNR) Display ";

cout<<"\n\n4 - Pre (NLR) Order Display";

cout<<"\n\n5 - Post (LRN) Order Display";

cout<<"\n\n6 - Quit";

cout<<"\n\nEnter Your Choice : ";

cin>>n;

switch(n)

{

case 1:

{

int k;

cout<<"\n\nEnter Element to insert : ";cin>>k;

root=insert(root,k);

cout<<"\n\nElement Sucessfully Inserted !!!!!";

break;

}

case 2:

{

int k;

cout<<"\n\nEnter Element to Remove : ";

cin>>k;

if(search(root,k))

{

root=delete_node(root,k);

cout<<"\n\nValue Successfully Deleted !!!";

}

else

cout<<"\n\n!!!!!!!!!!!!!!!!!!!! No Such Element !!!!!!!!!!!!!!!!!!!!!!";

break;

}

case 3:

{

cout<<"\n\nThe Elements (LNR) are : ";

inorder(root);

break;

}

case 4:

{

cout<<"\n\nThe Elements (NLR) are : ";

preorder(root);

break;

}

case 5:

{

cout<<"\n\nThe Elements (LRN) are : ";

postorder(root);

break;

}

case 6:

{

break;

}

}

}

cout<<"\n\nBye!!!! See You !!!"<<endl;

7 0
3 years ago
A cycle merchant allows 15% discount on the marked price of a bicycle and still he makes a profit
lions [1.4K]

Answer:

The program in Java is as follows:

public class Main{

public static void main(String[] args) {

 double discount_percent = 0.15;

 double discount_amount = 600;

 double profit = 0.20;

 double marked_price = discount_amount/discount_percent;

 double cost_price = marked_price/(1 + profit);

 System.out.println("Marked Price: "+marked_price);

 System.out.println("Cost Price: "+cost_price);

}}

Explanation:

For explanation purpose, let

MP \to Marked Price

\%D \to Percentage discount

D \to Discounted amount

\%P \to Percentage Profit

C \to Cost Price

The marked price (i.e. selling price) is calculated discount using:

MP = \frac{D}{\%D}

The derived formula of the cost price from percentage profit and Marked Price is:

C = \frac{M}{1 + \%P * 100}

So, the explanation is as follows:

The next three lines declare and initialize the given parameters

<em>  double discount_percent = 0.15;</em>

<em>  double discount_amount = 600;</em>

<em>  double profit = 0.20;</em>

Calculate marked price

 double marked_price = discount_amount/discount_percent;

Calculate cost price

 double cost_price = marked_price/(1 + profit);

Print marked price

 System.out.println("Marked Price: "+marked_price);

Print Cost price

 System.out.println("Cost Price: "+cost_price);

3 0
2 years ago
Which layer defines an interface that applications can use to request network services, rather than referring directly to applic
Scrat [10]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
4 0
3 years ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • __________ ensure that hardware and software produced by different vendors work together.
    14·1 answer
  • What is thhe name of service included with windows server operating systemthat manages a centralized database containing user ac
    5·1 answer
  • Briefly explain what are JavaScript librairies​
    12·1 answer
  • Write a question that the database will understand. Which records are not equal to 5? &lt; 5 &gt; 5 &gt; =5 &lt; &gt; 5
    15·1 answer
  • Create an application that determines the final cost of food items and non-food items, assuming only non-food items are taxed. T
    8·1 answer
  • Instruction: Decide what the total marketing budget will be, and make a list of at least four things you will spend money on and
    15·1 answer
  • Can you explain the difference between software and hardware? Tell me 3 examples of each one.
    10·1 answer
  • Which type of GUI control would be best to use if you wanted the user to select one date from a list of three possible dates to
    5·1 answer
  • When working with track changes, what is the difference between simple markup and all markup?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!