Engineering Online MCQ Number 0272 – online study, assignment and exam

Multiple choice question for engineering

Set 1

1. Which of the following allows the multiple tasks to process data simultaneously?
a) single buffer
b) double buffer
c) buffer exchange
d) directional buffer

Answer

Answer: c [Reason:] 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.

2. Which buffering mechanism is common to the SPOX operating system?
a) buffer exchange
b) single buffer
c) linear buffer
d) directional buffer

Answer

Answer: a [Reason:] The buffer exchange can support the SPOX operating system which is used for the digital signal processors and it is easy to implement.

3. Which buffers exchange the empty buffers for full ones?
a) single buffer
b) buffer exchange
c) directional buffer
d) double buffer

Answer

Answer: b [Reason:] The buffer exchange can be used for exchanging the empty buffers with the full ones. It will have more than two buffers.

4. Which process takes place when the buffer is empty?
a) read
b) write
c) read and write
d) memory access

Answer

Answer: a [Reason:] 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.

5. Which process takes place when the buffer contains data?
a) read
b) read and write
c) acknowledge
d) write

Answer

Answer: d [Reason:] The buffer will be emptied in the case of the readin process and it will contains the data in case of the writing process.

6. Which of the following does not need to have a semaphore?
a) double buffer
b) single buffer
c) buffer exchange
d) directional buffer

Answer

Answer: c [Reason:] 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.

7. Which buffer can assimilate a large amount of data before processing?
a) single buffer
b) double buffer
c) multiple buffers
d) directional buffer

Answer

Answer: c [Reason:] 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.

8. Which can reduce the latency?
a) partial filling
b) complete filling
c) no filling
d) multiple buffers

Answer

Answer: a [Reason:] 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.

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

Answer

Answer: b [Reason:] The level of the inter-task communication can indicate the buffer status, that is whether it is full or ready for collection.

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

Answer

Answer: c [Reason:] 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 more complex operation to handle the length of the valid data.

11. Which processor has a different segment buffer?
a) 8051
b) 8086
c) ARM
d) MC68HC11

Answer

Answer: b [Reason:] 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.

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

Answer

Answer: c [Reason:] 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.

13. Which entry will have a special value in the linked list?
a) first entry
b) last entry
c) second entry
d) second last entry

Answer

Answer: b [Reason:] The last entry will have a special value that indicates that the entry is the last one but the first entry use the pointer entry to locate the position.

14. Which entry can use the pointer in the linked list?
a) first entry
b) last entry
c) second entry
d) third entry

Answer

Answer: a [Reason:] 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.

Set 2

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

Answer

Answer: a [Reason:] 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.

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

Answer

Answer: d [Reason:] 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

Answer

Answer: b [Reason:] 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

Answer

Answer: c [Reason:] 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

Answer

Answer: c [Reason:] 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.

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

Answer

Answer: a [Reason:] 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

Answer

Answer: d [Reason:] 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

Answer

Answer: a [Reason:] The memory leakage is used to describe the bug within the memory system.

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

Answer

Answer: c [Reason:] 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.

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

Answer

Answer: a [Reason:] 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

Answer

Answer: c [Reason:] 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

Answer

Answer: a [Reason:] 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

Answer

Answer: c [Reason:] 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.

Set 3

1. Which of the following function can interpret data in the C language?
a) printf
b) scanf
c) proc
d) file

Answer

Answer: b [Reason:] The scanf and printf are the well-known functions in the C language which is used to interpret data and print data respectively.

2. What is the first stage of the compilation process?
a) pre-processing
b) post-processing
c) compilation
d) linking

Answer

Answer: a [Reason:] The pre-processing involves the first stage of the compilation process in which the include files are added. This file defines the standard functions, constants etc and the output is fed to the compiler.

3. Which of the following produces an assembler file in the compilation process?
a) pre-processor
b) assembler
c) compiler
d) post-processing

Answer

Answer: c [Reason:] The output of the pre-processor is given to the compiler in which it produces an assembler file from the instruction codes of the processor.

4. Which file is converted to an object file?
a) hex file
b) decoded file
c) coded file
d) assembly file

Answer

Answer: d [Reason:] The output of the pre-processor is given to the compiler which produces an assembler file from the instruction codes of the processor and this possesses libraries. The assembly file is then converted into the object file and this contains the hexadecimal coding.

5. Which of the following contains the hexadecimal coding?
a) object file
b) assembly file
c) coded file
d) decoded file

Answer

Answer: a [Reason:] The output of the pre-processor is given to the compiler which produces an assembler file from the instruction codes of the processor and this possesses libraries and then these assembly file is converted into the object file and this possesses the coding of hexadecimal.

6. Which of the following processes the source code before it goes to the compiler?
a) compiler
b) simulator
c) pre-processor
d) emulator

Answer

Answer: c [Reason:] The pre-processor is responsible for processing the source code before it goes to the compiler and this in turn allows the programmer to define variable types, constants, and much other information.

7. Which of the following allows the programmer to define constants?
a) pre-processor
b) compiler
c) emulator
d) debugger

Answer

Answer: a [Reason:] The pre-processor processes the source code before it goes to the compiler and this allows the programmer to define variable types, constants, and much other information.

8. Which statement replaces all occurrences of the identifier with string?
a) # define identifier string
b) # include
c) # define MACRO()
d) # ifdef

Answer

Answer: a [Reason:] # define statement can replace all occurrences of the identifier with string. Similarly, it is able to define the constants, which also make the code easier to understand.

9. Which of the following has the include file?
a) emulator
b) debugger
c) pre-processor
d) simulator

Answer

Answer: c [Reason:] The pre-processor produces the source code before it goes to the compiler and this allows the programmer to define variable types, constants, and much other information. This pre-processor also has include files and combines them into the program source.

10. Which statement is used to condense the code to improve the eligibility?
a) # define MACRO()
b) # include
c) if
d) else-if

Answer

Answer: a [Reason:] The # define MACRO() statement is used to condense the code for improving the code eligibility or for space reasons.

Set 4

1. Which of the following helps in reducing the energy consumption of the embedded system?
a) compilers
b) simulator
c) debugger
d) emulator

Answer

Answer: a [Reason:] The compilers can reduce the energy consumption of the embedded system and the compilers performing the energy optimizations are available.

2. Which of the following help to meet and prove real-time constraints?
a) simulator
b) debugger
c) emulator
d) compiler

Answer

Answer: d [Reason:] There are several reasons for designing the optimization and compilers and one such is that it could help to meet and prove the real-time constraints.

3. Which of the following is an important ingredient of all power optimization?
a) energy model
b) power model
c) watt model
d) power compiler

Answer

Answer: b [Reason:] Saving energy can be done at any stage of the embedded system development. The high-level optimization techniques can reduce the power consumption and similarly compiler optimization also can reduce the power consumption and the most important thing in the power optimization are the power model.

4. Who proposed the first power model?
a) Jacome
b) Russell
c) Tiwari
d) Russell and Jacome

Answer

Answer: c [Reason:] Tiwari proposed the first power model in the year 1974. The model includes the so-called bases and the inter-instruction instructions.Base costs of the instruction correspond to the energy consumed per instruction execution when an infinite sequence of that instruction is executed. Inter instruction costs model the additional energy consumed by the processor if instructions change.

5. Who proposed the third power model?
a) Tiwari
b) Russell
c) Jacome
d) Russell and Jacome

Answer

Answer: d [Reason:] The third model was proposed by Russell and Jacome in the year 1998.

6. Which compiler is based on the precise measurements of two fixed configurations?
a) first power model
b) second power model
c) third power model
d) fourth power model

Answer

Answer: c [Reason:] The third model was proposed by Russell and Jacome in the year 1998 and is based on the precise measurements of the two fixed configurations.

7. What does SPM stand for?
a) scratch pad memories
b) sensor parity machine
c) scratch pad machine
d) sensor parity memories

Answer

Answer: a [Reason:] The smaller memories provides faster access and consume less energy per access and SPM or scratch pad memories is a kind of small memory which access fastly and consume less energy per access and it can be exploited by the compiler.

8. Which model is based on precise measurements using real hardware?
a) encc energy-aware compiler
b) first power model
c) third power model
d) second power model

Answer

Answer: a [Reason:] The encc-energy aware compiler uses the energy model by Steinke et al. it is based on the precise measurements of the real hardware. The power consumption of the memory, as well as the processor, is included in this model.

9. What is the solution to the knapsack problem?
a) many-to-many mapping
b) one-to-many mapping
c) many-to-one mapping
d) one-to-one mapping

Answer

Answer: d [Reason:] The knapsack problem is associated with the size constraints, that is the size of the scratch pad memories. This problem can be solved by one-to-one mapping which was presented in an integer programming model by Steinke et al.

10. How can one compute the power consumption of the cache?
a) Lee power model
b) First power model
c) Third power model
d) CACTI

Answer

Answer: d [Reason:] The CACTI can compute the power consumption of the cache which is proposed by Wilton and Jouppi in the year 1996.

Set 5

1. What is meant by FOL?
a) free order logic
b) fast order logic
c) false order logic
d) first order logic

Answer

Answer: d [Reason:] Many formal verification techniques are used and these are classified on the basis of the logics employed. The techniques are propositional logic, first order logic, and higher order logic. The FOL is the abbreviated form of the first order logic which includes the quantification.

2. What is HOL?
a) higher order logic
b) higher order last
c) highly organised logic
d) higher order less

Answer

Answer: a [Reason:] The formal verification techniques are classified on the basis of the logics employed. The techniques are propositional logic, first order logic, and higher order logic. The HOL is the abbreviation of the higher order logic in which the proofs are automated and manually done with some proof support.

3. What is BDD?
a) boolean decision diagram
b) binary decision diagrams
c) binary decision device
d) binary device diagram

Answer

Answer: b [Reason:] The binary decision diagram is a kind of data structure which is used to represent the Boolean function.

4. Which formal verification technique consists of Boolean formula?
a) HOL
b) FOL
c) Propositional logic
d) Both HOL and FOL

Answer

Answer: c [Reason:] The propositional logic technique is having the boolean formulas and the boolean function. The tools used in propositional logic is the tautology checker or the equivalence checker which in turn uses the binary decision diagrams which is also known as BDD.

5. Which of the following is also known as equivalence checker?
a) BDD
b) FOL
c) Tautology checker
d) HOL

Answer

Answer: c [Reason:] The propositional logic technique consists of the boolean formulas and the boolean function. The tools used in this type of logic is the tautology checker or the equivalence checker which in turn uses the BDD or the binary decision diagrams.

6. Which of the following is possible to locate errors in the specification of the future bus protocol?
a) EMC
b) HOL
c) BDD
d) FOL

Answer

Answer: c [Reason:] The model checking was developed using the binary decision diagram and the BDD and it was possible to locate errors in the specification of the future bus protocol.

7. Which of the following is a popular system for model checking?
a) HOL
b) FOL
c) BDD
d) EMC

Answer

Answer: d [Reason:] The EMC-system is developed by Clark and it describes the CTL formulas, which is the computational tree logics.

8. What is CTL?
a) computational tree logic
b) code tree logic
c) cpu tree logic
d) computer tree logic

Answer

Answer: a [Reason:] The EMC-system is a popular system for model checking which is developed by Clark that describes the CTL formulas, which is also known as computational tree logics. The CTL consist of two parts, a path quantifier, and a state quantifier.