Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Pir Mehr Ali Shah

Arid Agriculture University, Rawalpindi


Office of the controller of Examinations
Final Exam (Theory)/ Fall 2020 (Paper Duration 24 hours)
To be filled by Teacher

Course No.: … CS-532… Course Title:…… Computer Architecture ……………


Total Marks: 60…… Date of Exam:…...10-02-2021 to 11-02-2021 .........
Degree: ………BSCS………. Semester:………5th……… Section:…..C ……
Marks
Q. No. 1 2 3 4 5 6 7 8 9 10 Obtained/
TotalMarks
Marks
Obtained
Total Marks in Words:
Name of the teacher: Engr. Haji Ahmed
Who taught the course: Signature of teacher / Examiner:

To be filled by Student

Registration No.: ………18-Arid-5157.……… Name:…………………………Ibtasam Mateen Javed……..

Note: Write your Registration No and Name, without Registration No and Name your paper
will not be considered. In case of cheating/copy past your paper will also rejected.

Answer the following questions.

Q.No. 1 (Marks-10)
A designer has a chip available and must decide what fraction of the chip will be devoted to cache
memory (L1, L2, L3). The remainder of the chip can be devoted to a single complex superscalar and/or
SMT core or multiple somewhat simpler cores. Define the following parameters:
n = maximum number of cores that can be contained on the chip
k = actual number of cores implemented (1 … k … n, where r = n/k is an integer)
perf (r) = sequential performance gain by using the resources equivalent to r cores to form a single
processor, where perf(1) = 1.
f = fraction of software that is parallelizable across multiple cores.
Thus, if we construct a chip with n cores, we expect each core to provide sequential performance of 1
and for the n cores to be able to exploit parallelism up to a degree of n parallel threads. Similarly, if the
chip has k cores, then each core should exhibit a performance of perf(r) and the chip is able to exploit
parallelism up to a degree of k parallel threads. We can modify Amdhal’s law to reflect this situation as
follows:

a. Justify this modification of Amdahl’s law.


b. Using Pollack’s rule, we set perf(r) = √𝑟 Let n = 32. We want to plot speedup as a function of r for f
= 0.45; f = 0.65; f = 0.85; f = 0.9; f = 0.95. The results are available in a document at this book’s Premium
Content site (multicore-performance. pdf). What conclusions can you draw?
c. Repeat part (b) for n = 512.
Answer:
Q.No. 2 (Marks-10)
Briefly define the following addressing modes with examples.
(a) Direct Addressing
(b) Indirect addressing
(c) Register Indirect addressing
(d) Relative addressing
(e) Displacement addressing
Answer:
Q.No. 3 (Marks-10)

Let a be the percentage of program code that can be executed simultaneously by n processors in a
computer system. Assume that the remaining code must be executed sequentially by a single
processor. Each processor has an execution rate of x MIPS.
a. Derive an expression for the effective MIPS rate when using the system for exclusive execution of
this program, in terms of n, a, and x.
b. If n = 32 and x = 16 MIPS, determine the value of a that will yield a system performance of 80
MIPS.

Answer:
Q.No. 4 (Marks-10)

Consider the following loop:


S := 100;
for K := 100 to 500 do
S := S - K;
A straightforward translation of this into a generic assembly language would look something like this:
LD R1, 0 ;keep value of S in R1
LD R2,1 ;keep value of K in R2
LP SUB R1, R1, R2 ;S := S - K
BEQ R2, 100, EXIT ;done if K = 500
ADD R2, R2, 1 ;else increment K
JMP LP ;back to start of loop
A compiler for a RISC machine will introduce delay slots into this code so that the processor can
employ the delayed branch mechanism. The JMP instruction is easy to deal with because this
instruction is always followed by the SUB instruction; therefore, we can simply place a copy of the
SUB instruction in the delay slot after the JMP. The BEQ presents a difficulty. We can’t leave the
code as is, because the ADD instruction would then be executed one too many times. Therefore, a
NOP instruction is needed. Show the resulting code.

Answer:
Q.No. 5 (Marks-10)

A nonpipelined processor has a clock rate of 5 GHz and an average CPI (cycles per instruction) of 8.
An upgrade to the processor introduces a five-stage pipeline.
However, due to internal pipeline delays, such as latch delay, the clock rate of the new processor has
to be reduced to 2.5 GHz.
a. What is the speedup achieved for a typical program?
b. What is the MIPS rate for each processor?

Answer:
Q.No. 6 (Marks-10)

Explain your semester project in detailed including, what are the major software’s and hardware’s used
in your project, worth of your project, what further enhancement possible in your project. Also provide
the code with results if you implemented your project with coding.

Answer:

Project A:

Game: Jungle ball Run

Software used: Buildbox, PhotoShop.

References: Internet (Youtube)

Introduction :

BuildBox is an game developing engine. Its use’s node base coding and backend coding
is done on JavaScript.

About Game:

This game is based on platform game its mainly a distance game you get points by
collecting points in it.

Things used in it:

Main Character (Ball)

Enemy (Blades, cactuses, Bombs)

The Main:

This is the main page here you see the small boxes those are called Nodes, Each node
represents a specific function. These are also called UI nodes.

Start Node
Main Menu Node

2D World Node

Score Node

Game Over Node

Start Node:

Its is the main node here it starts all its functions.

Main Menu:

Its is the second node it shows the main menu. Here all the starting stuff shows like
Buttons etc.
2D world:

It is the most important node of all in this node we do all designing of game. All the game
Characters of games background all the stuff are add here.

Score Node

This node is responsible for the Scores in the game.


Game Over Node

This node is the Game Over node when the player is defeated this node appears on the
screen and shows the best and current Score.

Project 2:

Website: MeltoCheese

Software Used: Wordpress,Plugin’s.

Melto Cheese is an online cheese platform. We take great pride in offering the best
experience of online cheese ordering by ensuring that you only receive genuine products.
You will find hundreds of ideas about cheese products and recipes. The melto cheese is, we
hope, an antidote to the often, impersonal experience of modern supermarket shopping.
We seek to take our customers back to an age when supermarkets did not exist and people
were on first name terms with their fishmonger, butcher, and greengrocer. We value each
and every one of our customers and are passionate about the cheese that we sell. Read for
yourself what our customers think about our service. The melto cheese market is started to
provide artisan, mouth-watering cheeses from around the country available to everyone at
just a click of a button.

The melto cheese delivers that personal touch, so whether you are looking for just one
piece of perfect cheese or a cheeseboard for 75 our friendly and knowledgeable staff will
help you pick what’s right for you. Our philosophy is to enjoy the finer things in life and we
would like to share this passion for
cheese with you! Visit our online shop. Stay Connected.

Inspired meltocheese. Sourced for the exceptional craft.

We aspire to deliver the finest gourmet cheese to elevate your cooking and make the
food moments in your life a bit more special.

Project Report on Processed Cheese includes Present Market Position and Expected
Future Demand, Technology, Manufacturing Process, Investment Opportunity, Plant
Economics and Project Financials. Report provides a comprehensive analysis from
industry covering detailed reporting and evaluates the position of the industry by
providing insights to the SWOT analysis of the industry.

Each report include Plant Capacity, requirement of Land & Building, Plant & Machinery,
Flow Sheet Diagram, Raw Materials detail with suppliers list, Total Capital Investment
along with detailed calculation on Rate of Return, Break-Even Analysis and Profitability
Analysis. The report also provides a birds eye view of the global industry with details on
projected market size and then progresses to evaluate the industry in detail

Project Report on Processed Cheese gives you access to decisive data such as:

• Market growth drivers


• Factors limiting market growth

• Current market trends

• Market structure

• Key highlights

Overview of key market forces propelling and restraining market growth:

• Up-to-date analyses of market trends and technological improvements

• Pin-point analyses of market competition dynamics to offer you a


competitive edge major competitors

• An array of graphics, BEP analysis of major industry segments

• Detailed analyses of industry trends

• A well-defined technological growth with an impact-analysis

• A clear understanding of the competitive landscape and key product segments

The report also points out the latest trends in the Worldwide 'processed cheese' market
and the various opportunities for the 'processed cheese' market to grow in the near
future. The report takes help of various analytical tools to predict the 'processed cheese'
market growth of the market during the forecast period.
<h2><strong>Ingredients:</strong></h2>

<ul>

<li>1 sliced onion</li>

<li>4 slices cheese slices</li>

<li>1 teaspoon powdered garam masala powder</li> <li>2 teaspoon refined oil</li> <li>1/2
gm ginger paste</li>

<li>4 halved burger buns</li>

<li>2 tablespoon tomato ketchup</li>

<li>1/2 teaspoon garlic paste</li>

</ul>
<ul>

<li>1 sliced tomato</li>

<li>2 teaspoon powdered red chili</li>

<li>2 pinch powdered salt</li>

<li>3 tablespoon breadcrumbs</li>

<li>1 teaspoon lemon juice</li>

<li>3 tablespoon butter</li>

<li>1 handful chopped coriander leaves</li> <li>4 leaves lettuce loose-leaf</li>

</ul>

<h2><strong>For The Core Dish</strong></h2> <ul>

<li>1/2 peeled, sliced cucumber</li>

<li>2 chopped onion</li>

<li>1/2 cup shelled peas</li>

</ul>

<ul>

<li>2 pounded, simmered, skinned potato</li> <li>2 chopped carrot</li> <li>1/2 cup
corn</li>

</ul>

<h4><strong>METHOD</strong></h4>

<ul>

<li>Total Time1h</li>

</ul>

<ul>

<li>Prep Time20 m</li>

</ul>

<ul>

<li>Calories244</li>

</ul>

<h4><strong>Step 1</strong></h4>

To make the burger patty, pressure cooks the carrot, peas, and sweet corn for 1 whistle or
until soft.
Delicious, lip-smacking, and crunchy these words will only remind you of this amazing
American dish popularly known as Burger.

No matter how you prepare a burger, this dish is will leave you craving for more each time
you eat it you have it. So, this time when your kids want to relish something good and
delicious at home, prepare this simple yet delicious Vegetable Burger recipe.

Not only is this dish delicious, but at the same time preparing it at home simply amps up the
health quotient.

[caption id="attachment_689" align="aligncenter" width="408"]<img class=" wp-image-689"


src="https://meltocheese.com/wp-content/uploads/2020/11/Vegetable-Burger-
300x200.gif" alt="Vegetable-Burger" width="408" height="272" /> Vegetable-
Burger[/caption]

The best thing about preparing this quick Vegetable Burger at home is that you can add your
own twist of flavors and ingredients to it. For instance, if you are fond of cheesy sauces, you
can use a cheesy mayo and a cheese slice and let it melt.

To make it even more delicious you can add any sauce or condiment of your choice. It also
makes for a simple snack dish, whenever those untimely hunger pangs strike.

If you are on your fat loss journey then, this can certainly be your companion, all you need
to do is just tweak the recipe as per your preference and avoid fatty substances.

Also, prepare the patty in a microwave by just brushing some oil, this will bring down the
calorie count like anything! Made with fresh veggies and a few spices, this snack recipe is
apt for school lunch boxes, road trips, and games nights.

Kids will certainly love this easy recipe! So, try out this easy recipe and enjoy it with your
loved ones.

Code:

<h2><strong>More recipes for a burger</strong></h2>

<ol>

<li><span style="color: #3366ff;"><strong><a style="color: #3366ff;"


href="https://meltocheese.com/cheese-burger-
2/">Cheeseburger</a></strong></span></li>

<li><a href="https://meltocheese.com/definitive-burger/"><span style="color:


#3366ff;"><strong>Definitive Burger</strong></span></a></li>

<li><span style="color: #3366ff;"><strong><a style="color: #3366ff;"


href="https://meltocheese.com/the-flawless-elementary-burger/">The Flawless Elementary
Burger</a></strong></span></li>

<li><span style="color: #3366ff;"><a style="color: #3366ff;"


href="https://meltocheese.com/cheese-
burger/"><strong>Cheeseburger</strong></a></span></li>

<li><a href="https://meltocheese.com/standard-homebased-burger-recipe/"><span
style="color: #3366ff;"><strong>Standard home-based burger
recipe</strong></span></a></li>
<li><a style="font-size: 1rem;" href="https://meltocheese.com/onion-cheese-
burger/"><strong><span style="color: #3366ff;">Onion cheese
burger</span></strong></a></li>

<li><span style="color: #3366ff;"><strong><a style="color: #3366ff;"


href="https://meltocheese.com/flawless-burger-recipe/">Flawless Burger
Recipe</a></strong></span></li>

</ol>

<h2><strong>Ingredients</strong></h2>

<ul>

<li>½ tbsp olive oil</li>

<li>1 onion, peeled and finely chopped</li> <li>1 x 500g pack Beef Steak Mince</li> <li>1 tsp
mixed dried herbs</li> <li>1 egg, beaten</li>

<li>4 slices mature Cheddar (optional)</li> <li>4 white rolls</li>

<li>few round lettuce leaves, torn</li>

<li>1 beef tomato, sliced</li>

<li>ketchup, to serve (optional)</li>

</ul>

[caption id="attachment_659" align="aligncenter" width="381"]<img class=" wp-image-659"


src="https://meltocheese.com/wp-content/uploads/2020/11/Standard-homebased-burger-
recipe-244x300.jpg" alt="Standard-homebased-burger-recipe" width="381" height="468" />
Standard-home-based-burger-recipe[/caption]
<h2><strong>Me</strong><strong>thod</strong></h2>

<ol>

<li>heat the olive oil in a boiling pan, add the onion, and heat for 5 minutes until softer and
starting to go golden. Set aside.</li>

<li>In a bowl, associate the beef mince with the herbs and the egg. Season, add the onions,
and mix well. Using your hands, shape into 4 patties.</li>

<li>Cook the burgers on a warmed griddle for 5-6 minutes on each side. Although the
second side is cooking, place a slice of cheese on top to soften slightly.</li>

<li>Temporarily, casually toast the sides of the buns on the grill. Fill with the cabbage,
burgers, and tomato slices. Serve with ketchup.</li>

</ol>

<h2><strong>More recipes for a burger</strong></h2>

&nbsp;

<ul>

<li><a href="https://meltocheese.com/definitive-burger/"><span style="color:


#3366ff;"><strong>Definitive Burger</strong></span></a></li>

<li><a href="https://meltocheese.com/flawless-burger-recipe/"><strong><span
style="color: #3366ff;">Flawless Burger Recipe</span></strong></a></li>

<li><a href="https://meltocheese.com/cheese-burger/"><span style="color:


#3366ff;"><strong>Cheeseburger</strong></span></a></li>
<li><span style="color: #3366ff;"><strong><a style="color: #3366ff;"
href="https://meltocheese.com/the-flawless-elementary-burger/">The Flawless Elementary
Burger</a></strong></span></li>

<li><a href="https://meltocheese.com/cheese-burger-2/"><span style="color:


#3366ff;"><strong>Cheeseburger</strong></span></a></li>

<li><span style="color: #3366ff;"><strong><a style="color: #3366ff;"


href="https://meltocheese.com/vegetable-burger/">Vegetable Burger
</a></strong></span></li>

<li><a href="https://meltocheese.com/onion-cheese-burger/"><strong><span style="color:


#3366ff;">Onion cheese burger</span></strong></a></li>

</ul>

You might also like