2.1.2 Thinking Ahead Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are preconditions?

A

Requirements which must be met before a program can be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are inputs?

A

Data required to solve a problem
Entered by user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are outputs?

A

Results that are passed back
Produced after inputs have been processed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are reusable program components?

A

Commonly used functions can be packaged into libraries for reuse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

State the three types of reusable components.

A

Abstract data structures
Classes
Subroutines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

State 2 advantages of using reusable program components.

A

More reliable as already tested
Save time, money & resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What disadvantage do reusable program components have?

A

May need to be modified to be compatible with existing software
Can be more costly and time-consuming than developing from scratch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is caching?

A

Storing instructions or values in cache memory after use for possible future use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give 2 advantages of caching.

A

Save time retrieving instructions from secondary storage
Frees up bandwidth for other tasks on network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is prefetching?

A

Algorithms predict which instructions are likely to soon be fetched
Instructions loaded & stored in cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the advantage of using prefetching?

A

Less time waiting for instructions to be fetched

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give 2 disadvantages of prefetching.

A

Difficult to implement well
Effectiveness depends on caching algorithm’s ability to manage cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly