Embedded Systems Questions and Answers – Buffer Memory

«
»

This set of Embedded Systems Multiple Choice Questions & Answers (MCQs) focuses on “Buffer Memory”.

1. How a buffer memory allocate its memory through the linker?
a) statically
b) dynamically
c) linearly
d) non-linearly
View Answer

Answer: a
Explanation: The buffer memory can be allocated mainly in two ways, statically and dynamically. Statically, the memory is allocated through the linker and dynamically it can allocate memory during runtime by calling an operating system.
advertisement

2. How did a buffer memory allocate in the runtime?
a) linearly
b) non-linearly
c) statically
d) dynamically
View Answer

Answer: d
Explanation: The buffer memory allocation is done in two ways, statically and dynamically. Dynamically, it can allocate memory during runtime by calling an operating system.

3. Which allocation requires the memory to be defined before building the application?
a) dynamic allocation
b) static allocation
c) linear allocation
d) straight allocation
View Answer

Answer: b
Explanation: The static allocation requires the memory to be defined before building the application and allocates the memory through the special directives at the assembler level.

4. What factor depends on the allocation of buffer memory?
a) nature
b) size
c) variable type and definition
d) variable size and type
View Answer

Answer: c
Explanation: The amount of allocated buffer memory depends on the variable type and the definition, the strings and the character arrays are the most commonly used types.

5. Which are the system calls which are used by the UNIX operating system?
a) malloc()
b) unmalloc()
c) malloc() and unmalloc()
d) proc() and return
View Answer

Answer: c
Explanation: The malloc() and the unmalloc() are the system calls which is used by the UNIX operating system which allocates the memory dynamically and returns it.
advertisement

6. Which is the counterpart of the malloc()?
a) unmalloc()
b) proc()
c) struc()
d) return()
View Answer

Answer: a
Explanation: The malloc() and unmalloc() are the system calls in which the unmalloc() is the counterpart of the malloc().

7. How is the UNIX operating system allocates its memory?
a) statically
b) linearly
c) non linearly
d) dynamically
View Answer

Answer: d
Explanation: The malloc() and the unmalloc() are the system calls which is used by the UNIX operating system which allocates the memory dynamically and returns it.

8. Which term is used to describe a bug within the memory system?
a) memory leakage
b) buffer memory
c) system call
d) register leakage
View Answer

Answer: a
Explanation: The memory leakage is used to describe the bug within the memory system.

9. What are the common errors that are seen in memory leakage?
a) memory size
b) memory type
c) stack frame error
d) stack register
View Answer

Answer: c
Explanation: The stack frame errors are the common errors which are seen in the memory leakage and it is caused by the stack overflowing of its allocated memory space and the system call function failure.
advertisement

10. How the stack frame errors are caused?
a) stack overflow
b) underrun
c) overrun
d) timing
View Answer

Answer: a
Explanation: There are certain common errors called the stack frame errors which are responsible for the memory leakage and it is due to the stack overflowing of its allocated memory space and the system call function failure.

11. Which of the following clean up the stack?
a) interrupt handler
b) processor
c) exception handler
d) memory handler
View Answer

Answer: c
Explanation: The exception handler cleans up the stack memory before returning to the previous executing software thread or the generic handler.

12. Which of the following stores the context of the exception?
a) stack
b) register
c) ROM
d) RAM
View Answer

Answer: a
Explanation: The exception handler is the one which clean up the stack memory before returning to the previous executing software thread and the ROM stores the context of exception in the stack automatically or as a part of the exception routine.

13. Which of the following contains the return information of the stack?
a) table
b) vector
c) frame
d) block
View Answer

Answer: c
Explanation: The stack contains certain frames which are used to store the return information of the stack and thus the frame need to be removed by adjusting the stack pointer accordingly. Normally this is done to avoid the memory leakage.
advertisement

Sanfoundry Global Education & Learning Series – Embedded System.

To practice all areas of Embedded System, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn