Karso Flashcards

(10 cards)

1
Q

What is denotational semantics?

A

Map our programs to elements of a semantic domain

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

What is a semantic domain?

A

A set of possible values a program can be. For example the semantic domain of a program that adds two integers could be the set of all integers.

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

What’s the problem about denotational semantics?

A

Modelling recursion is very hard. The model is \too big"”

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

What is operational semantics?

A

Use inductively defined relations to map programs to values.

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

What’s the difference between denotational semantics and operational semantics?

A

Denotational semantics map programs to elements of a semantic domain. Operational semantics inductively defined relations to map programs to values

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

Features of Actors in concurrency?

A

Actors do not share memory. Actors have unique addresses to which they can be sent messages. Actors have a thread of control. Actors have a \mailbox" that acts as a FIFO queue for incoming messages.”

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

Pre-emptive multi-tasking vs cooperative multi-tasking?

A

Pre-emptive multi-tasking that makes it hard to ensure that code is correct. Cooperative multi-tasking ensuring that code is correct is much easier because of the predictable context switches.

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

What is context switches?

A

The operation of switching control from one thread to another

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

Parallelism vs concurrency?

A

Concurrency allows multiple tasks to be in progress at the same time, even on a single-core processor, by rapidly switching between them. Parallelism executes multiple tasks truly simultaneouly, typically require multiple CPU cores or processors.

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

Goroutines vs Coroutines?

A

Goroutines are much more like lightweight threading, they are implemented using thread pools and goroutines run in parallel. Goroutines use channels to coordinate their behaviour rather than using yield.

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