For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 RANK Become Exceptional--gsp215rank.comclaric119
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Effective Communication - tutorialrank.comBartholomew35
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
• Using Google, research the use of parallelism and concurrency in video gaming today. Describe how each
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows,
Gsp 215 Enthusiastic Study / snaptutorial.comStephenson101
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Week 3 Homework Representing and Manipulating Information
GSP 215 Week 3 iLab Machine-Level Representation of Programs
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
Gsp 215 Effective Communication / snaptutorial.comHarrisGeorg21
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 RANK Become Exceptional--gsp215rank.comclaric119
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Effective Communication - tutorialrank.comBartholomew35
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
• Using Google, research the use of parallelism and concurrency in video gaming today. Describe how each
For more course tutorials visit
www.tutorialrank.com
Week 1 HomeworkCommand Line in Windows and Linux
• Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows,
Gsp 215 Enthusiastic Study / snaptutorial.comStephenson101
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Week 3 Homework Representing and Manipulating Information
GSP 215 Week 3 iLab Machine-Level Representation of Programs
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
Gsp 215 Effective Communication / snaptutorial.comHarrisGeorg21
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
Bitwise Operations in Programming - Webinar with dr. Svetlin Nakov (30 April 2020)
Contents:
The 4 groups of software development skills
- Coding, algorithms, development concepts, technologies
Numerals systems
- Decimal, binary, hexadecimal
- Conversion between numeral systems
Bitwise operations (&, I, ^, ~)
- Processing bits in programming
- Reading / writing bits from integers
How to become a software developer?
Blog: https://nakov.com/blog/2020/04/30/bitwise-operations-in-programming-webinar-nakov-april-2020
Video (in Bulgarian): https://youtu.be/svD-eXRVCx8
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Week 3 Homework Representing and Manipulating Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
FOR MORE CLASSES VISIT
www.gsp215rank.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
Bitwise Operations in Programming - Webinar with dr. Svetlin Nakov (30 April 2020)
Contents:
The 4 groups of software development skills
- Coding, algorithms, development concepts, technologies
Numerals systems
- Decimal, binary, hexadecimal
- Conversion between numeral systems
Bitwise operations (&, I, ^, ~)
- Processing bits in programming
- Reading / writing bits from integers
How to become a software developer?
Blog: https://nakov.com/blog/2020/04/30/bitwise-operations-in-programming-webinar-nakov-april-2020
Video (in Bulgarian): https://youtu.be/svD-eXRVCx8
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating Information
GSP 215 Week 3 Homework Representing and Manipulating Information
For more classes visit
www.snaptutorial.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
A Novel Efficient VLSI Architecture for IEEE 754 Floating point multiplier us...IJERA Editor
Due to advancement of new technology in the field of VLSI and Embedded system, there is an increasing
demand of high speed and low power consumption processor. Speed of processor greatly depends on its
multiplier as well as adder performance. In spite of complexity involved in floating point arithmetic, its
implementation is increasing day by day. Due to which high speed adder architecture become important. Several
adder architecture designs have been developed to increase the efficiency of the adder. In this paper, we
introduce an architecture that performs high speed IEEE 754 floating point multiplier using modified carry
select adder (CSA). Modified CSA depend on booth encoder (BEC) Technique. Booth encoder, Mathematics is
an ancient Indian system of Mathematics. Here we are introduced two carry select based design. These designs
are implementation Xilinx Vertex device family.
I am Baddie K. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from The University of Queensland. I have been helping students with their homework for the past 9 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Digital Tools and AI for Teaching Learning and Research
Gsp 215 Future Our Mission/newtonhelp.com
1. GSP 215 Week 1 Homework Command Line in Windows and
Linux
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in
the video gaming industry. Describe the architecture and details
regarding its advantages or disadvantages (i.e, consider Windows,
Linux, based, etc.). A minimum of two paragraphs of research
information is required, along with your own interpretation of the
content.
Using Google, research the use of parallelism and concurrency in video
gaming today. Describe how each is used in the building and
implementation of video gaming platforms. A minimum of two
paragraphs of research information is required, along with your own
interpretation of the content.
---------------------------------------------------------------------------------------------------
GSP 215 Week 1 to 7 All iLab and Homework
2. For more course tutorials visit
www.newtonhelp.com
Please check all Included Assignment Details below
GSP 215 Week 1 Homework Command Line in Windows and Linux
GSP 215 Week 2 iLab Binary Representation of Information
GSP 215 Week 2 Homework Representing and Manipulating
Information
GSP 215 Week 3 Homework Representing and Manipulating
Information
GSP 215 Week 3 iLab Machine-Level Representation of Programs
GSP 215 Week 4 Homework Optimizing Program Performance
GSP 215 Week 4 Lab Optimizing Program Performance
GSP 215 Week 5 Homework memory Leaks
GSP 215 Week 5 iLab
3. GSP 215 Week 6 Homework Assignment
GSP 215 Week 6 iLab Virtual Memory
GSP 215 Week 7 Homework Assignment
GSP 215 Week 7 iLab
GSP 215 Week 7 HomeWork
---------------------------------------------------------------------------------------------------
GSP 215 Week 2 Homework Representing and Manipulating
Information
For more course tutorials visit
www.newtonhelp.com
Week 2 Homework Representing and Manipulating Information
Part A: Understanding the relationship between hexadecimal, binary,
and decimal representations are very important when discussing
machine-level programs.
1. Convert the following hexadecimal number to binary and decimal:
5C.
4. 2. Convert the following binary number to hexadecimal and decimal:
00001110.
3. Convert the following decimal number to hexadecimal and binary:
88.
4. Use two's complement to convert the following decimal number to
binary: -49.
Part B: Knowing the four operations & = AND, | = OR, ^ = Exclusive
OR and ~= NOT based on the example in the lecture, solve the
following problems.
Part C: Explain in your own words the difference between Big Endian
and Little Endian.
---------------------------------------------------------------------------------------------------
GSP 215 Week 2 iLab Binary Representation of Information
For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 2 iLab
Week 2 Lab—Binary Representation of Information
Scenario
5. In this lab, we will be using cygwin and Visual Studio to write C++ code
to illustrate floating point error and bitwise operations
Part A:
The goal of this exercise is to introduce you to an important aspect of
numerical computing: numerical error. Games use floating point as the
primary number representation for almost everything. Coordinate data
stored as (x,y,z) is used to represent vertices, which in turn are used to
represent triangles, which themselves are used to represent 3D objects.
Digital representation of any number must be accomplished with a fixed
number of bits, typically 32. However, one third, for example, has no
finite representation in fixed-point binary; that is, it would require an
infinite number of bits unless one uses floating point. Computation with
real numbers can quickly produce results that cannot fit into 32 bits.
When this happens, numbers are rounded to the closest representable
number. This introduces numerical error. Evaluating a series of
expressions can result in a large error, as demonstrated in this lab.
Use single precision floating point for all numbers. Variables need to be
declared as float, and constants should be followed by an f suffix, as in
3.14f.
1. Compute the square root of 501.0f, and store the result in a
variable float x.
2. Multiply x by itself. Ideally, this would = 2. What do you get?
3. Multiply x by itself again. Ideally, this would = 4. What do you
get?
4. Subtract x from the constant 251001.0f. Ideally, this should = 0.0.
What do you get?
5. Compute the multiplicative inverse of x (meaning 1/x). In order
to avoid dividing by 0.0, first test if x!= 0.0, and only compute inverse
if this is true. What do you get?
6. Copy and paste your source code into the lab report below, and
paste a screenshot. See an example of the screenshot below.
C++ Code:
6. Screenshot:
See example below:
Part B:
Color displays use blends of red, green, and blue (RGB) light to create
the colors you see. The digital representation of this concept is to store
each red, green, and blue component as an eight-bit unsigned number.
The value 255 represents the maximum displayable brightness of a
single component, the color 0 represents no intensity/light, and 128 is
halfway between the two extremes. Below are some triples of RGB
values and what color they represent.
0, 0, 0
black
255, 255, 255
bright white
255, 0, 0
bright red
0, 128, 0
medium green
128, 128, 0
medium yellow
A digital image is a two-dimensional array of RGB values, where each
RGB corresponds to an on-screen pixel.
For a better understanding, open an image using the program paint
(under the accessories menu). Select the color menu, then edit colors,
then define custom colors, and play around in the right-hand side of the
pane where you can type in RGB component numbers to see what color
they represent.
7. Because each component is only eight bits, the 24 bits required for RGB
is typically stored in a single 32-bit word rather than separately. This is
called a packed RGB format. This is what is used to drive all computer
displays. The hexadecimal representation of orange (full red, half green,
no blue) is 0x00FF0800.
The representation of half red, half green, half blue is 8421504,in
hexadecimal it is: 0x00808080.
Write two functions using only shifts and bit-wise logical
operations. One takes individual red, green, and blue components as
input and returns a single 32-bit word in packed format. The second does
the inverse, which is called unpacking. Test your code with some simple
examples. First pack the red, green, and blue, and then unpack them to
see that you get what you started with. Pay attention to the types of all
input and return values to make sure that they use the least number of
bits required. All of these should be unsigned numbers (there are no
negative colors).
You will need to use shift operator. x=y<<4 assigns x the result of
shifting y to the left four bits. You will also be using bitwise & (AND)
and | (OR). Hint: in unpack, you will need to write code like
this: r2=(rgb>>16) &0xff; to unpack the value for red. To pack the
values, you will need something like this: rgb = r<<16|g<<8|b;
#include <iostream>
using namespace std;
int pack (int r, int g, int b);
---------------------------------------------------------------------------------------------------
GSP 215 Week 3 Homework Representing and Manipulating
Information
8. For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 3 Homework Assignment
Week 3 Homework—Representing and Manipulating Information
Structures are a mechanism for creating a data type to aggregate multiple
objects into a single unit. All the components of a structure are stored in
a contiguous region of memory and a pointer to a structure is the address
of its first byte. To access the fields of a structure, the compiler
generates code that adds the appropriate offset to the address of the
structure.
9. The example on the book on page 242 shows the following structure.
struct rec {
int i;
int j;
int a[3];
int *p;
};
This structure contains four fields: two 4-byte int's, an array consisting
of three 4-byte int's, and a 4-byte int pointer giving a total of 24 bytes. j
is offset 4 bytes.
0 4 8 16 20
24
10. i
j
a[0]
a[1]
a[2]
p
Assuming variable 4 is of type struct rec * and is in register %edx, the
following code copies element r->i to element r->j.
movl (%edx), %eax // Get r->i
movl %eax, 4(%edx) //Store r->j To store into the field j, the code adds
offset 4 to the address of r
11. Consider the following structure declaration containing a structure
within a structure, and answer the following questions.
struct person{
struct size{
int height;
int weight;
}s;
int *hp;
int games[2];
}person1, person2;
12. 1. How many total bytes does the structure require?
height
weight
hp
games[0]
13. games[1]
2. What are the offsets in bytes of the following fields?
s.height: ______________
hp:_______________
games[1]:______________
3. The compiler generates the following assembly code for the body
of str_init (shown below).
movq 16(%rbp), %rax //Get p1 into register %rax
14. movl 4(%rax), %edx //Get p1->s.weight store in register %edx
movq 16(%rbp), %rax //Get p1 into register %rax
movl %edx, (%rax) //Store in p1->s.height
movq 16(%rbp), %rax //Get p1 into register %rax
leaq 4(%rax), %rdx //Compute address of p1->s.weight in register
%rdx
movq 16(%rbp), %rax //Get p1 into register %rax
movq %rdx, 8(%rax) //Store in p1->hp
15. 4. On the basis of this information, fill in the missing expressions in
the code for str_init.
void str_init(person *p1)
{
p1->s.height = _____________;
p1->hp = _________________;
}
5. How would you call str_init with the structperson1 passed to it?
16. ---------------------------------------------------------------------------------------------------
GSP 215 Week 3 iLab Machine Level Representation of
Programs
For more course tutorials visit
www.newtonhelp.com
Week 3 Lab Machine-Level Representation of Programs
TCO 3—Given the need to understand and describe performance
bottlenecks, acquire an understanding of how C and C++ is
translated into machine code.
Scenario
In this week’s lab, you will key in and compile a C++-supplied
program. Using the instructions provided, you will proceed to inspect,
comment, and produce representative assembly code.
PART A:
We will look at C code versus machine code. Write the following code
in cygwin using vi and save it as code.c.
17. Part B:
Linux and Windows show assembly in different formats. The code
differences are shown below.
Copy the code below into a new Visual Studio Project. Compile the C++
code. In the Solution Explorer, right click on the .cpp file and choose
properties.
---------------------------------------------------------------------------------------------------
GSP 215 Week 4 Homework Optimizing Program Performance
For more course tutorials visit
www.newtonhelp.com
Optimizing Program Performance
A programmer must write correct code that is clear and concise.
There are also circumstances in which a programmer must write fast
and efficient code. Processing video frames in real time must be fast.
We will talk about ways to optimize code.
18. Given the following code, perform these operations to optimize the
code. See Chapter 5 in the book for more details on code
optimization. Please use comments to document all optimizations you
have made to the code.
1. Using switch instead of if
2. Eliminating length calls out of the loop test
3. Put the most used variables first when initializing variables
4. Use prefix operations rather than postfix operations
5. Loop unrolling—increase the number of elements computed in
each iteration of a loop (i.e. instead of processing arrays separately, if
you have two arrays of the same length, process them in parallel)
6. Any other improvements you want to make
20. int main()
{
//This program stores the items purchased at the grocery store.
The price vector stores the prices for each item purchased.
//The product name vector stores the products purchased and
the category vector stores which category the item falls under.
//Frozen foods have a 10% discount, snacks has a 5%
discount, and produce has a 15% discount.
//The total amount of items purchased should be calculated
with a 7% tax rate.
double sum;
double tax,totalAmount;
22. For more course tutorials visit
www.newtonhelp.com
Week 4 Lab Optimizing Program Performance
TCO 4—Given the importance of speculating runtime costs of
software, obtain an understanding of certain details of how processors
operate that impact code performance.
Scenario
In this week’s lab, you will look at timing operations and how
different operations can take a different amount of time to complete.
23. Part A:
We will look at timing operations in C++. To see the difference in
operations, write C++ code to compare cout and printf, and display
the time difference for 100 cout operations and 100 printf operations.
This code can be written in Visual Studio. Below is how you would
time the 100 cout operations in Visual Studio. Add another for loop,
and display time for both cout and printf then comment about why
you think there is a difference.
Part B:
Next, we will take timing a step further. There are a few different
sorting algorithms, and these algorithms have varying time
complexity. For this part of the lab, we will implement bubble sort
and quick sort. Research bubble sort and quick sort algorithms, and
implement them in C++. Fill a large array (maybe 15,000 elements)
of random numbers. Then time the difference between bubble sort
and quick sort 10 times, and fill out the table. Next, run the program
in release mode. Did you notice a difference in time? Yes, release
mode works much faster
---------------------------------------------------------------------------------------------------
24. GSP 215 Week 5 Homework memory Leaks
For more course tutorials visit
www.newtonhelp.com
Week 5 Homework—Memory Leaks
Memory leaks are bugs in C++ applications that can cause
performance problems with your application or even causing it to
crash. A memory leak is the result of failing to deallocate memory
that was previously allocated. In C++ the commands
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
25. #include <crtdbg.h>
will enable the debug heap functions. After enabling the debug heap
functions, place a call to _crtDumpMemoryLeaks() before an
application exit point.
Given the following code, run this code in debug mode. The memory
leak report will appear in the Output Window with the debug option.
It should look something like this.
The output will look like the following.
26. Detected memory leaks!
Dumping objects ->
{142} normal block at 0x0079A948, 25 bytes long.
Data: <> CD CDCDCDCDCDCDCDCDCDCDCDCDCDCDCD
{141} normal block at 0x0079A8F8, 20 bytes long.
Data: <Sheldon > 53 68 65 6C 64 6F 6E 00 CD
CDCDCDCDCDCDCD
Object dump complete.
The information displayed is: the memory allocation number (142),
block type (normal), the hexadecimal memory location
(0x0079A948), and the size of the block (25 bytes long).
27. Rewrite the code to remove the memory leaks, and submit the
completed code with a screenshot of the output window with no
memory leaks detected.
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include <string>
void memLeak()
28. {
int *p = new int;
char * string1 = new char[20];
char * string2 = new char[25];
strcpy(string1, "Sheldon");
string2=string1;
delete p;
}
29. int main(intargc, char* argv[])
{
memLeak();
_CrtDumpMemoryLeaks();
return 0;
}
C++ code with no memory leaks:
31. Week 5 Lab—Memory
TCO 6—Given the fundamental role of processes in organizing a
computer's flow of execution, be able to explain how
multitasking/multiprocessing works, including what constitutes a context
switch.
TCO 7—Given that performance of a game is dominated by the speed of
various parts of the memory system, understand algorithms used to
manage memory on a computer.
Scenario
In this week’s lab, you will create a memory viewer using a combination
of C and C++ to create an interactive tool for visualizing memory.
32. This lab is based on this video series by Professor Michael Vaganov:
https://www.youtube.com/playlist?list=PLL2gGK4F_vGcPgzzPPJMdQ
S9uW3DO_u_F
Please watch the video series, which will walk you through creating a
memory viewer step by step. Each video builds on the successive one
until you have an interesting memory viewer at the end.
The program starts with Hello World in C++.
#include <iostream>
int main()
{
std::cout<<"Hello world"<<std::endl;
33. return 0;
}
Work through the code with the author. Submit your code and
screenshot of the final project to the Dropbox.
---------------------------------------------------------------------------------------------------
GSP 215 Week 6 Homework Virtual Memory
For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 6 Homework Assignment
Week 6 Homework—Virtual Memory
This week's homework problems will be completed in the book.
Complete problems 9.12 and 9.13 below.
Review Section 9.6.4 as a guide.
34. Problem 9.11 is done below to help you.
9.11. For the given virtual address, indicate the TLB entry accessed,
the physical address, and the cache byte value returned. Indicate
whether the TLB misses, whether a page fault occurs, and whether a
cache miss occurs. If there is a cache miss, enter – for cache byte
returned. If there is a page fault, enter - for PPN, and leave parts C
and D blank. You will need to use the tables on page 796 for PPN
translation (page table b).
---------------------------------------------------------------------------------------------------
GSP 215 Week 6 iLabVirtual Memory
For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 6 iLab
Week 6 Lab—Virtual Memory
35. TCO 9—Given the need to support the runtime creation of varying
quantities of data objects, learn how dynamic memory allocation can
provide this capability in a very efficient way.
TCO 8—Given the need to understand virtual memory, describe how
memory allocation and paging are used to give a computer program
access to more memory than physically available.
Scenario
In this week’s lab, you will override the new and delete operators for an
implementation of linked list.
36. Rubric
Point distribution for this activity
Lab Activity
Document Points possible Points received
Code and screenshot 40
Total Points 40
37. Generally, the default implementation of new and delete is sufficient for
a given program. At times, you may want to specialize memory
allocation for advanced tasks. You may want to allocate instances of a
certain class from a particular memory pool, implement your own
garbage collector, or caching.
We will override the new and delete operator in this lab. When
overriding these operators, both need to be overridden. The new operator
allocates memory and creates an object. The delete operator deallocates
memory.
We will be implementing a linked list class and overloading the new and
delete operator. We can improve the speed of allocating new nodes by
keeping a list of deleted nodes and reusing the memory when new nodes
are allocated.
The code for the linked list is below. You may also use your own
implementation of linked list.
The overloaded new operator will check a freelist to recycle a node
before going to the heap and getting one that way. The delete operator
will add the node to the freelist.
38. Hint: Use the following in the Node class.
void * operator new(size_t);
void operator delete(void*);
static void printFreelist();
After the class Node definition, be sure to set the freelist to NULL.
Node* Node::freelist=NULL;
Implement Node::printFreelist() as well, and in the Main, include calls
to
Node::printFreelist();
39. to see the nodes in the free list.
Original C++ Code:
#include <iostream>
using namespace std;
---------------------------------------------------------------------------------------------------
GSP 215 Week 7 Homework Networking Commands
For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 7 Homework Assignment
40. Week 7 Homework—Networking Commands
This week's homework will focus on basic networking commands.
Display IP configuration settings.
1. Open a Windows CLI (Start->run type in cmd and press enter)
2. The ipconfig command is used to view a computer's IP address.
When your system is resolving the DNS addresses incorrectly, flushing
the DNS using ipconfig –flushdns is a helpful command. To release and
renew an IP address, use ipconfig – release and ipconfig –renew.
What does subnet mask mean? What does default gateway mean?
41. 3. Ping is used to verify connectivity to a network. Ping a web
address of your choice, and press control + c to stop it.
Paste the screenshot below.
4. Run traceroute on a website address of your choice (control + c to
stop). Example:
tracert devry.edu
42. 5. Nslookup is helpful to know if the DNS is working correctly. Run
nslookup against a hostname to see if the name is resolved. Example:
nslookupwww.cnn.com
6. The netstat command has many options and gives a lot of
information about your network. The –a option will show you the open
ports on your computer.
7. If you have a Windows machine, go to the control panel on your
computer. Then pick network and sharing center.
Under view your active networks, you will see a link next to connections
(in the above picture it is wired). Click on the link you see next to
connections, then click on properties. Select Internet protocol version 4
(TCP/IPv4), and click properties.
43. Note that changing these settings may disconnect you, so click cancel
rather than OK.
• To obtain IP settings automatically, click obtain an IP address
automatically, and then click OK.
• To specify an IP address, click use the following IP address, and
then in the IP address, subnet mask, and default gateway boxes, type the
IP address settings.
Take a screenshot of your settings.
Why would you choose
---------------------------------------------------------------------------------------------------
GSP 215 Week 7 iLabNetworking and a Tiny Web Server
44. For more course tutorials visit
www.newtonhelp.com
GSP 215 Week 7 iLab
Week 7 Lab—Networking and a Tiny Web Server
TCO 1—Given a computing environment with multiple operating
systems, demonstrate the ability to use the command line interface in
Windows and Linux, and compile and run a program using the
command line.
45. TCO 10—Given the importance of networking in game design, explain
how computers are connected to a network, and summarize basic
networking fundamentals, terminologies, protocols, and devices.
Scenario
In this week's lab, we will create two C programs to use with networking
commands. The first program will read a domain name or dotted-
decimal address from the command line and display the corresponding
host entry. The second program will be a tiny web server used on
localhost.
Part A:
In this lab, we will explore DNS mapping by creating a file named
hostinfo.c. This program will read a domain name or dotted-decimal
address from the command line and display the corresponding host
entry. Local host will always map to 127.0.0.2.
Enter the following C code into notepad. Save the file in the
cygwinhomeusername folder on your computer (ie:
C:cygwin64homegina) as hostinfo.c.
Open Cygwin, and compile the program: gcchostinfo.c –o hostinfo.
46. #include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <netdb.h>
Run the program with the following domain names, and note the results.
Also, choose some of your own.
Part B:
Read pages 919-927 in the book. We will be developing the tiny web
server listed in the book. This web server supports the GET method. It
will look for an HTML file in the current directory and will display the
web page in a web browser. Please study and review the code to
understand what it is doing. Feel free to extend the code as well.
47. Copy the C code below into notepad. Save the file in the
cygwinhomeusername folder on your computer (i.e.,
C:cygwin64homegina) as tiny.c.
Compile the program: gcctiny.c –o tiny.
, at a cygwin prompt, type ./tiny 10000.
This will start the web server listening at port 10000.
Open your web browser, and type the following in the address bar:
http://localhost:10000/home.html.
This will open your website using your own tiny web server. To stop
your tiny web server, press control + c in cygwin.
Include a screenshot below of your web page working in a browser.
48. C Code:
//Tiny web server code
#include <stdlib.h>
#include <stdio.h>
---------------------------------------------------------------------------------------------------