Concurrent Programming

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Flashcards about concurrent programming in real-time and embedded systems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

How does Arduino programming handle concurrency?

Uses a single processor without scheduling and concurrency is with interrupts.

2
New cards

What do more sophisticated systems use instead of Arduino's simple programming?

More sophisticated systems use a RTOS which provides many of the features of operating systems.

3
New cards

What are some potential issues with concurrency?

Deadlocks, race conditions, memory or cache consistency.

4
New cards

What happens in a multithreaded environment when multiple threads access the same resource?

Each thread has its own local thread stack and registers. Accessing the same resource for read and write may result in incorrect values.

5
New cards

What are some methods for synchronizing interrupts?

Disable and enable interrupts, interrupt priorities, and declaring variables to be volatile.

6
New cards

What are the methods for synchronization on different processes?

Event, Mutex, Semaphore

7
New cards

What is the method for synchronization on the same process?

Critical Section

8
New cards

What is a Mutex?

A thread synchronization object that allows only one thread at a time to access a resource.

9
New cards

What are Condition Variables & Monitors?

Code region controlled by a mutex, with wait/notify functionality.

10
New cards

What is a Semaphore?

A thread synchronization object that allows zero to any number of threads access simultaneously.

11
New cards

What are some issues or problems in allowing tasks to send messages to another task?

Representing messages, fixing buffer size, determining who needs to wait, minimizing synchronization and overhead, and efficient implementation.

12
New cards

How can messages be managed?

Fixed size: easy. Variable size: include the length either directly or indirectly.

13
New cards

What does a fixed sized circular buffer use?

Start data pointer and end data pointer in common shared memory.

14
New cards

Why is synchronization needed for read/write operations?

Ordered processing and synchronized (atomic) read/write operation if more than one reader or writer.

15
New cards

How do synchronized threads communicate with each other in Java?

Using wait(), notify(), and notifyAll() methods.

16
New cards

What are the synchronization problems?

Deadlock, Race Conditions, Priority Inversion, Performance

17
New cards

What is priority inversion?

When a higher-priority ready task fails to run when it should.

18
New cards

What are the common methods for fixing Priority Inversion?

Priority inheritance and priority ceiling.