670 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

0 views

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.

1 answer
0 views

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.

1 answer
1 view

Description : What would your message in a bottle be?

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

1 answer
175 views

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.

1 answer
201 views

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.

1 answer
3.6k views

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.

1 answer
439 views

Description : EEPROM VS FLASH MEMORY

Last Answer : EEPROM VS FLASH MEMORY

1 answer
0 views

Description : Meaning behind these strange notes.

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

1 answer
156 views

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.

1 answer
48 views

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. 

1 answer
1 view

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!

1 answer
2 views

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.

1 answer
0 views

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.

1 answer
0 views

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.

1 answer
0 views

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.

1 answer
1 view

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

Last Answer : Yes, I will have a go.

1 answer
1 view

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.

1 answer
0 views

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.

1 answer
2 views

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.

1 answer
1 view

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.

1 answer
0 views

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.

1 answer
4 views

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.

1 answer
0 views

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

Last Answer : When you forget that you know.

1 answer
0 views

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.

1 answer
2 views

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.

1 answer
0 views

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.

1 answer
1 view

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.

1 answer
3 views

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.

1 answer
0 views

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.

1 answer
1 view

Description : How do you improve your memory?

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

1 answer
0 views

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.

1 answer
0 views

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.

1 answer
3 views

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!

1 answer
0 views

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

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

1 answer
0 views

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

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

1 answer
3 views

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.

1 answer
0 views

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.

1 answer
0 views

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.

1 answer
1 view

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.

1 answer
23 views

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

1 answer
7 views

Description : 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.

1 answer
10 views

Description : 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.

1 answer
101 views

Description : 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

1 answer
207 views

Description : 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

1 answer
243 views

Description : 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

1 answer
154 views

Description : 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 

1 answer
174 views

Description : A material for good magnetic memory should have?

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

1 answer
5 views

Description : 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

1 answer
1 view

Description : 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.

1 answer
...