Results 1 to 7 of 7

Thread: Problem on simultaneously misaligned memory accesses bugs

  1. #1
    Join Date
    Sep 2010
    Posts
    65

    Problem on simultaneously misaligned memory accesses bugs

    Currently facing some problems in our office server, first one is rarely happened bug on address of a pointer/ ‘pMemory’, which is mis-aligned. In ‘pmemeory’ two threads accessed simultaneously(one is read the value and other one is modify the ‘pmemory’, from 0xFFFF FFFF to 0x02de 2c68 ). Again then the first thread read the higher part (0x02de). 8 CPU’s are using to run the program. 0xFFFF FFFF is the original value of ‘pmemory’. However a non-aligned data access impact on the performance of theprocessor. Any suggestion about this?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,366

    Re: Problem on simultaneously misaligned memory accesses bugs

    Two ways to overcome this problem. You should first aligned the data properly. And then use the locked instruction, which would provide the bus control signal which will permit the extra memory sub-system to separate the access atomic. I think it is the enough to modify the data with LOCK exchange instruction. Remember that on QPI-based systems the data locked instruction data can be very slow.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,277

    Re: Problem on simultaneously misaligned memory accesses bugs

    I read your post properly and I think that the test of the pointer 0xFFFFFFFF, which indicating you that the pointer is not set yet. You can change it by either the high word or low word similar to 0xFFFF. Generally allocations are aligned on 8 byte, so the lower pointer never be 0xFFFF. If you i9nsert any valid pointer into DWORD it will not have 0xFFFF for the words.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,465

    Re: Problem on simultaneously misaligned memory accesses bugs

    The address of the pointer 0xFFFF , the higher part of the last few pages of the virtual memory. Operating system in windows or the stack of address in *ux. You should make sure that what you insert into the pointer. Aligning the address of the pointer in DWORD (32 bit system architecture) or QWORD ( 64 bit system architecture) is as dimity would suggest you to assure what writes the operation.

  5. #5
    Join Date
    Apr 2008
    Posts
    3,424

    Re: Problem on simultaneously misaligned memory accesses bugs

    This kind of issue may overcome, if you make an alignment by forcing a 16 byte data structure. Where SIMD operands are drawn. You can also do this either by using declspec(align(16)), which is used to directs the static variable or mm_malloc(), which is called for an dynamic memory allocation. Both the language originated by the Intel compiler., also supported by the recent version of Visual C++ compiler

  6. #6
    Join Date
    May 2008
    Posts
    2,792

    Re: Problem on simultaneously misaligned memory accesses bugs

    According to my knowledge any misalignment will not be rectify by any means, by any natural algorithm. As for instance the “Motion estimation or motion compensation algorithms” is a good one for the video codec’s. This process is also known as “Macro book”, which is typically processed in 16x16 pixels resolution. The misalignment will be prevents if this will match with the XMM register size in the video frame

  7. #7
    Join Date
    Dec 2007
    Posts
    765

    Re: Problem on simultaneously misaligned memory accesses bugs

    The average pixel is computed in 16x16 blocks. You can see it as a small square shape. In 256 pixel it is shaped as the diagonal, adjacent to the lower right. It is 4 byte length and then divide by 10 to get the average value. The codes for the quarter-pixel interpolation by using SSE2 assembly. To producing the quarter pixel “rowloop” is generally used.
    No TechArena No Experts, Know TA know Experts!

Similar Threads

  1. Sony Xperia play screen Misaligned
    By ThePain in forum Portable Devices
    Replies: 8
    Last Post: 23-01-2012, 10:50 PM
  2. Found some memory bugs while using Phenom II X4 965 processor
    By Anvita in forum Motherboard Processor & RAM
    Replies: 5
    Last Post: 16-08-2011, 06:02 PM
  3. Droid 2 Global restart when application accesses GPS!
    By TABLITA in forum Portable Devices
    Replies: 6
    Last Post: 02-07-2011, 07:48 PM
  4. Inkjet clogged and misaligned print head
    By Efigenio in forum Hardware Peripherals
    Replies: 5
    Last Post: 17-02-2010, 02:52 AM
  5. Vista accesses hard disk even when idle
    By Segvoia in forum Operating Systems
    Replies: 2
    Last Post: 22-10-2008, 05:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,558,923.11834 seconds with 17 queries