Mindmap
Semaphores/Sockets

Inhalt der Mindmap
Semaphores/Sockets
Concurrency = Processes executed simultaneously ie. several apps running on one machine
Issue? - Uncontrolled access to shared data ie. this may allow two people to book the same tickets at a concert
To combat this? - Only one process allowed in the critical section at any one time
Processes compete for the same, shared, resources - Without synchronisation unpredictable and incorrect executions can result
- Synchronisation = Mutual exclusion of any process not in the critical section
- Synchronisation is implimented by the use of Semaphores
- Semaphores = An object with methods Called by processes sharing a resource
- There are two types of semaphores Binary semaphore, either 0 or 1 that is essentially a flag to signal when using critical region OR Counting semaphore, > 1 Basic implementation every process issues a wait on entering critical section and Signal finished on exiting
- See producer/consumer problem
- There are two types of semaphores Binary semaphore, either 0 or 1 that is essentially a flag to signal when using critical region OR Counting semaphore, > 1 Basic implementation every process issues a wait on entering critical section and Signal finished on exiting
- Semaphores = An object with methods Called by processes sharing a resource
- Synchronisation is implimented by the use of Semaphores
- Synchronisation = Mutual exclusion of any process not in the critical section
A socket is an endpoint for communication
Two communicating processes over a network each use a socket to identify them
Socket defined by port number and ip address
How does this work? - Client-server architecture A server listens for client requests When a request is received the server uses the socket details to set up a connection.
More... - Well-known services: telnet:23, ftp:21, http:80 --- All ports below 1024 are considered well-known --- The client will allocate the port number to the process initiating communication --- Random port greater than 1024.
Bilder und Dateien der Mindmap
Informationen
- Beschreibung
- Mindmap am Semaphores/Sockets, erstellt von Tom David am 20/05/2015.
- Erstellt von
- Tom David
- Aufrufe
- 0
- Bewertung
