search
person

1 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.

thumb_up_alt 0 like thumb_down_alt 0 dislike

Related questions

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

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 write ability and storage permanence with suitable diagram.

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 : Explain memory hierarchy.

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 : EEPROM VS FLASH MEMORY

Answer : EEPROM VS 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.

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

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

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

Description : Differentiate between RAM & ROM in PLC memory

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

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

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

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 

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 

Description : A material for good magnetic memory should have?

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

Description : Which of the following is not valid with reference to Message Passing Interface (MPI)? (A) MPI can run on any hardware platform (B) The programming model is a distributed memory model. (C) All ... implicit. (D) MPI - Comm - Size returns the total number of MPI processes in specified communication.

Answer : (C) All parallelism is implicit.

Answer : A semaphore is called binary semaphore when its value is 0, it is assumed that it has been taken (or accepted) & when its value is 1, it is assumed that it has been released & no ... that are not themselves reentrant.3. A reentrant function may does not use the hardware in a nonatomic way.

Description : Message passing is a principle to initialize an action by means of a  A) method B) object C) class D) attributes

Answer : Message passing is a principle to initialize an action by means of a method

Description : A specific editor has 200 K of program text, 15 K of initial stack, 50 K of initialized data, and 70 K of bootstrap code. If five editors are started simultaneously, how much physical memory is needed if shared text is used ? (A) 1135 K (B) 335 K (C) 1065 K (D) 320 K

Answer : (B) 335 K

Description : In UNIX operating system, when a process creates a new process using the fork() system call, which of the following state is shared between the parent process and child process? (A) Heap (B) Stack (C) Shared memory segments (D) Both Heap and Stack

Answer : (C) Shared memory segments 

Description : Explain operation of anti lock breaking system with its layout.

Answer : Fig. shows block diagram of the ABS system. Typically ABS includes a central electronic control unit (ECU), four wheel speed sensors, and at least two hydraulic valves (hydraulic unit or actuator) and ... wheel, thus reducing the braking force on that wheel; the wheel then turns faster.

Description : Explain with sketch the constructional features of “Anti Lock Braking” System.

Answer : Anti lock brake system: Figure shows block diagram of the ABS system. Typically ABS includes a central electronic control unit (ECU), four wheel speed sensors, and at least two hydraulic ... at the affected wheel, thus reducing the braking force on that wheel; the wheel then turns faster.

Description : Explain in brief how anti-lock braking system works

Answer : An ABS is a system on motor vehicles which prevents the wheels from locking while braking stopping safely is one of the most important functions a motor vehicle can perform. Diagram: ... to decrease the pressure on the braking circuit, effectively reducing the braking force on that wheel.

Description : Define dead zone of instrument and explain the reasons of dead zone.

Answer : Definition of dead zone: It is the largest range of values of a measured variable to which the instrument does not respond. It is the largest change of input quantity for which there is ... highly stressed material. Intentionally dead zone is provided to increase the life span of the instrument.

Description : Explain the working and principle of dead weight tester.

Answer : Dead weight tester:  Principle: It works on the principle that the downward force of the weight on the top of the piston is balanced by the pressure exerted by the fluid beneath the piston  ... within the cylinder when the fluid gauge pressure equals the dead weight divided by the piston area.

Description : Draw and explain the construction and working of Dead Weight Tester.

Answer : Construction:- Deadweight Tester (DWT) is used for calibration of pressure gauges . A dead weight tester is an instrument that calibrates pressure by determining the weight of force divided by ... the error at each gauge reading and ensure that it is within the acceptable accuracy limits.

Description : Explain the process of calibration of pressure gauge by Dead Weight Tester.

Answer : Deadweight Testers (DWT) are the primary standard for pressure measurement. A dead weight tester is an instrument that calibrates pressure by determining the weight of force divided by the area the force ... at each gauge reading and ensure that it is within the acceptable accuracy limits.

Description : Which of the following is a cause of frictional unemployment? (a) Non-availability of work due to strike and lock-out. (b) Temporary unemployment due to change over in jo(b) ; (c) Both ; (d) None

Answer : (c) Both ;

Description : Disguised unemployment is mainly due to (a) Under employment ; (b) Seasonal nature of work ; (c) Strike and lock-out ; (d) Structural changes in the economy

Answer : (a) Under employment ;

Description : Explain placement, routing, and sizing.

Answer : Placement: The task of placing and orienting every transistor somewhere on IC. Routing: The task of running wires between the transistors without inserting other wires or transistors. ... wires and transistor provide better performance but consume more power and require more silicon area.

Description : Explain parallel and wireless protocols.

Answer : Parallel protocols: PCI bus (Peripheral Components Interconnect): PCI stands for Peripheral Components Interconnect. PCI bus is used as a communication line to transmit signals and data ... provide the basis for wireless network products using the Wi-Fi brand.

Description : Explain FSM and concurrent process with example.

Answer : Finite State Machine (FSM): Finite state machine is a machine which have a transition from state to state. The system have some number of states and at a time the system can ... Y seconds. In sequential execution, the processor executes single task which causes poor processor utilization.

Description : What is watchdog timer ? Explain the implementation of time out for ATM with block diagram and program.

Answer : A special type of timer is a watchdog timer, which will reset the system after a predefined timeout. Watchdog timer reset timer every X time unit, else timer generates a signal ... be loaded into timereg. This is to prevent erroneous software from unintentionally resetting the watchdog timer.

Answer : The scheduler is very important in Real-Time Operating System (RTOS). Selection of tasks for execution is provided by the scheduler. Which task to execute when it is provided by the ... . Non-preemptive scheduling is simple.Preemptive scheduling is flexible while non-preemptive scheduling is rigid.

Description : List and explain the various functions supported by Linux/RTLinux.

Answer : Various functions of RTLinux is as follows: Interrupt handling functions

Description : As per the Maternity Benefit Act, maternity benefits are NOT applicable in the following situation a) if the child is born outside wed-lock b) if the woman is unmarried c) none of the above

Answer : c) none of the above  

Description : Simplest way of deadlock recovery is (A) Roll back (B) Preempt resource (C) Lock one of the processes (D) Kill one of the processes

Answer : (D) Kill one of the processes

Description : The Panama Canal is different from the Suez Canal as it has (1) Lock system (2) Shorter route (3) Busy route (4) Less busy route

Answer : Lock system

Description : In a PLL, lock occurs when the (A) input frequency and the VCO frequency are the same (B) Phase error is 1800 (C) VCO frequency is double the input frequency (D) Phase error is 900

Answer : In a PLL, lock occurs when the input frequency and the VCO frequency are the same

Description : The lock range of PLL is not governed by  A) Low pass filter B) VCO C) Amplifier D) Phase detector

Answer : Common computation models: Sequential program model Statements, rules for composing statements, semantics for executing them Communicating process model ... Object-oriented model For breaking complex software into simpler, well-defined pieces

Description : Explain the various steps involved in designing a custom single-purpose processor.

Answer : A single purpose processor is a digital circuit designed to execute exactly one program. It is also known as co-processor, accelerator or peripheral. It contains only ... for small quantities. Performance may not match general-purpose processors for same applications.

Description : Explain Inter-process Communication (IPC) using mailbox/queue.

Answer : Inter-process communication using mailbox: Mailbox is the Interprocess communication mechanism. A process puts a data message for another process in the mailbox. Mailbox is also called as message exchange. ... a message. In mailbox IPC the sender need not to know the name of the receiver.

Description : Explain arbitration. What is priority arbitrator?

Answer : Arbitration: IF multiple peripherals are connected to microprocessor or DMA controller or any resource and they request services simultaneously so which peripheral will get serviced first this is ... Peripherals make requests to arbiter and arbiter makes requests to the resource.

Description : What is design technology? Explain top down design process.

Answer : Design technology: Design technology is the manner in which we convert our concept desired system into an implementation. The three main design technologies are 1. Compilation/Synthesis ... general purpose processors and A Gate-level Netlist for special-purpose processors.

Description : Explain data transfer mechanism in I2C protocol. Compare it with CAN and USB protocol based on bit rate and area of applications.

Answer : I2C (Inter-Integrated Circuit): I2C stands for Inter-Integrated Circuit. I2C is a serial protocol. It was developed by Philips Semiconductor. I2C bus have two communication lines. One is serial data ( ... Mbps this is used for lower speed devices. Using USB we can connect upto 127 devices.

Description : Explain Keypad controller.

Answer : Keypad Controller: It's a device which interfaces between the computer and keyboard. That is a input device and used for transfer the data to connected device.

Answer : UART takes parallel data and transmits serially and UART receives serial data and converts to parallel.A simple UART may possess1.Some configuration registers and2.Two independently operating processors, one ... must write data to the transmit register and/or read data from the received register.

Answer : There are three different host/target architecture for embedded Linux.Linked setupRemovable storage setupStandalone setup1. Linked setup :In this host/target architecture, the host and ... cross-platform development environment.The target contains bootloader, kernel, and root filesystem.

Answer : Various features of Linux that are used in embedded systems are as follows : Linux is multiuser operating system. Linux is open source and free. Linux can be ... Linux supports handling of errors. Real-time Linux supports the group scheduling functions.

Description : a) Time to market b) The performance

Answer : a) Time to market :Time to market is the time from development of an embedded system to sell it to customers is called time to market. For more profit, the time to market should be ... losses due to delayed entry.b) Performance :Latency and throughput are the two main measures of performance.

Description : Believes, attitudes, traditions and expectations which are shared by group members is called (a) Group norms ; (b) Group communication ; (c) Group cohesiveness ; (d) Group structure

Answer : (a) Group norms ;

Description : A motivational approach in which an organization‟s financial statements are opened to and shared with all of the employees is called ___________ (a) Open Book Management ; (b) Pay for Performance Program ; (c) Reinforcement Theory (d) Feedback

Answer : (a) Open Book Management ; 

← Prev Question Next Question →
editAsk a Question
...