Please Log in or Register for more.


665 views

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.


Mutex:

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:

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.

Like 0 like

Please log in or register to answer this question.

Related Questions


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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







What would your message in a bottle be?
Last Answer : Call me. Beechwood 45789. you know, the song.

Show More

1 view 1 answer







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.

Show More

171 views 1 answer







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.

Show More

186 views 1 answer







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.

Show More

3.5k views 1 answer







EEPROM VS FLASH MEMORY
Last Answer : EEPROM VS FLASH MEMORY

Show More

434 views 1 answer







Meaning behind these strange notes.
Last Answer : Sounds like a viral, do you get paid overtime working on a Saturday?

Show More

0 views 1 answer







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. 

Show More

43 views 1 answer








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.

Show More

149 views 1 answer







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!

Show More

0 views 1 answer







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.

Show More

1 view 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







Anyone care to take some of these brain and memory tests and share the results?
Last Answer : Yes, I will have a go.

Show More

0 views 1 answer







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.

Show More

1 view 1 answer







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.

Show More

0 views 1 answer







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.

Show More

1 view 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







How do you know you're experiencing unusual short-term memory loss?
Last Answer : When you forget that you know.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

1 view 1 answer







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.

Show More

0 views 1 answer







How do you improve your memory?
Last Answer : Sometimes number game are good for memory improvement.

Show More

1 view 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







What if you erase the memory of a killer?
Last Answer : Wasn’t there a movie like that? It isn’t possible – yet. GQ!

Show More

2 views 1 answer







What's your best/worst holiday memory?
Last Answer : When I unwrapped my Turbo Man action figure!

Show More

0 views 1 answer







Do old brain cells transfer memory to new brain cells?
Last Answer : Calling Matt Browne!!! Calling Matt Browne!!!

Show More

0 views 1 answer







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.

Show More

2 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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.

Show More

0 views 1 answer







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

Show More

19 views 1 answer







How does Memory Work?
Last Answer : How does Memory Work? Every human being relies on the ability to store, retain and retrieve information; this process is facilitated by the memory. Human memory, while taken for granted by ... to our personal life, but also in business and education, much more animated research will continue.

Show More

6 views 1 answer







How to Format a USB Memory Key ?
Last Answer : How to Format a USB Memory Key USB ports are not just for storing large amounts of data on a flash disk or an external drive. When your computer fails because of an operating system problem, you ... these steps, you can create a USB memory key that can help you recover from serious system crashes.

Show More

9 views 1 answer







Differentiate between RAM & ROM in PLC memory
Last Answer : RAM ROM Random access memory Read Only memory Used for storing temporary data Used for storing fixed data such as programs Data is lost when power is removed Data is retained in case of power loss  Read write speed is quite faster Write operation is slow

Show More

100 views 1 answer







Calculate the size of memory address space for a 16 bit data and 20 bit address bus. A) 1 MB B) 2 MB C) 3 MB D) 4 MB
Last Answer : Calculate the size of memory address space for a 16 bit data and 20 bit address bus. A) 1 MB B) 2 MB C) 3 MB D) 4 MB

Show More

202 views 1 answer







The average time required to reach a storage location in the memory to read or retrieve the contents of memory is called as A) Turnaround time B) Latency time C) Access time D) Response time
Last Answer : The average time required to reach a storage location in the memory to read or retrieve the contents of memory is called as Access time

Show More

239 views 1 answer







What is the size of memory which can be accessed by direct accessing in 8085 microprocessor? A) 64 kB B) 4 kB C) 128 kB D) 128 MB 
Last Answer : What is the size of memory which can be accessed by direct accessing in 8085 microprocessor? A) 64 kB B) 4 kB C) 128 kB D) 128 MB 

Show More

149 views 1 answer







A material for good magnetic memory should have?
Last Answer : A material for good magnetic memory should have high retentivity.

Show More

167 views 1 answer













emaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value: a. Mutex b. Mutual Cc. Memory d. __ Allof these
Last Answer : Mutex

Show More

3 views 1 answer







How do you explain colors to a person born blind?
Last Answer : I would try to explain by touch.Is it warm or cold? and probably sound.Is is dull or bright/sharp.I am not sure what they would see in their mind’s eye.My mother was legally blind ,but of course was able to see some things and could also rely on her memory.

Show More

1 view 1 answer






Show More⇦ PreviousNext ⇨