Tuesday, September 14, 2010

What effect does caching memory have on Direct Memory Access (DMA)?


            Direct memory access (DMA) has become a vital part of many high-end systems. For it allows additional bus masters to read or write system memory independently of the CPU(s).

            By definition, DMA is a method of transferring data from the computer's RAM to another part of the computer without processing it using the CPU. While most data that is input or output from your computer is processed by the CPU, some data does not require processing, or can be processed by another device. In these situations, DMA can save processing time and is a more efficient way to move data from the computer's memory to other devices.

 
             In other words, it is the capability to allow data to be sent directly from an attached device (such as a disk drive) to the memory on the computer's motherboard.       

DMA channels can transfer blocks of data to or from devices with no CPU overhead. These blocks of memory are being copied from RAM to or from a buffer on the device. Such an operation usually does not stall the processor, which as a result can be scheduled to perform other tasks unless those tasks include a read from or write to memory.

But, though it is a more efficient way of moving data from the computer’s memory to other devices, it has also problems during caching memories.

          As an effect of caching memory, DMA may lead to cache coherency problems. Cache coherency refers to the consistency of data stored in local caches of a shared resource.



            Say for example, when the CPU accesses location X in the memory, the current value will be stored in the cache. Subsequent operations on X will update the cached copy of X, but not the external memory version of X. If the cache is not flushed to the memory before the next time a device tries to access X, the device will receive a stale value of X.

            Similarly, if the cached copy of X is not invalidated when a device writes a new value to the memory, then the CPU will operate on a stale value of X.


 

Another problem that might occur is that when a device is programmed with an invalid physical address, the result is a bus error interrupt. The interrupt is taken by some CPU that is enabled for bus error interrupts. These interrupts are not simple to process for two reasons. First, the CPU that receives the interrupt is not necessarily the CPU from which the DMA operation was programmed. Second, the bus error can occur a long time after the operation was initiated.

 


Reference


TechTerms, n.d., ‘DMA (Direct Memory Access)’, viewed 3 September 2010,




Wikipedia, n. d., ‘Cache_coherence’, viewed 3 September 2010,




Russell Hitchcock, Dec 18, 2008, ‘Cache Coherency’, viewed 4 September 2010,   



Physical and Virtual Memory, n.d., ‘Chapter 1. Physical and Virtual Memory’, viewed 4 September 2010,   


What is Ecommerce security? What are the elements of a secured Ecommerce System? What are the security risks of an Ecommerce installation? How can these risks be avoided or reduced?

*                    Basically, e-Commerce Security provides protection from different attacks between the client and web server.


*      A secured e-Commerce System must have the following Security Features:

Authentication: Verifies who you say you are. It enforces that you are the only one allowed to logon to your Internet banking account.

Authorization: Allows only you to manipulate your resources in specific ways. This prevents you from increasing the balance of your account or deleting a bill.

Encryption: Deals with information hiding. It ensures you cannot spy on others during Internet banking transactions.

Auditing: Keeps a record of operations. Merchants use auditing to prove that you bought a specific merchandise.




*      Security risks of an e-Commerce installation:

THREATS
These are things that can go wrong or that can 'attack' the system. Examples might include fire or fraud. Threats are ever present for every system.

VULNERABILITIES
These make a system more prone to attack by a threat or make an attack more likely to have some success or impact. 



*       To avoid security risks:
  •   keeping secure passwords
  •   changing passwords often for administrative access to system (root access)
  •   granting the most limited access needed to employees
  •   having procedures in place to revoke privileges when employees leave the company

*       To reduce security risks:

Step 1: Identify security threats and risks in the organization.
Step 2: Prepare specific organizational requirements and controls.
Step 3: Quantitative and qualititative approach.

Case: Assume that John wants to buy some CD from an online shop called MusicPlus.

(a)How John should encrypt the information and send via the Internet so that the information will be sent securely to MusicPlus.

  •  To send information securely to MusicPlus via online, John must provide a digital certificate and encrypt the information that will be sent through Asymmetric encryption which provides a private key (for the owner/sender) and public key (for the receiver).


 
(b)How MusicPlus can ensure the information received is not being altered during the transmission process.

  • To ensure that the information has not been altered, MusicPlus must (1) verify the digital certificate like using Microsoft Internet Explorer for it uses Authenticode technology which verifies that the program has a valid certificate and (2) try to call the customer for further verifications and to ensure the transaction.
 






What are the differences between key distribution centre and certification authority?
  •      Key distribution centre simply identifies the key of who is the owner/sender of the encrypted message.
  •      Certification authority just authenticates the encrypted message by providing a digital certificate.