<br><br><div class="gmail_quote">On Sat, Aug 6, 2011 at 10:56 AM, Mulyadi Santosa <span dir="ltr"><<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat, Aug 6, 2011 at 23:59, subin gangadharan<br>
<<a href="mailto:subingangadharan@gmail.com">subingangadharan@gmail.com</a>> wrote:<br>
> Hi All,<br>
> I have some doubts on the alignment requirement.It would be really<br>
> helpful,if someone can shed some light on this.<br>
> Why there are so many different types of alignment like 4 byte, 8 byte,16<br>
> byte ?.My exact question is, in a 32 bit machine(I assume processor reads<br>
> data in 4 bytes),how 16 byte alignment makes different from 4 byte alignment<br>
> ?.How this will influence the processor performance ?.<br>
<br>
</div>personal guess: cache line alignment?<br>
<br>
... so the data all can be read in one read swipe.....<br>
<br>
or in other hand, if several data has different access type (some are<br>
read only, the rest are read/write), then by aligning them to<br>
different cache line, they won't interfere to each other...since AFAIK<br>
a write to even one bit in a cache line will update the whole cache<br>
line. Other data in the same cache line will stay, they will be just<br>
rewritten AFAIK.<br>
<br>
I hope my guess is right :)<br></blockquote><div><br></div><div>Thanks for your quick reply.I have one more question.</div><div> So in case of processor with read/write granularity of 4 byte access,just for understanding purpose imagine it's with out cache.So in that case any difference is there between 4byte and other 8byte,16 byte alignment.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>With Regards<br>Subin Gangadharan<br><br><div>Everything should be made as simple as possible,but not simpler.</div><br>