Welcome to electrical and electronics engineering Q&A site...

Welcome to electrical and electronics engineering discussion website, Please login or register to continue.

Join our WhatsApp group

Subscribe To Our YouTube Channel

in Embedded System Design by

Amazon Shopping

Please log in or register to answer this question.

1 Answer

0 votes

Shared memory :

For sharing of data faster and communication between programs, we use shared memory. Shared memory can be used with multiprocessors and single processors. Means Program can be run on the single processor and multiple processors the memory used for communication between threads of the program is called shared memory. In the shared memory system, the single processor has the access to the same memory and also if there are multiple processors they also have the access to same memory. If the applications are developed for shared memory they can share data by using same memory location. Shared memory is the method of Inter-Process Communication (IPC). Shared memory is faster than message queue.

Shared memory has two types:

1.Uniform memory access

2.Non-uniform memory access

The shared data should be protected otherwise it will cause shared data problems.


The mutex is the key to the shared resource. The mutex is the program object which is used for sharing the same resource among multiple program thread. The shared resource cannot be used by multiple threads so for locking the shared resource we use the mutex. If the shared resource is lock by mutex then the thread will go into the queue and when the shared resource is unlocked by mutex then the shared resource is used by another thread. Mutex provide mutual exclusion. A mutex does not allow the access to shared resource simultaneously.

There are two basic operations of mutex:

1. LOCK(mutex)

2. UNLOCK(mutex)

The mutex lock the shared resource when it is used by the thread and unlock the shared resource when the task finishes.

Message passing:

Message passing is the method of interprocess communication (IPC). Message passing is slower than shared memory. Message passing is used in parallel programming and object orientated programming. Message passing can be synchronous or message passing can be asynchronous.


Deadlock is a problem where threads or processes are in waiting state and waiting for each other to unlock or to release the shared resource. Means thread is waiting for the next thread to unlock while the next thread is waiting for the first thread to unlock for execution, So both stops progressing execution and result in deadlock process. By rebooting or resetting the entire system we can end the deadlock.

Deadlock may be caused due to:

1. Mutual exclusion

2. Hold and wait

3. No resource preemption

4. Circular wait

If the four conditions occur simultaneously then the deadlock occurs.

Amazon Shopping

Welcome to Q&A site for electrical and electronics engineering discussion for diploma, B.E./B.Tech, M.E./M.Tech, & PhD study.
If you have a new question please ask in English.
If you want to help this community answer these questions.


Most popular tags

power motor dc circuit transformer voltage current used system phase factor resistance load synchronous energy ac induction generator electric series frequency capacitor use speed between electrical meter line type mosfet control transmission difference magnetic plant high single instrument bjt source advantages function diode machine unit winding torque amplifier define supply thyristor motors arduino field shunt maximum relay armature problem electricity time parallel on transformers types coil diagram state flow value material three starting and direction theorem method emf operating digital microprocessor test instruments efficiency ratio loss measure operation connected low applications wave effect single-phase working losses different network wattmeter temperature measuring constant signal controlled breaker device full compare drive wire resistivity logic materials machines inductance switch flux disadvantages converter transistor gain protection scr angle force core measurement number free principle rc generators law negative bridge friction open circuits pole conductor conservation steam iron loop resistors hysteresis short computer using lines secondary station battery rectifier inverter linear relays nuclear regulation reactance design analog work rotor electronics gate forces diesel damping rlc connection factors capacitors minimum insulation basic moving running systems air fault range direct main stability quality starter igbt eddy ideal ammeter rl 3-phase plants arc induced thermal error fuzzy biasing dielectric pressure balanced superposition errors rotation characteristics feedback measured electronic start alternator off back curve over solar three-phase tariff locomotive peak bias zener capacitance commutator surge rating universal potentiometer permanent mechanical copper self transducer capacity electrons memory adc excitation inductive transfer explain fuse pure harmonics application inductor internal pmmc average reaction welding resonance traction breakers designed electromagnetic si generation brushes density switching shaded rate impedance distribution methods star oscillator reluctance semiconductor simplification algebra 8085 boolean weston dynamometer insulating strength installation permeability definition fuel heating earth units neutral rms rated engineering conductors coefficient controller usually reverse excited analysis change body components