Difference between logical address and physical address

Asked By 40 points N/A Posted on -
qa-featured

Hi,

What is the difference between the logical address and physical address?

And I also want to know that why hardware interrupts are non preemptive?

Kindly give me a clear and easy to understand the answer. 

SHARE
Best Answer by kjobade
Answered By 25 points N/A #128329

Difference between logical address and physical address

qa-featured

The Logical address is different from physical address. Logical address indicates a memory location appears to reside from the perspective of an executing application program. Due to the operation of a memory management unit (MMU) between the CPU and the memory bus logical address may be differ from physical address. There are various purposes to keep differ the both addresses.

Physical addresses are also known as real address or binary address. It is a physical memory address that is actually presented electronically on the computer address bus circuitry in the form of binary numbers. The physical address is used to enable the data bus, to reach a specific storage location of main memory.

For your clarification; two different logical addresses may have a same physical address. It is possible that one address is accessed by the program and data pass through processor cache. While if it is accessed at the other address, it will bypass the cache.

Hardware interrupts are non-preemptive. The reason for non-preemptive can be understood by the following example.
Suppose hardware interrupts are preemptive. If we enter a character ‘X’ then H/W interrupt will occur to process it. During the process of the interrupt we enter another character ‘Y’.

As we suppose that the interrupts are preemptive then prior request will be preempted and another instance for the H/W interrupt call will be generated. In this example first of all the character ‘Y’ will be fully processed and received and then the character ‘X’. So the order of input will change to YX while the right & given sequence was XY.

Answered By 0 points N/A #128330

Difference between logical address and physical address

qa-featured

The difference between physical address and logical address/real address are following.

Usually CPU generates the logical address. Physical address is memory unit or location, and by the data bus it allows reaching a desired memory cell in the main memory. It is also known as real addresses.

LOGICAL ADDRESS:

In a running program, we need to locate an object or file in the address that is given by the logical address. First of all, Before using a logical address it must be mapped to physical addresses. Mapping of logical address to a physical address is handled by a hardware device called the Memory Management Unit (MMU). Address mapping could not be processed without the hardware support. Logical and physical addresses are the same in behavior of compile time and load time. But they are differing in execution time address binding.

PHYSICAL ADDRESS:

Physical address or the real address is located physically (in binary form) on the main memory. When an executed program is mapped into the physical address then CPU generates Logical addresses by using the MMU.

Answer of the 2nd part of your question is that the Hardware interrupt is Non-Preemptive: Non-preemptive algorithms or interrupts are designed so that when a process is started and then executing it should not be stopped by any other interrupts. Non preemptive interrupts block the removal from the processor and helps to complete the process. Context_switch() is called only when the process terminates or blocks.

Answered By 0 points N/A #128331

Difference between logical address and physical address

qa-featured

Logical address is also called as IP Address which is used as your address towards the internet. It is assigned to you by the ISP whenever you want your computer to be connected to the internet. The physical address is somehow what you called as the Mac Address. It is the address of your device/hardware such as router and switch. You can identify your Physical and Logical address by typing ipconfig on your command line interface. 

Hardware interrupts are not preemptive to assure that everything will fall in to place. Your computer and software are secure of any means of corruption. This helps you to manage your software and hardware correctly with the use of these interruptions you are being notify of something malicious or something undesirable.

Answered By 0 points N/A #128332

Difference between logical address and physical address

qa-featured

 

Hi there John!
 
The difference between a Physical address and a Logical Address is that a Physical address is a 48-bit flat address burned into the ROM of the Nic card This is unique for each system and cannot be changed. While a Logical Address is a 32- bit address assigned to each system in a network. This works in Layer-3 of OSI Model. This would be generally the IP address.
 
In line with your second question, the answer is that, the reason for this non-preemptive can be understood by the example illustrated as follows: Let’s first consider that the hardware interrupts are preemptive for argument sake. If a character ‘A’ is input a H/W interrupt will occur to process it, while this interrupt is being processed another character is input say ‘B’ in case the interrupts have been preemptive the previous instance will be preempted and another instance for the H/W interrupt call will be generated.
 
And similarly consider another character is input ‘C’ and the same happened for this input as well. In this case the character first to be fully processed and received will be ‘C’ and then ‘B’ will be processed and then ‘A’. So the sequence of input will change to CBA while the correct sequence would be ABC. 
 
If you have other questions in mind, please don't hesitate to ask. 
Answered By 0 points N/A #128334

Difference between logical address and physical address

qa-featured

Logical addresses are all generated by the CPU after the execution of a program whereas the physical addresses are generated after the CPU generates the logical addresses. These logical addresses are sent through the MMU (memory management unit) after which they are converted into physical RAM addresses. Therefore, the physical address is the address seen by the memory unit loaded in the memory address register of the memory.

An interrupt is an asynchronous signal that indicates the need for attention in computing. Hardware interrupts are non preemptive as such that they cause the processor to save its state of execution and begin the execution of the interrupt handler. In computing, preemption is temporarily interrupting a task being carried out by the computer system without requiring its cooperation and then resuming the task at a later time.

If hardware interrupts were preemptive, they would result in system failure. Non-preemptive algorithms are designed so that once a process enters the running state, it is not removed from the processor until it has completed its service time.

Best Answer
Best Answer
Answered By 0 points N/A #128336

Difference between logical address and physical address

qa-featured

The difference between a physical address and a logical address is following.

A physical address is a MAC address (Media Access Control) which is a machine address and can’t be changed. While a logical address is the IP address which is given manually and changes over the networks.

The manufacturer gives a physical address in their network interface cards (NICs) which is 48-bit MAC (Media Access Control). That address makes the every device unique ID. The MAC address is the Ethernet or hardware address, and cannot be changed. The MAC or Ethernet address is associated with a data Link layer of the OSI Model. While a Logical address is a 32- bit IP address configured to each system in a network by the server or network administrator which works in Layer-3 of the OSI Model.

Your second question is about non preemptive interrupts. Let me clear that we cannot interrupt or change the hardware interrupts. Hardware interrupts are keeping us non preemptive to complete the running processes it is should not be removed from the processor until it explicitly yields. Pending interrupts are processed in order of their priority or first come will be served first.

Login/Register to Answer

Related Questions