Karso Flashcards
(10 cards)
What is denotational semantics?
Map our programs to elements of a semantic domain
What is a semantic domain?
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.
What’s the problem about denotational semantics?
Modelling recursion is very hard. The model is \too big"”
What is operational semantics?
Use inductively defined relations to map programs to values.
What’s the difference between denotational semantics and operational semantics?
Denotational semantics map programs to elements of a semantic domain. Operational semantics inductively defined relations to map programs to values
Features of Actors in concurrency?
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.”
Pre-emptive multi-tasking vs cooperative multi-tasking?
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.
What is context switches?
The operation of switching control from one thread to another
Parallelism vs concurrency?
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.
Goroutines vs Coroutines?
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.