Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Q1. Assume that we have a processor with hardware cache memory. Assume that a program is run by the CPU and this generates 500,000 memory references, out of which 475,000 hits the cache memory. Assume that average memory access time is 70 ns and cache access time 20 ns, of which 10 ns are for look-up. Assume that the system follows the prepare-through policy.

a) Illustrate the hit ratio?

b) Illustrate the average memory reference time as seen by the CPU if:

i) All the memory references are read
ii) 80% of the memory references are read
iii) 90% of the memory references are read

Q2. Consider the given resource-allocation state comprising five processes and five resources. Total[j] specifies that the total number of instances of resource j (comprising both allocated and free instances). Alloc[i, j] symbolizes the number of instances of resource j presently assigned to process i. Req[i, j] symbolizes the number of instances of resource j that process i is presently requesting. Find out which processes (if any) are deadlocked.

Total = [11, 10, 6, 9, 6]

Alloc = [ [1, 0, 2, 4, 1], [0, 1, 0, 2, 3], [0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [1, 0, 0, 1, 2] ]

Req = [ [1, 5, 4, 2, 2], [1, 0, 0, 7, 2], [8, 8, 2, 0, 0], [6, 6, 6, 6, 6], [7, 3, 0, 1, 0] ]

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M911462

Have any Question? 


Related Questions in C/C++

Text exercise 413 gas mileagebulldrivers are concerned with

Text Exercise 4.13 (Gas Mileage) • Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several trips by recording miles driven and gallons used for each trip. Develop a C++ ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

Problem 1overview for problem 1a of this assignment you

Problem #1 Overview: For problem 1(a) of this assignment, you will need a C++ compiler. In order to receive credit, your program must compile and run; and you must provide the actual source code file so that I can compil ...

1 write a program to find the sum amp average of the given

1) Write a program to find the sum & average of the given numbers using the while loop. 2) Write a program in C to find the sum and average of the given numbers stored in an array of n values.

Computer programming assignment-q1 using for loop write a c

Computer Programming Assignment- Q1. Using for loop, write a C++ program that prints out the multiples of 3 up through 75, separated by a blank space.  3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 ...

Computer scienceprogram-write a c program that willpresent

Computer Science Program- Write a C++ program that will: Present the user with a menu of choices: 1. Random number 2. String 3. Type Casting 4. Integer Math Then, in an if-else if structure (or switch) write the code for ...

Cs492 programming assignment-the program must be written in

CS492 Programming Assignment- The program must be written in C or C++, and run on a linux machine. ALL source code you submit must be well documented (documentation is an indicator of understanding!) Programs that cannot ...

For this program you will add and test 2 new member

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, intpos) Assuming that the positions of elements of a list beg ...

Discussion questonsplease respond to all of the following

Discussion Questons Please respond to all of the following prompts: • How are input and output accomplished in C++? • How do cin and cout relate to ostream and istream? Lab Activity 1. Write a C++ program per the require ...

1 learner objectivesat the conclusion of this programming

1. Learner Objectives: At the conclusion of this programming assignment, participants should be able to: * Apply repetition structures within an algorithm * Construct while (), for (), or do-while () loops in C * Compose ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate