Compsci 110 Flashcards

1
Q

Explain Lexical Analysis

A
  • Breaks code into tokens: numbers, variables, names, strings, delimiters etc.
  • Tokens are classified by type into classes and comments are removed
  • Production of non-terminals can be described by BNF grammar, but in lexing we use it to form tokens without syntactical meaning e.g. , ,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a challenge faced by a parser during parsing? And how can this be solved?

A

A challenge is choosing which grammar rules to apply, which one to use first, and which set of leaves to apply them to. This can be solved by backing up the point where the last choice was made and trying a different choice instead.

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

What is recursion?

A

A non-terminal on the left reappears in the definition part on the right
::= blah|blah

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

What elements would you find in a semantic record?

A
  • Data type of the of the non-terminal and the name of the variable
  • Data type of the non-terminal symbol the record relates to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the role of code optimisation during the compilation process?

A

Tries to turn code into code that will run faster and removes unnecessary instructions at machine level

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

What does ‘rwx’ command mean?

A

Read, write, execute

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

What is a ‘chmod’ command?

A

Changes the access permission of files and folders.
The first number sets permission for the user, the second number sets permission for the group and the third number sets permission for everybody else

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

What does ‘chmod 777’ do?

A

Gives everyone full access to the file

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

What does ‘chmod 770’ do?

A

The user and group members only have full access to the file

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

What does ‘chmod 755’ do?

A

The user has full access, group members and everybody else can read and execute the file, no modifications

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

What is a deadlock?

A

When two threads needs two different resources and each of them has the lock of the resource that the other need, it is a deadlock

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

What are the features of multi-programmed operating system?

A
  • Each process needs its own memory space which need to be separate to avoid programs writing into the memory space of another
  • Manages program access to external devices and resources e.g. keyboard, mouse, files, networks and printers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the features of multi-user operating system?

A
  • A superuser(root) account for administration

- User authentication

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

What is cloud storage?

A

In a cloud system, many network drives are connected transparently across many physical locations world-wide, and a user’s data may exist in more than one location, getting synchronized to other locations if it changes in one.

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

What are potential problems of cloud storage?

A
  • Legitimate access to cloud data by law enforcement

- Privacy of data stored under different legislation

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

Explain geostationary satellites

A
  • High latency
  • Orbits at the same angular velocity as the earth’s spin so it appears to be in a fixed spot as seen from ground stations
  • Low signals at ground stations, need big antennas
17
Q

Explain Medium Earth Orbit satellites (MEO)

A
  • Need tracking antennas (movable), but can be much smaller than geostationary
  • Need a minimum of 2 antennas per ground station
  • Need a minimum of 4 satellites
  • Lower latency and higher bit rates
18
Q

Explain Low Earth Orbit satellites (LEO)

A

• No need for tracking antennas

  • Need dozens to hundreds or even thousands of small satellites
  • Even lower latencies and much higher bit rates
19
Q

What is phishing?

A

A “social engineering” approach, typically via email designed to cause you to reveal login data or allow a malicious party to install software (malware) on your machine for further malicious activity. The installation could be by persuading you to actively install the software or by clicking on a link that will perform a “drive by download’’ of the malware

20
Q

What is a virus?

A

Executable files that will create copies of themselves in legitimate programs and wait for these to be copied to other machines.

21
Q

What are worms?

A

Use network functionality e.g. email or faulty network applications to spread to other machines

22
Q

What are trojans?

A

Programs that perform a seemingly useful task but also open a back door for malicious hackers, in the form of a TCP port that can be accessed by a command and control server to issue commands to the program. Gives access to someone’s computer.

23
Q

What are the features of RSA?

A
  • The first part of the public key is the product of two large numbers
  • Messages encrypted with the public key can be used to send confidential information to the owner
  • Messages encrypted with the private key can be used to authenticate the owner as the sender
  • Encrypting with plaintext with public keys requires using modulo arithmetic
24
Q

What are the features of DES?

A
  • Complex cipher that uses a simple algorithm repeatedly
  • Uses permutation (puts bits into different locations), splitting the data, exclusive OR (XOR) operations, substitution and a secret key that is permuted and partially used at each stage to perform encryption.
  • The decryption performs all stages in reverse
  • Easily implemented and fast to compute
  • Can be cracked using brute force
25
Q

What are the components of a turing machine instruction?

A

(current state, current cell value, cell value to write, next state, next cell)

26
Q

What is the Winograd schema?

A

Winograd Schema consists of a statement and a question. The statement must contain two entities and an ambiguous pronoun (she, her, him, they, them etc…), that could refer to either of the two entities. The question asks which of the entities the pronoun refers to and must require some sort of common-sense knowledge to answer.

27
Q

What are reasoning tasks?

A

Tasks that require reasoning are typically centred around planning, developing and adapting a strategy based on knowledge and a scenario in which this knowledge may be insufficient and/or doesn’t deliver immediate answers.

28
Q

What is the back propagation algorithm?

A
  • If a neuron fires when it shouldn’t have, adjust the activating and inhibiting weights downward
  • If a neuron does not fire when it should have, adjust the activating and inhibiting weights upwards
  • Pass information on error to the neurons in the previous layer (hidden layers)
  • These neurons keep an error count and estimate how much they contribute to the error
  • These estimates are used to adjust the weights for the inputs in that layer, and error information is sent to the neurons in the layer before that