Extra general Flashcards

(86 cards)

1
Q

When should you use local variables and when should you use global variables

A

If you feel that a certain variable will take multiple values by passing through various functions then use local variables and pass them in function calls. If you feel that a certain variable you need to use will have constant value, then declare it as a global variable

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

What is top down design

A

breaking a problem down

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

Advantages of top down design

A

the problem is easier to understand, program, test and maintain.
Shows clearly how different parts of the problem relate to each other
Division of labour - different teams working on different parts of the problem independently
May make code more modular as it broken into smaller subroutines

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

Disadvantages of top down design

A

It assumes that the whole solution to the problem is knowable in advance.
Poorly understood programs are hard to decompose.
Not every problem can be broken down in this way, for example event driven programs like GUIs

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

What are the 4 values of the agile methods

A

1.Individuals over processes
2.Working software over documents
3.Customer collab
change

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

Pros of flat file databases

A

Easy to set up - no knowledge required
Easy to use in code - e.g. CSV files are easy to process
Easy to share, e.g. email attachments

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

Cons of flat file databases

A

Duplication of data (data redundancy) which take more time to update eg if Miss Read moves house you have to update her address in multiple rows, can lead to inconsistency eg you forget to update Miss Read’s details in every place they are stored.
Take up more space so more storage is required.
Everyone can see everything (not good if some data is sensitive)
Inefficient – have to have all fields for every record
Can’t perform complex queries as easily

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

Pros of relational databases

A

Reduces duplication of data meaning easier to update, accurate, better consistency, less storage space
Can set different access rights for each user for each table
Can index fields for quicker searching
If implemented with DBMS, it will allow concurrent access to the database allowing multiple users
Complex queries can be carried out

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

Cons of relational databases

A

More difficult to correctly set up (normalization is the process of structuring the data in a relational database according to formal rules to avoid problems of data redundancy which leads to inconsistency and inaccuracy (incorrect) and inconsistency (between different fields)

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

Cons of cache

A

small size and fixed size

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

Pros of web browser cache

A

Faster load time, reduced network traffic ie fewer HTTP requests

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

Cons of web browser cache (cache in general)

A

Cached resource may be out of date

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

What does a cache server (proxy server) do?

A

Cache server (proxy server) saves previously requested web pages or other content.

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

Pros of caching a proxy server

A

Faster load time as HTTP request does not have to go original web server, reduces network traffic

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

When is DNS cache used?

A

When a DNS server responds to a DNS request, the operating system may store these results in a local DNS cache

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

Pros of DNS cache?

A

reduced network traffic ie fewer DNS requests.
Reduced network traffic as there will be fewer DNS requests to remote DNS servers

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

Cons of DNS cache?

A

resources may be out of date, if a web page has changed the location of its server an error may occur

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

Pros of caching in general

A

Speeds up retrieval
Cache miss normally would not result in error

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

Cons of caching

A

Algorithms for caching can be very complicated. When the cache is full, the algorithm must choose which items to discard to make room for the new ones.
Wrong data may be cached then it has to be removed and the correct data loaded.
Cache does not have the required content (cache miss) so time is wasted checking it.

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

What is a cache hit

A

dataA “cache hit” occurs when a file is requested from a cache and the cache is able to fulfill that request

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

What is a cache miss

A

an event in which a system or application makes a request to retrieve data from a cache, but that specific data is not currently in cache memory

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

What does atomic mean

A

Atomic means each item of data is distinct and you can’t separate the data any more or break it up any smaller without losing meaning.

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

atomicity

A

The fully or not at all transaction thing

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

When would you not have to do anything for second normal form

A

If you don’t have any composite primary keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Do the normal forms have to be done in order
Yes
26
What does tcp do
the type of error checking to be used data compression method, if any how the sending device will indicate that it has finished sending a message how the receiving device will indicate that it has received a message type of encryption used packet size
27
UDP
a communications protocol that is primarily used to establish low-latency and loss-tolerating connections between applications on the internet. UDP speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party. No error checking which makes it good for gaming and streaming but bad for sending over important documents as if data is lost it cannot be retrieved due to no error checking
28
What is a standard
standard is a definition or specification that is an agreed way of doing things. Standards make it easier to build software or hardware that will run (is compatible) on different systems (in different countries). Without standards most devices would not be able to communicate with each other.
29
Two categories of standards
De jure (by force of law) and de facto standards
30
Dejure
Regulated by official bodies and used across the internet
31
defacto standards
ones that arise through popular use but are not managed or regulated
32
Why are standards important
Standards form the fundamental building blocks for product development by establishing consistent protocols that can be universally understood and adopted. Standards are important in the computer industry because they allow the combination of products from different manufacturers to create a customized system.
33
What would happen without standards
Without standards, only hardware and software from the same company could be used
34
Why are protocols important
Set of rules that allow transmission between devices. Allowing devices to communicate By ensuring all devices follow the same rules So they interpret data/signals in the same way
35
What is DRAM
dynamic RAM and it is used for main memory
36
What is SRAM
Static RAM and used for cache memory (shorter access time than dynamic RAM)
37
First step of bios
Power On Self-Test (POST) runs to determine if hardware eg processor, RAM, storage devices and other interface cards are working correctly
38
Second step of bios
Load configuration settings eg clock speed, boot device order, enabled and disable interfaces
39
third step of bios
Find and load the bootloader program from secondary storage, which starts the initialisation of the operating system.
40
Example of special purpose software
Calculators and CAD
41
Memory management
Recording how memory in the computer is divided and identified so that memory is allocated efficiently between processes that are running
42
Process management
(CPU) Scheduling allows multiple processes to run in turn using a scheduling algorithm
43
File management
Enables files and directories to be moved, copied, deleted and renamed on secondary storage devices
44
Network management
Sharing resources of a remote computer such as files or printers.
45
Security
The OS supports the security of a device by ensuring that resources are protected from unauthorised access through the use of permissions and passwords, e.g user access rights, user authentication, file permissions
46
User interface
to provide an interface between the user and computer (ie, CLI, GUI)
47
What does RIPA stand for
Regulation of investigatory powers
48
What does RIPA give authorities the power to do
Compel disclosure of encryption keys and the power to insist on users decrypting messages
49
What does RIPA ensure in link to communications
Communications can be monitored if there is just cause
50
Negative of constant monitoring
Risk of false positive
51
Positive of constant monitoring
Reduce risk of illegal activities being co-ordinated
52
Origin of private key in asymmetric encryption and why it has a lower chance of getting intercepted
It is the recipients private key
53
How to prove a message has been sent by you
Encrypt it using YOUR private key and then everybody can decrypt it using your PUBLIC key so you can guarantee that you encrypted
54
What is a hash
A fixed size value
55
What do hash tables store
key-value pairs
56
What are key value pairs formed from
A bucket array and a hash function
57
Why are hash tables used
When data needs to be stored with constant access time
58
Example of where hash tables are used
Caches and databases
59
Third way of dealing with a collision
Storing items together in a list under the hash value
60
Why should hash values be abbreviated
As if not searching for the hash could take longer than simply searching for the key
61
What does encryption protect data in
Motion
62
What does hashing protect data in
static
63
Why can paging be in efficient
Takes no account of how it splits a program so could separate the instructions inside a looping condition which would mean it would repeatedly have to access data from a different page in a different physical location this would make the program take longer to complete
64
Why can segmentation be more efficient
They are complete sections of programs
65
Similarities between paging and segmentation
Allow programs to run despite insufficient memory, transferred onto memory when needed
66
Where are pages and segments both stored
On a disk
67
Differences between paging and segmentation
Pages are fixed size, segments are different sizes, pages made to fit sections of memory, segments made to fit sections of programs
68
What connects to the server in a client server network
Terminals
69
What is the server in a client server network
Powerful, central computer
70
Server and processing power in client server network
Greater processing power than the terminal
71
Obscure advantages of client server networks
Data and resources can be shared between clients
72
Central back ups in a client server
No need for individual backups
73
Main disadvantage of client server network
Functionality of terminal depends on server, if this fails, performance fails
74
Dependence peer to peer network
Not dependant on central server
75
Difficulty of locating resources and tracing files peer to peer network
Impossible to trace origin of files and difficult to locate resources
76
What decodes the instruction
Control unit
77
Execute section
If necessary, data is fetched
78
Second stage of waterfall model
Feasibility – is it technically viable, economical, legal? How effective the project will be in solving the problem? Can it be done in time?
79
Third stage of waterfall model
White/black box, alpha/beta, performance etc
80
What is the final stage of the waterfal model?
installation, migration, support, and maintenance e.g. corrective, perfective, adaptive maintenance (to keep a software product usable in a changed or changing environment
81
What does the processor do when it needs to read or write a location in memory?
it first checks for a corresponding entry in the cache. If the processor finds that the memory location is in the cache, a cache hit has occurred and the processor immediately reads/writes to the cache. If not, a cache miss has occurred and the data is copied from main memory into cache and the request fulfilled from cache.
82
Why close files
When a file is “opened,” the operating system marks the file as locked, generally so it can’t be deleted by other processes while it’s being used. myFile.close() undoes the lock, allowing the operating system and other processes to do what it wishes with the file. It also releases any system resources associated with the stream.
83
Why is it easier to swap pages
Because they are fixed size
84
Concurrent v simultaneous
Concurrent is where each given a time slice
85
Programs and data
Yes
86