Concurrent Programming Flashcards

1
Q

Threads

A

Threads managed by the scheduler allow access to shared resources such as processors and variables
They can be different priority levels so that high priority reads get more processor time than low priority ones

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

Advantages

A

Users may interact with apps while tasks are running eg stopping file download in a web browser
Short running tasks aren’t delayed by long running ones eg a web page can be served whilst processing a query

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

Deadlock

A

Two threads depend on each other to finish before they execute the rest of their code
They never end and so are never executed

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

Race Condition

A

Two or more threads attempt to access a variable and are ‘racing’
Unpredictable results

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

Resource Starvation

A

High priority thread locks a lower priority thread out of the resources it requires to execute and so it never does

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

Concurrency Control

A

Ensuring that all threads operate in the correct sequence/priority

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

Other facts

A

Translation software is used to manage the execution of threads concurrently
Programmer writes the code to solve the problem but threading of translated code is carried out by software

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

Describe concurrent programming

A
  • Code is run simultaneously
  • Programming works the same as sequential programming
  • Streams may interfere with each other
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Evaluate suitability of design for touch screen/smartphone device

A

Reduced strain on resources
Easy to understand - users completes tasks quicker - resources freed quicker

Accuracy of info entered -
Potential misspelling of criteria when text entry used but offers flexibility
Selection of data eg calendar is more fiddly but provides accuracy

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

Examples of Intellectual Property Rights

A

Copyright - Gives original exclusive rights to any artwork

Trademarks - Use of these without permission is regarded as a breach of IPR

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

Why might a subclass only contain a limited number of instance variables?

A

It inherits all of the instance variables and there is no need to redefine them

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

How does encapsulation work on lines?

A

Method on a line can access instance variables since the instance is inside the class definition

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

How analytics which exhibit features of intelligent systems may be used in order to benefit commercial businesses

A

Analytics designed to recognise key words in posts and comments
Helps businesses to learn more about what people think of new products, adverts and developments
By analysing user posts, businesses can better understand customer preferences and improve their ability to detect potential problems

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