NVIDIA Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Padding is done to fast access the memory.Let us take ex of structure padding.
In it , structure members are aligned to be based on the memory pointer size.
If word size is 4 bytes then data should be read at the offset of multiple of 4.

- Piyush August 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Reading an writing to memory is done in the form of words. A word is read at a time. So supposing a word to be 32-bits, 4 bytes are read at a time. So it's easy to read addresses that are offsets of 4. That's why padding is done.

- codeX August 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Generally Padding use to alignment of bit data properlly.

hardware access data fast if it is properally align.

- Gaurav Kumar Garg December 23, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Padding is done to make data storage word aligned as accessing of word aligned data is fast.

- Anand Barnwal June 12, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Padding causes accessing of the memory which is aligned on the word boundary of the underlying processor.

This has following benefits:

a.Performance increases as the number of instruction cycles required are reduced due to alignment since CPU always performs read/write on its word size.

b.CPU can operate on the aligned word boundary atomically, meaning without any interruptions.

c.On processors which don't support unaligned access, it would result in it crash (but most of the compilers take care of the padding to meet the alignment requirements)

- Balaji December 05, 2017 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More