Engineering Questions with Answers - Multiple Choice Questions

MCQs on Buffering and other Data Structures

1 - Question

MCQs on Buffers
Which of these is an area for temporary memory storage?
a) buffer
b) register
c) table
d) flag
View Answer Answer: a
Explanation: The buffer is an area that is used to store data temporarily which can be used to compensate the timing problems.



2 - Question

Which of the following can be used as a collection point of data?
a) register
b) buffer
c) flag register
d) accumulator
View Answer Answer: b
Explanation: The buffer can be used as a collection point for data, that is all the important information can be collected and organised before processing.



3 - Question

Which device can compensate for the timing problems between the software?
a) index
b) register
c) buffer
d) memory
View Answer Answer: c
Explanation: The buffer is used to store data temporarily which can be used to compensate the timing problems between the software and it can also be used as a collection point for data, that is all the important information can be collected and organised before processing. advertisement



4 - Question

What do a buffer consist of?
a) memory and register
b) memory and peripheral
c) memory and flag register
d) memory and pointer
View Answer Answer: d
Explanation: The buffer consists of a pointer and memory which can be used to locate the next piece of data to be removed or accessed from the buffer.



5 - Question

Which of the following is a condition for buffer overrun?
a) cannot accept data
b) cannot receive data
c) cannot provide data
d) can provide data
View Answer Answer: a
Explanation: The buffer involves two conditions. These are the buffer overrun condition and the buffer underrun condition. If the buffer cannot accept any more data, it is said to be buffer overrun.



6 - Question

What is the state of the buffer if it asked for data and cannot provide it?
a) overrun
b) underrun
c) remains unchanged
d) beyond overrun
View Answer Answer: b
Explanation: The buffer is said to be overrun if the buffer cannot accept any more data and said to be underrun if it asked for data but not able to provide it.



7 - Question

Which of the following can remove data from the buffer?
a) memory
b) ram
c) pointer
d) slack
View Answer Answer: c
Explanation: The data can be removed from the buffer using a pointer. The pointer locates the next value and can move the data from the buffer and is moved to the next location by incrementing its value by the number of words or bytes.



8 - Question

How many bits does a 32-bit processor can access?
a) 32-bit char
b) 32-bit word
c) 32-bit double
d) 32-bit double word
View Answer Answer: b
Explanation: The 32-bit processor can access 32-bit word and hence the pointer is incremented by one.



9 - Question

What occurs first if data is stored in the buffer?
a) speed increases
b) linear shoot
c) overshoot
d) delay
View Answer Answer: d
Explanation: When the data is stored in the buffer, at first there will be a delay and the subsequent data is received from the buffer. This delay is known as buffer latency.



10 - Question

Which of the following defines the earliest information that is passed through the buffer?
a) buffer latency
b) memory
c) pointer
d) peripheral
View Answer Answer: a
Explanation: The buffer latency determines the earliest information that passes through the buffer and any response to that information will be delayed by the buffer latency irrespective of how fast the processor is.



11 - Question

Which of the following possesses a problem for data streams on the real-time operating system?
a) pointer
b) memory
c) latency
d) processor
View Answer Answer: c
Explanation: The latency will be a problem for the real-time operating system such as the digital audio system which must have a consistent and regular stream of data.



12 - Question

Which of the following determines the time to take a simple sample?
a) buffer
b) latency
c) pointer
d) memory
View Answer Answer: b
Explanation: The sampling is performed on a regular basis in which the filtering takes less time than the interval between the sample and this does not need a buffering and it will have very low latency. Each sample is received, processed and stored and the latency is the time take a single sample.



13 - Question

How is a stack created?
a) slack and pointer
b) stack and memory
c) memory and a pointer
d) memory and a register
View Answer Answer: d
Explanation: The slack is created in the same way as the buffer does, that is by using a memory and a pointer. The control associated with the buffer or memory is a register which acts as an address pointer.



14 - Question

Which of the following acts as an address pointer?
a) memory
b) pointer
c) stack
d) register
View Answer Answer: d
Explanation: The control associated with the buffer or memory is a register which acts as an address pointer.



15 - Question

Which of the following possesses an issue while concerning the memory size of the buffer?
a) digital signal processor
b) microprocessor
c) memory
d) pointer
View Answer Answer: a
Explanation: The digital signal processor with on-chip memory and the microcontroller possesses an issue on concerning the memory size of the buffer with small amounts of RAM. But with the large system, this is not a major issue.



16 - Question

MCQs on Types of Buffers
Which of the buffers has a single piece of linear contiguous memory?
a) circular buffer
b) linear buffer
c) directional buffer
d) double buffer
View Answer Answer: b
Explanation: The linear buffer is contiguous memory which is a single piece memory that is controlled by the pointers whose address increments linearly.



17 - Question

Which buffer will lose data when it is full?
a) linear buffer
b) circular buffer
c) directional buffer
d) double buffer
View Answer Answer: a
Explanation: The linear buffer has a single piece of contiguous memory which is controlled by the pointers whose address increments linearly and it will lose data when it is full and fail to provide data when it is empty.



18 - Question

Which of the following buffers loses the incoming data when it is full?
a) circular buffer
b) double buffer
c) linear buffer
d) directional buffer
View Answer Answer: c
Explanation: The linear buffer will lose the incoming data when full such that the data it contains become older, which is known as the overrun condition. advertisement



19 - Question

Which state of the linear buffer will provide old data, when it is empty?
a) overrun
b) critical timing
c) peak overshoot
d) underrun
View Answer Answer: d
Explanation: In the linear buffer, when it is empty it will provide the old data, usually the last entry so that the processor will continue to process the incorrect data potentially, and this condition is known as underrun.



20 - Question

Which state of the linear buffer loses its incoming data when full?
a) underrun
b) overrun
c) critical time
d) pointer
View Answer Answer: b
Explanation: In the overrun condition, the linear buffer will lose the incoming data when the buffer is filled and the data it contains become older.



21 - Question

Which technique can solve the errors in the linear buffer?
a) low water mark
b) high water mark
c) low and high water mark
d) pointer
View Answer Answer: c
Explanation: The errors in the linear buffering include the loss of data especially during the regular sampling which can be avoided by the pointers that are checked against certain values and this result is used for fetching more data. These points are known as the low water mark and the high water mark.



22 - Question

Which of the following is similar to the high and low water marks at the coast?
a) minimum and maximum water level
b) low and high water mark
c) small and big water mark
d) medium and high water mark
View Answer Answer: b
Explanation: There are some errors in the linear buffering which includes the loss of data especially in the regular sampling. This can be avoided by the pointers that are checked against certain values and the result is used to fetch more data. These points are known as the low water mark and the high water mark. It is named so because it is similar to the high and low water marks seen at the coast which indicates the maximum and minimum levels that the tidal water will fall and rise.



23 - Question

Which of the following determines the number of entries in the buffer?
a) low water mark
b) high water mark
c) low and high water mark
d) small and big water mark
View Answer Answer: a
Explanation: The number of entries below the low water mark determines the number of entries the buffer has and the amount of time which is available to fill the buffer before empties and the condition is known as underrun.



24 - Question

Which of the following determines the number of empty entries?
a) low water tank
b) high water tank
c) small water tank
d) big water tank
View Answer Answer: b
Explanation: The high water tank measures the number of empty entries, that is the number of empty entries above the high water tank determines the length of time which is available to stop the filling of the buffer and it can prevent the data loss through overrunning.



25 - Question

In which case, the buffer is used by two software task?
a) single buffer
b) linear buffer
c) double buffer
d) directional buffer
View Answer Answer: a
Explanation: In the single buffer, the buffer is used by two software tasks to insert or extract information. The problem with this buffer is that the water level is above or below, and the free space that is used to fill the buffer does not lie in the correct location.



26 - Question

Which buffer is important for the signal data?
a) double buffer
b) single buffer
c) linear buffer
d) directional buffer
View Answer Answer: d
Explanation: The directional buffer is used for the signal data or for the data which is sampled periodically. The data must be kept in the same order in order to preserve it in chronological order.



27 - Question

Which of the following uses two buffers?
a) linear buffer
b) single buffer
c) double buffer
d) directional buffer
View Answer Answer: c
Explanation: The double buffer uses buffers as its name suggest, one buffer is for filling and the other buffer is for extraction.



28 - Question

Which of the following uses a single low water tank and a next data pointer?
a) single buffer
b) double buffer
c) directional buffer
d) linear buffer
View Answer Answer: a
Explanation: The single buffer uses a single low water tank and a next data pointer. The next data pointer is used for accessing the next entry that should be extracted.



29 - Question

MCQs on Buffer Exchange
Which of the following allows the multiple tasks to process data simultaneously?
a) single buffer
b) double buffer
c) buffer exchange
d) directional buffer
View Answer Answer: c
Explanation: The buffer exchange allows the multiple tasks to process simultaneously without having to have control structures to supervise access and it is also used to simplify the control code.



30 - Question

Which buffering mechanism is common to the SPOX operating system?
a) buffer exchange
b) single buffer
c) linear buffer
d) directional buffer
View Answer Answer: a
Explanation: The buffer exchange can support the SPOX operating system which is used for the digital signal processors and it is easy to implement.



31 - Question

Which buffers exchange the empty buffers for full ones?
a) single buffer
b) buffer exchange
c) directional buffer
d) double buffer
View Answer Answer: b
Explanation: The buffer exchange can be used for exchanging the empty buffers with the full ones. It will have more than two buffers. advertisement



32 - Question

Which process takes place when the buffer is empty?
a) read
b) write
c) read and write
d) memory access
View Answer Answer: a
Explanation: The buffer exchange will contain the data in case of the writing process but the buffer will be emptied in the case of the read cycle.



33 - Question

Which process takes place when the buffer contains data?
a) read
b) read and write
c) acknowledge
d) write
View Answer Answer: d
Explanation: The buffer will be emptied in the case of the readin process and it will contain the data in case of the writing process.



34 - Question

Which of the following does not need to have a semaphore?
a) double buffer
b) single buffer
c) buffer exchange
d) directional buffer
View Answer Answer: c
Explanation: There are many advantages over the buffer exchange. One such is that it will not have a semaphore to control any shared memory or buffers.



35 - Question

Which buffer can assimilate a large amount of data before processing?
a) single buffer
b) double buffer
c) multiple buffers
d) directional buffer
View Answer Answer: c
Explanation: The requesting task can use multiple buffers which can assimilate large amounts of data before processing. This can be considered one of the advantages of the buffer exchange.



36 - Question

Which can reduce the latency?
a) partial filling
b) complete filling
c) no filling
d) multiple buffers
View Answer Answer: a
Explanation: The latency is introduced because of the size of the buffer. The partial filling of data can be used to reduce the latency but it requires some additional control signal.



37 - Question

Which of the following can indicate when the buffer is full or ready for collection?
a) intra-task communication
b) inter-task communication
c) memory task communication
d) peripheral task communication
View Answer Answer: b
Explanation: The level of the inter-task communication can indicate the buffer status, that is whether it is full or ready for collection.



38 - Question

What solution can be done for the inefficiency in the memory usage of small data?
a) same size buffer
b) single buffer
c) variable size buffer
d) directional buffer
View Answer Answer: c
Explanation: The buffer exchange becomes inefficient while concerning the memory usage for small and the simple data. In order to solve this problem, variable size buffers can be used but this requires a more complex operation to handle the length of the valid data.



39 - Question

Which processor has a different segment buffer?
a) 8051
b) 8086
c) ARM
d) MC68HC11
View Answer Answer: b
Explanation: The 8086 has a segmented architecture where the buffers are having a different segment. In such processors, the device drive is running in the supervisor mode, requesting task in the user mode and so on.



40 - Question

Which of the following can combine buffers in a regular and methodical way using pointers?
a) buffer exchange
b) directional buffer
c) linked lists
d) double buffer
View Answer Answer: c
Explanation: The linked lists are the way of combining buffers in a methodical way and regular method by using the pointers to point the next entry in the list. This can be maintained by adding an entry to the which contains the address of the next buffer.



41 - Question

Which entry will have a special value in the linked list?
a) first entry
b) last entry
c) second entry
d) second last entry
View Answer Answer: b
Explanation: The last entry will have a special value that indicates that the entry is the last one but the first entry uses the pointer entry to locate the position.



42 - Question

Which entry can use the pointer in the linked list?
a) first entry
b) last entry
c) second entry
d) third entry
View Answer Answer: a
Explanation: The first entry of the single linked list will use the pointer entry to point the location of the second entry and so on. The last entry will have a special value that indicates that the entry is the last one.



43 - Question

MCQs on Buffer Memory
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.



44 - Question

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.



45 - Question

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. advertisement



46 - Question

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.



47 - Question

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.



48 - Question

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().



49 - Question

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.



50 - Question

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.



51 - Question

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.



52 - Question

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.



53 - Question

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.



54 - Question

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.



55 - Question

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.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners