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++

Discussionkeyboard versus file input please respond to the

Discussion "Keyboard versus File Input" Please respond to the following: • Suppose you are designing a C++ application that needs to capture user input specifically via a keyboard or from a file. Determine the method tha ...

Intro to programming in c programming assignmentassignment

Intro to Programming in C Programming Assignment Assignment purpose: User defined functions, pointers, Menu driven program A Company needs to create software for their new line of phone applications. Customers will have ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Assignmentpart acomplete the following questionswrite c

Assignment Part A Complete the following questions: Write C++ code to open a document with the name Hello.txt, place the message "Hello, World!" in the document, and exit the document. Re open the file you closed, and re ...

Programming cc assignmentsyoull need to download this to

Programming C/C++ assignments You'll need to download this To write the program. The programs will be written using the Microsoft Visual C++ Express Edition IDE (Integrated Development Environment), which can be download ...

1 we know that from ece 109 to calculate the

1. We know that from ECE 109, to calculate the equivalent resistance of a network of resistors in series in parallel are given by: Write a C++ program that asks the user to input values for resistors (as many as they wou ...

Write a console-based c program that can be used as a math

Write a console-based C++ program that can be used as a math tutor for a young student. The program should display two random numbers consisting of three digits each to be added in columnar format, such as: 247 +129 ---- ...

Assessment taskthis coursework will allow you to

Assessment Task: This coursework will allow you to investigate some of the issues involved in writing threaded programs. You are to write a series of simple programs in C/C++ that will run under Linux, to illustrate how ...

Write a c program that requests the name of any cartoon

Write a C program that requests the name of any cartoon character from the user, then does the following with that name (use printf for each): a. Displays it enclosed in double quotes. b. Displays it in a field 24 charac ...

Write a program that reads numbers from cin and then sums

Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered. Construct three versions of this program, using the while ,do - while , and for loops. Add the following to your program: ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen