Professional Documents
Culture Documents
I.
visualization;
INTRODUCTION
428
RELATED WORK
429
loop. They are asked to run the program for different sizes of
the cache for each of the following mappings: direct, 2-way, 4way and 8-way set associative. At the end of each run they
record the miss rate against the cache size. They are then asked
to comment on their observations. They note that direct and 2way set associative mappings yield similar results with 2-way
slightly better as its miss rate shrinks more steeply and this is
visually shown by the displayed graph, but the 4-way mapping
turns out to be demonstrably more efficient than both. However
increasing this to 8-way appears to only slightly improve over
the 4-way mapping. Finally the students are asked to
demonstrate that programming style can have significant
influence on cache efficiency.
E. Investigating CPU Pipeline (year two)
The CPU simulator incorporates a 5-stage pipeline. The
pipeline simulator is highly interactive and configurable. It can
be switched off, i.e. instruction stages are processed
sequentially (this would not be possible on real hardware) and
different pipeline optimizations such as operand forwarding
and jump prediction can be switched on or off. The simulator
displays different stages of instructions as they progress
through the pipeline while the instructions are processed. It
also calculates and displays the clocks per instruction (CPI) and
the speed-up factor (SF). The students enter the source for a
small program loop and compile it. They run the generated
code first when the pipeline is switched off then again when it
is switched on. They note down the CPI and the SF in both
cases and comment. Next the students investigate data hazards.
They configure the cache so that it does not insert any hazard
bubbles (again, not possible on real hardware). The students
then enter a small assembly code which moves data to registers
and adds their contents making sure there is a data hazard
condition. They run this code and observe that the
mathematical result is not what they expect. They are then
asked to use a NOP instruction in the appropriate place to
eliminate the hazard and verify. They are then asked to switch
on the hazard bubbles and run the program one more time.
They note that the result is now correct. Next they investigate
operand forwarding to remove data hazards. They note the
resulting CPI that is now reduced demonstrating performance
improvement. Next they investigate jump prediction
mechanism using the jump predict table to remove control
hazards. This again reduces the CPI further and the simulator
displays a high percentage of predictions recorded. They then
use the compilers loop-unrolling optimization to show the
effect of this optimization on the pipeline operation with
significant performance gain as the CPI is demonstrably
reduced and the SF is increased. Finally they investigate the
out-of-order execution of instructions to minimize data
hazards. The inbuilt compiler is directed to re-arrange
instructions such that the data dependencies are minimized.
The students study the new code generated and then run it to
verify the performance improvement.
F. Investigating Compilers (year two)
The system simulator incorporates a compiler capable of
accepting and compiling typical high-level language statements
and generates low level assembly code that can run on the CPU
simulator. The compiler also generates the corresponding
binary code which can be studied by the students. A list of
430
TABLE I.
The individual items of both the pre and the post tests
directly correspond to and reflect the expected learning
outcomes of the tutorials. This way we can be confident that
what is being evaluated is the actual work carried out during
the tutorial sessions. The post test items are designed to closely
correspond to the pre test items.
TABLE II.
LO
Pre
Post
LO
Pre
Post
LO
Pre
Post
The pre and post tests took the form of 5-point Likert scale
(strongly agree, agree, neutral, disagree, strongly disagree) with
five items in each test. The items of the tests take the form of
confidence-based opinions rather than multiple choice type
questions. Table II shows sample pre and post test questions
taken from each of the four year two practical exercises and
demonstrates how these are aligned with the corresponding
learning outcomes (LOs).
Post
LO
Pre
431
Q1
Q2
Q3
Q4
Q5
Programming
Model 1
14
0.002
0.001
0.001
0.002
0.001
Programming
Model 2
13
0.002
0.001
0.002
0.006
0.002
Process
Scheduling
41
0.001
0.000
0.000
0.000
0.000
TABLE IV.
Topic
Q1
Q2
Q3
Q4
Q5
Cache technology 12
0.015
0.011
0.003
0.003
0.002
Compiler
technology
13
0.014
0.013
1.000
0.005
0.008
CPU
pipeline
12
technology
0.180
0.002
0.020
0.008
0.008
IO Interrupts
0.002
0.005
0.002
0.007
N/A
14
Topic
Cache technology
Compiler technology
CPU pipeline technology
IO Interrupts
Pre Test
0.898
0.714
0.849
0.869
Post Test
0.770
0.843
0.883
0.739
432
TABLE VI.
I believe the CPU-OS simulator has greatly aided my
understanding of the topics covered in this module
I found the practical tutorials using the CPU-OS simulator
engaging and stimulating
Using the CPU-OS simulator encouraged me to explore
CPU functionality beyond the set tasks
The tasks using the CPU-OS simulator nicely
complemented the theory covered during the lectures
Overall I enjoyed using the CPU-OS simulator as an
interactive and visual learning resource
SA
VIII. CONCLUSIONS
10
REFERENCES
2.79
4.36
1.57
0.002
2.80
4.13
1.33
0.001
TABLE VIII.
Q2
Q3
Q4
2.50
2.43
2.57
4.43
4.21
4.36
1.93
1.78
1.79
0.001
0.001
0.002
Not using integrated simulator
3.27
2.80
2.60
4.13
4.07
3.87
0.86
1.27
1.27
0.004
0.001
0.003
[1]
Q5
2.43
4.29
1.86
0.001
2.40
4.00
1.60
0.001
2.54
4.00
1.46
0.002
2.64
3.71
1.07
0.006
Q2
Q3
Q4
2.85
2.54
2.77
4.15
4.08
3.77
1.30
1.54
1.00
0.001
0.002
0.006
Not using integrated simulator
2.79
2.43
2.64
3.86
4.07
3.50
1.07
1.64
0.86
1.000
0.001
0.015
Q5
2.38
3.92
1.54
0.002
2.57
3.79
1.22
0.002
It can be seen from both tables that the control groups using
just the pen-and-paper method still managed to significantly
consolidate what they learned during the lectures as expected
and as evidenced by the very low p values. However, it is also
clear that the use of the simulator provided a more enhanced
learning experience compared to the pen-and-paper method as
evidenced by the mean post-test results. The next step is to
include comparisons with other similar simulators. However,
due to the lack of such similar simulators that are able to
support as wide a range of features, this may be difficult or
impossible to achieve. Also, what these result do not capture is
the way in which the students attempt the tutorial exercises.
433