1 Answer

Answer :

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.

Related questions

Description : Encode a message in an EMP burst?

Last Answer : There is a form of communication called meteor burst or meteor backscatter, You can bounce your radio signals off the ionized trails left by the meteor passing through the atmosphere. It works.

Description : It was a written request for a service on a bathroom wall. You read it and remember it. What did the message say?

Last Answer : Flush twice; it’s a long way to the cafeteria.

Description : What would your message in a bottle be?

Last Answer : Call me. Beechwood 45789. you know, the song.

Description : Explain the advantages and disadvantages of using memory I/O and standard I/O.

Last Answer : Memory mapped I/O and standard I/O are the two methods for communicating microprocessor with peripherals. Processor talks to both memory and peripheral using the same bus.Two ways to talk to a peripheral. ... of standard I/O is no loss of memory addresses to the use as I/O addresses.

Description : Explain memory hierarchy.

Last Answer : Memory hierarchy: Main memory is large, inexpensive, slow memory stores entire program and data. Cache memory is small, expensive, fast memory stores copy of likely accessed parts of large ... In memory hierarchy the smaller memory is faster and larger memory storage is slower.

Description : Explain memory write ability and storage permanence with suitable diagram.

Last Answer : Write ability and storage permanence of memories: Write ability is the manner and speed at which memory can be written. Storage permanence is the ability of memory to hold stored bits ... Holds bits after power is no longer supplied. High end and middle range of storage permanence.



Description : Meaning behind these strange notes.

Last Answer : Sounds like a viral, do you get paid overtime working on a Saturday?

Last Answer : EPROM EEPROM Flash EPROM Normalize cell size is 1. Normalize cell size is about 1 ... and floating gate, which is insulated by a dielectric material. NAND flash memory and NOR flash memory are the two types of flash memory.

Description : The distributed system is a collection of (P) and communication is achieved in distributed system by (Q) , where (P) and (Q) are : (A) Loosely coupled hardware on tightly ... message passing ,respectively. (D) Loosely coupled software on tightly coupled hardware and file sharing, respectively.

Last Answer : (C) Tightly coupled software on loosely coupled hardware and message passing ,respectively. 

Description : Do you do anything to exercise, enhance, or train your memory?

Last Answer : After chemo I had some pretty drastic cognitive and memory impairment. I started with crosswords, (very helpful) and also did logic puzzles. Even things like Where's Waldo type activities helped with focus ... never recover my full mental capabilities, but it's so much better than my post-chemo fog!

Description : Can you suggest some books, and YouTube videos for the study of memory disorders?

Last Answer : Here knock your socks off; but most I think will require a graduate degree into understand the chemistry and medical conditions. Alzhemer's Scholarly articles Youtube is more for how to change the ... money by lots of lots people visiting the site not one person interested in a medical condition.

Description : Is this type of memory problem something I should worry about?

Last Answer : It's been normal to me for about 10 years but I am a wee bit older. However, you don't need anything more to worry about. It happens to everyone sometimes and the anxiety will cause lapses at ... until the anxiety is under control. But do talk to your doctor or psychiatrist if it is stressing you.

Description : If you ventured to try, how hard would it be for you to write an autobiography from memory?

Last Answer : I remember quite a bit of detail, including dates, and events back to when I was two and a half. That’s just how my mind works. For me the biggest challenge would be editing it down to an interesting read.

Description : You are hit with an amazing memory, what is your next move?

Last Answer : I'd begin to believe in miracles. However, soon after I think I'd see it as a bit of a curse. Imagine the information overload problems. I think I'd check out how I could use my ... remember everything, perhaps I could begin to see patterns too and find solutions that have thus far been missed.

Description : Anyone care to take some of these brain and memory tests and share the results?

Last Answer : Yes, I will have a go.

Description : A memory unit stores 2^16 bytes in 32-bit words. How many address bits are necessary in order to retrieve a single word from this memory unit?

Last Answer : Each word is 4 bytes, which occupies 4 consecutive addresses at 16 bits each. The first 14 bits of these addresses will be the same, differing only in the two least significant bits. You only need to specify the first 14 bits, because there are only 2^14 words occupying those 2^16 bytes.

Description : What type of medical tests would be involved in checking my memory?

Last Answer : answer:First, they will probably do a mini-mental which is just a 30 minute or so list of questions and problems for you to solve. I had one and it was reassuringly normal and not difficult. ... PET scan or MMR of your brain functioning and physical conditioning. If you are concerned, you should go.

Description : What's up with my memory issues lately?

Last Answer : answer:Don't discount your busy schedule, stress, and sleep. I sleep about 5 hours (max) per night, have 3 kids, and with my wife in school I am basically a single dad right now. I have no ... chaos that is my life. This seems to help with remembering things because I'm delegating tasks to my phone.

Description : What can I do to improve my memory?

Last Answer : It get’s worse. Keep a calendar and write everything down. Edit. Keep a to do list as well. Use all of your technology for reminders. We’re bombarded with so much info it’s not surprising we lose some of it.

Description : How does memory recall sensations that closely mimic live senses?

Last Answer : answer:As I understand it the part of the brain that the olfactory senses are centered is located in the same region of the brain as memory. This says it better.

Description : Is it possible to have part of my memory wiped?

Last Answer : Unfortunately, these events add up to making you the person you will eventually wind up being, so they shouldn’t be erased.

Description : How do you know you're experiencing unusual short-term memory loss?

Last Answer : When you forget that you know.

Description : Why do i get a memory allocation error in Joomla 1.5?

Last Answer : answer:The error is generated by PHP, so the variables would be there instead. Here's an article for Drupal specifically From that: ------------- That indicates that Drupal needed more memory than PHP was ... root ------------- On your own box, for development, probably go with the top option.

Description : What exactly is a memory made out of?

Last Answer : From what I understand (keeping in mind I have no experience whatsoever in neuroscience) it is electrical impulses in the brain. When you read the word cat, your mind goes through every single ... bike. You learn once and never realllly forget, do you? Your brain's neuron pathways remember.

Description : How good is your memory?

Last Answer : answer:If you're over 40, this is probably just in the natural course of things. I started to panic about it when I was about 42 and suddenly couldn't remember things I knew very well, from ... not normal and does call for a little attention. When the chaos eased up, so did my memory problem.

Description : What's your earliest memory?

Last Answer : Eating mud in a friend’s front garden, aged 3. My brother told me I’d have worms growing in my stomach and I cried.

Description : Does anyone have suggestions for getting the vivid memory of a bad smell to go away?

Last Answer : Find another powerful smell, and smell that. Every time I clean my cats litterbox, I rub some eucalyptus oil under my nose first so I smell that instead.

Description : How does photographic memory work? Can you develop it?

Last Answer : Eidetic memory, or photographic memory seems to be innate. All memory can be improved with practice but it is unlikely that you can develop eidetic memory if you were not wired that way.

Description : How do you improve your memory?

Last Answer : Sometimes number game are good for memory improvement.

Description : Is there a way to have eidetic memory by practicing?

Last Answer : I believe that it is purely genetic. But there are some methods like the method of loci and peg systems that you can use to improve your memory which are helpful.

Description : Why is memory so often associated with intelligence?

Last Answer : I’ve never heard that people with poor memory are less intelligent… FYI that wasn’t a memory related joke either.

Description : What if you erase the memory of a killer?

Last Answer : Wasn’t there a movie like that? It isn’t possible – yet. GQ!

Description : What's your best/worst holiday memory?

Last Answer : When I unwrapped my Turbo Man action figure!

Description : Do old brain cells transfer memory to new brain cells?

Last Answer : Calling Matt Browne!!! Calling Matt Browne!!!

Description : Have you ever remembered a childhood memory that you somehow blocked for many years?

Last Answer : Yes I have my aunt does genealogy, and randomly, I remembered a lady that my grandmother had at her house a few times. I was like 4, and I remember she had really long white hair, and she let ... lady, and untill friday, I never thought about it. I found out that she was my great great grandmother.

Description : What childhood images or situations were your "very first" as "memory" essentially began for you?

Last Answer : no shit, a plane ride from Germany to the US when I was one. I remember sitting on the right side of the cabin, and a clear vinyl carry-on bag with yellow flowers my mother had Juicy Fruit gum in.

Description : Have you ever resorted to hypnotism for the purpose of memory recall?

Last Answer : I would be very interested in this, if someone has previous experience. I don’t believe in a lot of magic mumbo jumbo, but hypnosis for memory recall sounds totally plausible. My memory is awful, and full periods of my (arguably short) life are missing, as recently as a few years ago.

Description : If one uses his phone for reminders, will his memory worsen? I.O.W, if you don't use it, will you lose it?

Last Answer : No but you might turn in to this guy.

Description : The instructions for starting the computer are house on a. Random access memory b. CD-Rom c. Read only memory chip d. All of above

Last Answer : c. Read only memory chip