Flashcards
Computer Science | A Level | Personal Revision Cards | Component 2
Cards in this deck (30)
- 1What is a Cache Miss?A cache miss is where a request for data
from the cache does not succeed, therefore leading to a slower operation as the data has to be retrieved from the original source. - 2What is a Hit Rate, or Hit Ratio?A hit rate is the percentage often taken when comparing the number of successful cache accesses (Cache Hits) to unsuccessful attempts to retrieve data from the cache (Cache Misses).
- 3Which algorithm is the "optimal" to decide which piece of data to remove from a cache when a cache miss occurs?Clairvoyant Algorithm.
- 4What does the Clairvoyant Algorithm do?Upon a cache miss, it decides which pieces of data it needs to remove from the cache to swap out for relevant data - the most likely outcome being the data with the oldest access time as the one to remove.
- 5What is write-through?Write-through is to update both the cache and the data source at once.
- 6What is write-back?Write-back is the process of initially updating the cache, and then only updating the underlying data source when those data are ejected from the cache.
- 7What is a dirty flag?A flag used within the cache when an update to data occurs (with it being set to false initially and then becoming true when updated). When an entry is ejected, the dirty flag is checked. Any entry ejected with a dirty flag set to true needs to be saved to the backing store.
- 8What are the three main uses of caching?Caching for:
- CPU
- Disk
- Web - 9When a cache hit occurs, is the access to data faster, or slower?The access to data is faster with a cache hit.
- 10With caching, what are the benefits it could help when considering bandwidth?The bandwidth can be reduced, or at least, the requirements can be.
- 11Name a disadvantage of caching when considering how data can update.You can be given a stale version of data (from the cache) when the original source of the data has changed, potentially leading to implications.
- 12What is a sequence?Sequence dictates the steps that will be carried out in their given order.
- 13What does selection allow for?Selection allows the programmer to choose to execute one of a number of instructions based on a condition that arises during the execution of previous instructions.
- 14What does iteration allow a programmer to do?Iteration allows the programmer to repeat the same instructions a certain number of times or until a condition is met.
- 15What does logic mean, in terms of computer science?Logic is the use of logical operators to reason the outcome of a given argument.
- 16Give the truth table for an AND gate.A | B | Y
-----------------------------
0 | 0 | 0
0 | 1 | 0
1 | 0 | 0
1 | 1 | 1 - 17Give the truth table for an OR gate.A | B | Y
-----------------------------
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1 - 18Give the truth table for an XOR gateA | B | Y
-----------------------------
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0 - 19Give the truth table for a NAND gateA | B | Y
-----------------------------
0 | 0 | 1
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0 - 20Give the truth table for a NOR gate.A | B | Y
-----------------------------
0 | 0 | 1
0 | 1 | 0
1 | 0 | 0
1 | 1 | 0 - 21What is Deadlock, as a disadvantage of concurrent execution?Deadlock occurs when every process is waiting for another to finish, thus no process is ever able to complete.
- 22What happens to achieve Starvation in concurrent execution?Starvation is when a process is always denied the resources it needs, however it's only really possible to happen in poorly coded programs.
- 23What are the Coffman Conditions?The conditions that must combine for there to be a deadlock:
- Resources can't be shared.
- A process can hold one resource while requesting another.
- Resource can only be made available by process currently holding it.
- Circular waiting can occur. - 24What is a race condition?Race conditions occur when two processes use the same storage location (variable) and the final result depends on the order in which processes are run.
- 25What does SELECT CASE do?SELECT CASE focuses on the content of a variable and had a separate CASE for each outcome.
- 26What is a function?A function is a subroutine that returns a value.
- 27What is a procedure?A procedure is a subroutine that doesn't return a value.
- 28What two methods can you pass parameters by?By Value and By Reference.
- 29What is Big O Notation?A theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items.
- 30—
Information
- Description
- Revision flashcards used in order to study Computer Science
- Created by
- Thomas Allen · Apr 2017
- Updated
- Apr 27, 2017
- Views
- 8
- Rating