Embedded System
Embedded System
Keywords
Embedded system: An electronic/electro-mechanical system which is designed to perform a specific func on
and is a combina on of both hardware and firmware [LO 1]
Opera ng system: A piece of so ware designed to manage and allocate system resources and execute other
pieces of so ware [LO 2]
RAM: Random Access memory. Vola le memory [LO 3]
Microprocessor: A silicon chip represen ng a Central Processing Unit (CPU) [LO 4]
Microcontroller: A highly integrated chip that contains a CPU, scratchpad RAM, special and general purpose
register arrays and integrated peripherals [LO 4]
SCADA: Supervisory Control and Data Acquisi on System. A data acquisi on system used in industrial control
applica ons [LO 4]
DSP: Digital Signal Processor is a powerful special purpose 8/16/32 bit microprocessor designed specifically to
meet the computa onal demands and power constraints [LO 5]
ASIC: Applica on Specific Integrated Circuit is a microchip designed to perform a specific or unique applica on
[LO 6]
Sensor: A transducer device that converts energy from one form to another for any measurement or control
purpose [LO 6]
Actuator: A form of transducer device (mechanical or electrical) which converts signals to corresponding
physical ac on (mo on) [LO 6]
LED: Light Emi ng Diode. An output device producing visual indica on in the form of light in accordance with
current flow [LO 6]
Buzzer: A piezo-electric device for genera ng audio indica on. It contains a piezo-electric diaphragm which
produces audible sound in response to the voltage applied to it [LO 6]
Electro Cardiogram (ECG): An embedded device for heartbeat monitoring [LO 6]
ADC: Analog to Digital Converter. An integrated circuit which converts analog signals to digital form [LO 6]
Bluetooth: A low cost, low power, short range wireless technology for data and voice communica on [LO 6]
Wi-Fi: Wireless Fidelity is the popular wireless communica on technique for networked communica on of
devices [LO 6]
RS-485: The enhanced version of RS-232, which supports mul -drop communica on with up to 32 transmi ng
devices (drivers) and 32 receiving devices on the bus [LO 4]
USB: Universal Serial Bus is a wired high speed serial bus for data communica on [LO 4]
IEEE 1394: A wired, isochronous high speed serial communica on bus [LO 4]
Firewire: The Apple Inc.’s implementa on of the 1394 protocol [LO 4]
Infrared (IrDA): A serial, half duplex, line of sight based wireless technology for data communica on between
devices [LO 4]
Bluetooth: A low cost, low power, short range wireless technology for data and voice communica on [LO 4]
Wi-Fi: Wireless Fidelity is the popular wireless communica on technique for networked communica on of
devices [LO 4]
ZigBee: A low power, low cost, wireless network communica on protocol based on the IEEE 802.15.4-2006
standard. ZigBee is targeted for low power, low data-rate and secure applica ons for Wireless Personal Area
Networking (WPAN) [LO 4]
GPRS: General Packet Radio Service is a communica on technique for transferring data over a mobile
communica on network like GSM [LO 4]
Reset Circuit: A passive circuit or IC device to supply a reset signal to the processor/controller of the embedded
system [LO 6]
Brown-out Protec on Circuit: A passive circuit or IC device to protect the processor from unexpected program
execu on flow due to the drop in power supply voltage [LO 6]
RTC: Real Time Clock is a system component keeping track of me [LO 6]
Watchdog Timer (WDT): Timer for monitoring the firmware execu on [LO 6]
PCB: Printed Circuit Board is the place holder for arranging the different hardware components required to
build the embedded product [LO 4]
19. How many memory cells are present in 1Kb Serial EEPROM
(a) 1024 (b) 8192 (c) 512 (d) 4096 (e) None of these
20. Which of the following is (are) example(s) for the input subsystem of an embedded system dealing with
digital data?
(a) ADC (b) Optocoupler (c) DAC (d) All of them
(e) only (a) and (b)
21. Which of the following is (are) example(s) for the output subsystem of an embedded system dealing with
digital data?
(a) LED (b) Optocoupler (c) Stepper Motor (d) All of these
(e) only (a) and (c)
22. Which of the following is true about optocouplers
(a) Optocoupler acts as an input device only
(b) Optocoupler acts as an output device only
(c) Optocoupler can be used in both input and output circuitry
(d) None of these
23. Which of the following is true about a unipolar stepper motor
(a) Contains only a single winding per stator phase
(b) Contains two windings per stator phase
(c) Contains four windings per stator phase
(d) None of these
24. Which of the following is (are) true about normally open single pole relays?
(a) The circuit remains open when the relay is not energised
(b) The circuit remains closed when the relay is energised
(c) There are two output paths
(d) Both (a) and (b) (e) None of these
25. What is the minimum number I/O line required to interface a 16-Key matrix keyboard?
(a) 16 (b) 8 (c) 4 (d) 9
26. Which is the optimal row-column configuration for a 24 key matrix keyboard?
(a) 6 × 4 (b) 8 × 3 (c) 12 × 2 (d) 5 × 5
27. Which of the following is an example for on-board interface in the embedded system context?
(a) I2C (b) Bluetooth (c) SPI (d) All of them
(e) Only (a) and (c)
28. What is the minimum number of interface lines required for implementing I2C interface?
(a) 1 (b) 2 (c) 3 (d) 4
29. What is the minimum number of interface lines required for implementing SPI interface?
(a) 2 (b) 3 (c) 4 (d) 5
30. Which of the following are synchronous serial interface?
(a) I2C (b) SPI (c) UART (d) All of these
(e) Only (a) and (b)
31. RS-232 is a synchronous serial interface. State True or False
(a) True (b) False
32. What is the maximum number of USB devices that can be connected to a USB host?
(a) Unlimited (b) 128 (c) 127 (d) None of these
33. In the ZigBee network, which of the following ZigBee entity stores the information about the network?
(a) ZigBee Coordinator (b) ZigBee Router
(c) ZigBee Reduced Function Device (d) All of them
70 Introduc on to Embedded Systems
Keywords
ECU: Electronic Control Unit. The generic term for the embedded control units in automo ve applica on
[LO 2]
HECU: High-speed Electronic Control Unit. The high-speed embedded control unit deployed in automo ve
applica ons [LO 2]
LECU: Low-speed Electronic Control Unit. The low-speed embedded control unit deployed in automo ve
applica ons [LO 2]
CAN: Controller Area Network. An event driven serial protocol interface used primarily for automo ve
applica ons [LO 2]
LIN: Local Interconnect Network. A single master mul ple slave, low speed serial bus used in automo ve
applica on [LO 2]
MOST: Media Oriented System Transport Bus. A mul media fibre-op c point-to-point network implemented
in a star, ring or daisy-chained topology over op cal fibres cables [LO 2]
Program Counter: CPU register which holds the address of the program memory loca on from which the next
instruc on is to be fetched (Its width depends on the processor architecture) [LO 3]
Data Pointer Register (DPTR): 16bit register which holds the address of external data memory address to be
accessed, in 8051 architecture [LO 3]
Special Func on Register: Register holding the status and control informa on and data associated with
the various configura ons, status and data for on-chip peripheral units like Timer, Interrupt Controller, etc.
[LO 3]
Accumulator: CPU register which holds the results of all CPU related arithme c opera ons [LO 3]
B Register: CPU register that acts as an operand in mul ply and division opera ons, in 8051 architecture
[LO 3]
Program Status Word (PSW): 8bit, bit addressable special func on register signalling the status of accumulator
related opera ons and register bank selector for the scratchpad registers R0 to R7, in 8051 architecture
[LO 3]
Stack Pointer (SP): 8bit register holding the current address of stack memory in 8051 architecture [LO 3]
Machine Cycle: The fundamental unit of instruc on execu on. One instruc on execu on may require one or
more machine cycles. Under standard 8051 architecture, one machine cycle corresponds to 12 clock periods
[LO 3]
Source Current: The maximum current a port pin can supply to drive an externally connected device [LO 3]
Sink Current: The maximum current a port pin can absorb through a device which is connected to an external
supply [LO 3]
Interrupt: Signal that ini ates changes in normal program execu on flow [LO 3]
Interrupt Service Rou ne (ISR): Piece of code represen ng the ac ons to be done when an interrupt occurs
[LO 3]
Interrupt Vector: The start address of the program memory where the ISR corresponding to an interrupt is to
be located [LO 3]
Interrupt Latency: The me elapsed between the asser on of the interrupt and the start of the ISR for the
same [LO 3]
Timer: A hardware or so ware unit which generates me delays. Hardware mers generate more precise
me delays [LO 3]
Serial Port: The I/O unit which transmits and receives data in serial format [LO 3]
Mul processor Communica on: A serial communica on implementa on for communica ng between
mul ple processors on the same serial bus. Only one device acts as the master and rest act as slave at any
given point of me [LO 3]
High-Speed Core: A processor core which requires lesser number of clock periods for instruc on fetch, decode
and execu on [LO 3]
2. What is the size of a ‘Special Function Register’ memory supported by the standard 8051 architecture
(a) 64 bytes (b) 128 bytes (c) 256 bytes (d) 1024 bytes
(e) No internal SFR memory
3. What is the size of an internal program memory supported by the standard 8051 architecture
(a) 128 bytes (b) 1024 bytes (c) 2 Kbytes (d) 4 Kbytes
(e) No internal program memory
4. What is the number of general purpose I/O lines supported by the standard 8051 architecture
(a) 8 (b) 16 (c) 32 (d) 64
5. The general purpose I/O lines of a standard 8051 is grouped into
(a) Two 8-bit bi-directional ports (b) Four 8-bit bi-directional ports
(c) Two 16-bit bi-directional ports (d) Four 16-bit bi-directional ports
6. What is the number of timer units supported by a standard 8051 architecture
(a) Two 16-bit timers (b) Three 16-bit timers
(c) Two 8-bit timers (d) One 16-bit timer
7. The UART of the standard 8051 controller is
(a) Half duplex with configurable baudrate (b) Half duplex with fixed baudrate
(c) Full duplex with configurable baudrate (d) Full duplex with fixed baudrate
8. The standard 8051 controller is built around
(a) Harvard Architecture (b) Von Neumann Architecture
(c) None of these
9. Which of the following is True for a 8051 controller?
(a) The program and data memory of 8051 is logically separated
(b) The program and data memory of 8051 physically resides separately.
(c) Separate address spaces are assigned for data memory and program memory
(d) All of these (e) None of these
10. The address bus of 8051 is
(a) 8-bit wide (b) 16-bit wide (c) 32-bit wide (d) 20-bit wide
11. Which of the following is True about external program memory access?
(a) Port 0 acts as the data bus and Port 2 acts as the higher order address bus
(b) Port 2 acts as the data bus and Port 0 acts as the higher order address bus
(c) Port 0 acts as the multiplexed address/data bus and Port 2 acts as the higher order address bus
(d) Port 2 acts as the multiplexed address/data bus and Port 0 acts as the higher order address bus
12. Name the register holding the address of the memory location holding the next instruction to fetch
(a) DPTR (b) PC (c) SP (d) None of these
13. Name the register holding the address of the external data memory to be accessed in 16bit external data
memory operation
(a) DPTR (b) PC (c) SP (d) None of these
14. For standard 8051 architecture, the internal data memory address is
(a) 8bit wide (b) 4bit wide (c) 16bit wide (d) None of these
15. The external data memory is 4 Kbytes in size and it is arranged in paged addressing mode where 1 page
consists of 256 bytes. Port 2 is used as the page selector. How many port bits are required for implementing
the paging?
(a) 1 (b) 2 (c) 3 (d) 4
16. Which of the following conditions should be satisfied to implement the Von-Neumann memory model for
8051?
(a) The data memory and code memory should be stored in a single memory chip (RAM/NVRAM)
162 Introduc on to Embedded Systems
31. The alternate I/O function for the pins of Port 3 will come into action only when the corresponding bit latch
is
(a) 1 (b) 0
32. The interrupts Timer 0 and serial interrupt are enabled individually in the interrupt enable register and high
priority is given to Timer 0 interrupt by setting the Timer 0 priority selector in the interrupt priority register.
It is observed that the serial interrupt is not at all occurring. What could be the reasons for this?
(a) The global interrupt enable bit (EA) is not in the set state
(b) The Serial interrupt always occurs with Timer 0 interrupt
(c) There is no Serial data transmission or reception activity happening in the system
(d) None of these (e) (a) or (b) or (c)
33. Timer 0 and External 0 interrupts are enabled in the system and are given a priority of 1. Incidentally, the
Timer 0 interrupt and External 0 interrupt occurred simultaneously. Which interrupt will be serviced by the
8051 CPU?
(a) Timer 0 (b) External 0
(c) External 0 interrupt is serviced first and after completing it Timer 0 interrupt is serviced
(d) None of them are serviced
34. What is the maximum ISR size allocated for each interrupt in the standard 8051 Architecture
(a) 1 Byte (b) 4 Byte (c) 8 Byte (d) 16 Byte
35. What is the minimum interrupt acknowledgement latency in a single interrupt system for standard 8051
architecture
(a) 1 Machine cycle (b) 2 Machine cycle (c) 3 Machine cycle (d) 8 Machine cycle
36. External 0 interrupt is asserted and latched at S5P2 of the first machine cycle of the instruction MUL AB.
What will be the minimum interrupt acknowledgement latency time?
(a) 6 Machine cycles (b) 5 Machine cycles (c) 3 Machine cycles (d) 2 Machine cycles
37. What is the minimum duration in which the external interrupt line should be asserted to identify it as a valid
interrupt for level triggered configuration?
(a) 1 Machine cycle (b) 3 T States (c) 2 Machine cycles (d) 3 Machine cycles
38. What is the timer increment rate for timer operation for standard 8051 architecture
(a) Oscillator Frequency/6 (b) Oscillator Frequency/12
(c) Same as Oscillator Frequency (d) Oscillator Frequency/24
39. What is the maximum count rate for counting external events for standard 8051 architecture
(a) Oscillator Frequency/6 (b) Oscillator Frequency/12
(c) Same as Oscillator Frequency (d) Oscillator Frequency/24
40. Which is the ‘Timer’ used for baudrate generation for serial communication?
(a) Timer 0 (b) Timer 1
41. The ‘Timer’ used for baudrate generation should run in
(a) Mode 0 (b) Mode 1 (c) Mode 2 (d) Mode 3
42. For ‘Mode 0’ operation, the 13 bit register is formed by
(a) 8 bits of TH0/TH1 and least significant 5 bits of TL0/TL1
(b) 8 bits of TH0/TH1 and most significant 5 bits of TL0/TL1
(c) 8 bits of TL0/TL1 and least significant 5 bits of TH0/TH1
(d) 8 bits of TL0/TL1 and most significant 5 bits of TH0/TH1
43. The serial port of the standard 8051 architecture is
(a) Full duplex (b) Half duplex (c) ‘Receive’ buffered (d) (a) and (c) (e) (b) and (c)
44. Name the ‘Register’ which acts as the ‘Receive’ and ‘Transmit’ buffer in serial communication operation?
(a) SCON (b) PCON (c) SBUF (d) Accumulator
164 Introduc on to Embedded Systems
45. Which of the following is (are) true about ‘Mode 0’ operation of serial communication
(a) The baudrate is variable
(b) The baudrate is given as oscillator frequency/12
(c) The baudrate is same as oscillator frequency
(d) The baudrate is given as oscillator frequency/2
46. The ‘Auto Reload’ count for ‘Timer 1’ is FDH and the operating frequency is 11.0592 MHz and baudrate
doubler bit SMOD is 0. What is the baudrate for communication?
(a) 2400 (b) 4800 (c) 9600 (d) 19200
47. What will be the value of ‘Program Counter (PC)’ after a proper power on reset?
(a) FFFFH (b) 0000H (c) Random value (d) 0001H
48. What will be the value of internal RAM after a reset?
(a) 00H (b) FFH
(c) The value before reset if the system is resetted during operation
(d) Random if the system is resetted immediately after Power ON
(e) (c) or (d)
49. Which of the following is (are) ‘True’ about ‘IDLE’ mode?
(a) The internal clock to the processor is temporarily suspended
(b) The various CPU status like SP, PC, PSW, Accumulator and all other register values are preserved
(c) All port pins will retain their logical state
(d) ALE and PSEN are pulled high
(e) All of these (f) (a), (b) and (c) only
50. A reset signal is applied to the 8051 processor when it is in the ‘Idle’ mode. How will the system behave?
(a) The idle mode setting bit IDL is cleared
(b) The processor resumes program execution from where it left off
(c) The processor resumes program execution from 0000H
(d) (a) and (b) only (e) (a) and (c) only
Data Exchange Instruc ons: Instruc ons for exchanging data between a memory loca on and the accumulator
register in 8051 architecture [LO 2]
External Data Memory Instruc on: Instruc on for transferring data between external memory and processor
[LO 2]
Arithme c Instruc ons: Instruc ons for performing basic arithme c opera ons including addi on, subtrac on,
mul plica on, division, increment and decrement [LO 2]
2’s Complement: A binary data representa on used in subtrac on opera on [LO 2]
Binary Coded Decimal (BCD): Numbers with base 10. Represented using digits 0 to 9 [LO 2]
Unpacked BCD: A single BCD digit (0 to 9) represented in a single byte [LO 2]
Packed BCD: Two BCD digits (00 to 99) represented using a single byte [LO 2]
Decimal Adjust Accumulator (DAA): An instruc on for adjus ng the accumulator content to give a meaningful
BCD, a er BCD arithme c [LO 2]
Logical Instruc ons: Instruc ons for performing logical opera ons such as ‘ORing’, ‘ANDing’, ‘XORing’,
complemen ng, clearing, bit rota on and swapping nibbles of a byte, etc [LO 2]
Boolean Instruc ons: Instruc ons for performing various opera ons like bit transfer, bit manipula on, logical
opera ons on bits, program control transfer based on bit state, etc [LO 2]
7. Register R0 contains 50H and Accumulator contains 01H. What will be the contents of R0 and A after
executing the instruction MOV A,R0
(a) R0 = 01H; A = 01H (b) R0 = 50H; A = 01H
(c) R0 = 01H; A = 50H (d) R0 = 50H; A = 50H
(e) None of these
8. Data memory location 00H contains F0H and Stack Pointer (SP) contains 07H. What will be the contents of
memory location 00H and SP after executing the instruction PUSH 00H
(a) Data memory location 00H = 07H; SP = 07H
(b) Data memory location 00H = F0H; SP = 07H
(c) Data memory location 00H = F0H; SP = 08H
(d) Data memory location 00H = F0H; SP = 06H
(e) None of these
9. Data memory location 00H contains F0H and Stack Pointer (SP) contains 08H. The memory location 08H
contains 0FH. What will be the contents of memory location 00H, 08H and SP after executing the instruction
POP 00H
(a) Memory location 00H = 0FH; Memory location 08H = F0H; SP = 08H
(b) Memory location 00H = F0H; Memory location 08H = F0H; SP = 07H
(c) Memory location 00H = 0FH; Memory location 08H = 0FH; SP = 07H
(d) Memory location 00H = 0FH; Memory location 08H = 0FH; SP = 09H
(e) None of these
10. Data memory location 0FH contains 00H and the accumulator contains FFH. What will be the contents of
data memory location 0FH and the accumulator after executing the instruction XCH A, 0FH
(a) Memory location 0FH = 00H; Accumulator = FFH
(b) Memory location 0FH = 00H; Accumulator = 00H
(c) Memory location 0FH = FFH; Accumulator = 00H
(d) Memory location 0FH = FFH; Accumulator = FFH
(e) None of these
11. Data memory location 0FH contains A5H, Accumulator contains 5AH and register R0 contains 0FH.
What will be the contents of data memory location 0FH, Register R0 and accumulator after executing the
instruction XCHD A, @R0
(a) Memory location 0FH = A5H; Accumulator = 5AH; R0 = 0FH
(b) Memory location 0FH = 55H; Accumulator = AAH; R0 = 0FH
(c) Memory location 0FH = AAH; Accumulator = 55H; R0 = 0FH
(d) Memory location 0FH = A5H; Accumulator = 55H; R0 = AAH
(e) None of these
12. Register DPTR holds 2050H. Explain the result of executing the instruction MOVX @DPTR, A
(a) P2 SFR = 20H; P1 SFR = 50H during the first machine cycle; RD\ signal is asserted once
(b) P2 SFR = 50H; P1 SFR = 20H during the first machine cycle; RD\ signal is asserted once
(c) P2 SFR = 20H; P1 SFR = 50H during the first machine cycle; WR\ signal is asserted once
(d) P2 SFR = 50H; P1 SFR = 20H during the first machine cycle; WR\ signal is asserted once
(e) None of these
13. The Program Strobe Enable (PSEN) signal is asserted during program fetching if
(a) The program memory is external to the controller
(b) The Program memory is internal to the controller
(c) The Program memory is either internal or external to the controller
14. How many program fetches occur per machine cycle?
(a) 1 (b) 2 (c) 3 (d) 4
Programming the 8051 Microcontroller 203
15. How many ‘program memory fetches’ are skipped during the execution of MOVX instruction?
(a) 1 (b) 2 (c) 3 (d) 4
16. The Address Latch Enable (ALE) signal is asserted how many times in a machine cycle?
(a) 1 (b) 2 (c) 3 (d) 4
17. How many times the ALE signal is skipped during the execution of a MOVX instruction?
(a) 1 (b) 2 (c) 3 (d) 4
18. Which of the following is true about MOVC instruction
(a) Used for reading from Program memory (b) Uses Indexed Addressing technique
(c) Both a & b (d) None of these
19. The content of Accumulator is FFH and the Carry Flag is in the cleared state. What will be the contents of
Accumulator and carry flag after executing the instruction ADD A,#1
(a) Accumulator = 01H; Carry flag = 1 (b) Accumulator = 01H; Carry flag = 0
(c) Accumulator = 00H; Carry flag = 0 (d) Accumulator = 00H; Carry flag = 1
20. Accumulator register contains 0FH and the Carry flag CY is in the set state. What will be the state of Carry
flag after executing the instruction ADD A,#0F0H
(a) 1 (b) 0 (c) Indeterminate
21. The content of the accumulator is FFH and the Carry flag is in the cleared state. What will be the contents of
the accumulator and carry flag after executing the instruction ADDC A,#1
(a) Accumulator = 01H; Carry flag = 1 (b) Accumulator = 01H; Carry flag = 0
(c) Accumulator = 00H; Carry flag = 0 (d) Accumulator = 00H; Carry flag = 1
22. Accumulator register contains 0FH and the Carry flag CY is in the cleared state. What will be the contents
of Carry flag and Accumulator after executing the instruction SUBB A,#0F0H
(a) Accumulator = E1H; Carry flag = 1 (b) Accumulator = E1H; Carry flag = 0
(c) Accumulator = 1FH; Carry flag = 0 (d) Accumulator = 1FH; Carry flag = 1
23. Accumulator register contains F0H and the Carry flag CY is in the cleared state. What will be the contents
of the Carry flag and the accumulator after executing the instruction SUBB A,#0FH
(a) Accumulator = E1H; Carry flag = 1 (b) Accumulator = E1H; Carry flag = 0
(c) Accumulator = 1FH; Carry flag = 0 (d) Accumulator = 1FH; Carry flag = 1
24. Accumulator register contains 0FFH and the B register contains 02H. What will be the contents of the
Accumulator and B register after executing the instruction MUL AB
(a) Accumulator = 0FEH; B = 01H (b) Accumulator = 00H; B = 0FEH
(c) Accumulator = 0FEH; B = 00H (d) Accumulator = 01H; B = 0FEH
25. Accumulator register contains 0FFH, B register contains 02H and the Carry flag is in the cleared state. What
will be the contents of the Carry flag and Overflow flag after executing the instruction MUL AB
(a) Carry flag = 1; Overflow flag = 0
(b) Carry flag = 0; Overflow flag = Remains same as the previous value
(c) Carry flag = 1; Overflow flag = 1
(d) Carry flag = 0; Overflow flag = 1
26. Accumulator register contains 0FFH, B register contains 02H and the Overflow flag is in the cleared state.
What will be the contents of the Carry flag and Overflow flag after executing the instruction MUL AB
(a) Carry flag = remains same as the previous value; Overflow flag = 0
(b) Carry flag = remains same as the previous value; Overflow flag = 1
(c) Carry flag = 1; Overflow flag = 1
(d) Carry flag = 0; Overflow flag = 1
27. Accumulator contains 0FFH and the B Register contains 02H. What will be the contents of the accumulator
and B register after executing the instruction DIV AB
204 Introduc on to Embedded Systems
(a) Accumulator = 7FH; Carry flag = 0 (b) Accumulator = 7FH; Carry flag = 1
(c) Accumulator = 00H; Carry flag = 0 (d) Accumulator = 00H; Carry flag = 1
39. What changes will happen on executing the instruction CLR 00H
(a) The code memory location 00H becomes 00H
(b) The data memory location 00H becomes 00H
(c) The external data memory location 00H becomes 00H
(d) The LS Bit of the data held by data memory location 20H becomes 0
40. Accumulator register contains 0FH and carry flag is in the set state. What will be the contents of the
Accumulator and carry flag after executing the instruction CPL A
(a) Accumulator = 0FH; Carry flag = 0 (b) Accumulator = 0FH; Carry flag = 1
(c) Accumulator = F0H; Carry flag = 0 (d) Accumulator = F0H; Carry flag = 1
41. Accumulator register contains 01H and carry flag is in the set state. What will be the contents of Accumulator
and carry flag after executing the instruction RL A
(a) Accumulator = 02H; Carry flag = 0 (b) Accumulator = 02H; Carry flag = 1
(c) Accumulator = 80H; Carry flag = 0 (d) Accumulator = 80H; Carry flag = 1
42. Accumulator register contains 01H and carry flag is in the set state. What will be the contents of Accumulator
and carry flag after executing the instruction RLC A
(a) Accumulator = 02H; Carry flag = 0 (b) Accumulator = 02H; Carry flag = 1
(c) Accumulator = 03H; Carry flag = 0 (d) Accumulator = 03H; Carry flag = 1
43. Accumulator register contains 01H and carry flag is in the set state. What will be the contents of the
accumulator and carry flag after executing the instruction RR A
(a) Accumulator = 02H; Carry flag = 0 (b) Accumulator = 02H; Carry flag = 1
(c) Accumulator = 80H; Carry flag = 0 (d) Accumulator = 80H; Carry flag = 1
44. Accumulator register contains 01H and carry flag is in the set state. What will be the contents of the
accumulator and carry flag after executing the instruction RRC A
(a) Accumulator = 80H; Carry flag = 0 (b) Accumulator = 80H; Carry flag = 1
(c) Accumulator = 03H; Carry flag = 0 (d) Accumulator = 03H; Carry flag = 1
45. Accumulator register contains 5FH. What will be the content of the accumulator after executing the instruction
SWAP A
(a) 00H (b) F5H (c) 5FH (d) 00H
46. What changes will happen on executing the instruction CPL 00H
(a) The code memory location 00H becomes 00H
(b) The data memory location 00H becomes 00H
(c) The external data memory location 00H becomes 00H
(d) The LS Bit of the data held by data memory location 20H is complemented
47. The carry bit is in the set state and the port status bit P1.0 is in the cleared state. What will be the values of
Carry bit and P1.0 after executing the instruction ANL C, /P1.0
(a) Carry flag = 0; P1.0 = 0 (b) Carry flag = 0; P1.0 = 1
(c) Carry flag = 1; P1.0 = 0 (d) Carry flag = 1; P1.0 = 1
48. The Carry bit is in the cleared state and the Port status bit P1.0 is in the cleared state. What will be the values
of Carry bit and P1.0 after executing the instruction ORL C, /P1.0
(a) Carry flag = 0; P1.0 = 0 (b) Carry flag = 0; P1.0 = 1
(c) Carry Flag = 1; P1.0 = 0 (d) Carry flag = 1; P1.0 = 1
49. Which of the following Jump instruction is the optimal instruction if the offset (relative displacement of
jump location from the current instruction location) of the jump location is greater than 127 and less than
–128 and is within the same 2K block of the current instruction
206 Introduc on to Embedded Systems
14. Which of the following UML diagram represents object interactions with respect to time?
(a) State Diagram (b) Sequence Diagram (c) Object Diagram (d) Use case Diagram
(e) None of these
15. Which of the following UML interaction diagram(s) emphasises on structural organisation of objects?
(a) Collaboration Diagram (b) Sequence Diagram
(c) State Diagram (d) Use case Diagram
(e) None of these
16. Which of the following is (are) trade-offs in hardware software partitioning?
(a) Processing speed (b) Memory requirement
(c) Cost (d) All of these
(e) None of these
Double Sided PCB: PCB with track rou ng and component placement done on both sides of the PCB [LO 8]
Mul layer PCB: PCB with mul ple layers for track rou ng [LO 8]
Piggy-back/plug-in/daughter PCB: PCB designed to plug into some other PCBs [LO 8]
Flexible PCB: PCB with flexible substrate for copper deposi ng for tracks and footprint [LO 8]
Solder Mask: A plas c layer deposited on the copper tracks of the PCB to protect it from corrosion and
abrasion [LO 8]
Silk Screen: The legend for prin ng readable informa on on the PCB [LO 8]
Conformal Coa ng: A protec ve coa ng made up of dilute solu on of silicon rubber or epoxy for protec ng
the PCB from extreme environmental condi ons [LO 8]
12. For a J-K Flip-Flop, the previous output state is 1 and the current input state is J = K = 0, what is the current
output state?
(a) 1 (b) 0 (c) Undefined
13. For a J-K Flip-Flop, the previous output state is 0 and the current input state is J=K=1, what is the current
output state?
(a) 1 (b) 0 (c) Undefined
14. For a T Flip-Flop, the previous output state is 1 and the current input state is 1, what will be the current
output state on applying a clock pulse?
(a) 1 (b) 0 (c) Undefined
15. The number of logic gates present in an IC is 500. The integration type of the IC is?
(a) MSI (b) SSI (c) LSI (d) VLSI
16. The type of integration for a microprocessor chip is
(a) MSI (b) SSI (c) LSI (d) VLSI
17. The design of an integrated circuit with built-in ADC is an example for
(a) Analog (b) Digital (c) Mixed signal (d) None of these
18. In embedded hardware design context, schematic represents
(a) The physical arrangement of various components present in the hardware product
(b) The different components involved in a hardware product and the interconnection among them
(c) Both of these (d) None of these
19. In embedded hardware design context, Bill of Materials (BoM) represents
(a) The type and value of each components present in the hardware
(b) The quantity of different components present in the hardware
(c) Both of these (d) None of these
20. In embedded hardware design context, ‘Netlist’ is
(a) The soft form representation of the different components of a hardware and the interconnection among
them
(b) The output file generated from schematic design
(c) The input file for the PCB layout design
(d) All of these (e) None of these
21. In embedded hardware design context, ‘Layout’ is
(a) A soft form representation of the PCB
(b) Software ‘Blueprint’ representing the physical placement of components in a hardware
(c) All of these (d) None of these
22. Which of the following are the building blocks of a ‘layout’?
(a) Footprints (b) Routes (c) Layers (d) Vias
(e) All of these (f) (a) and (b)
23. What is ‘Footprint’ in the ‘Layout’ context?
(a) The ‘Top view’ of a component
(b) The three-dimensional representation of a component
(c) Both of these (d) None of these
24. Which of the following package(s) contain pins/pads on only one side of the component?
(a) Zigzag In-line Package (ZIP) (b) Single In-line Package (SIP)
(c) Dual In-line Package (DIP) (d) All of these (e) None of these
25. Which of the following is a Surface Mount Package?
(a) PDIP (b) TSSOP (c) SOIC (d) All of these
(e) only (b) and (c)
Embedded Hardware Design and Development 303
26. Which of the following package(s) contain(s) pins/pads on the four sides of the component?
(a) VQFP (b) SOICS (c) TSSOP (d) PQFP
(e) (a) and (d)
27. The representation of interconnection among various components of a hardware in ‘Layout’ is known as
(a) Footprint (b) Route/Trace (c) Layer (d) None of these
28. In embedded hardware design context, a ‘via’ is a
(a) conductive drill hole (b) interconnection among two components
(c) Ground line (d) Power line (e) None of these
29. Which is (are) the layers of ‘Layout’ used for printing ‘Assembly Notes’?
(a) AST (b) ASB (c) TOP (d) BOT (e) (a) and (b)
30. What is gerber file in the PCB Design context?
(a) File containing the component PCB layout info, routing info, drill details, etc. in a universally accepted
file exchange protocol format
(b) File containing the component PCB layout info, routing info, drill details, etc. in a proprietary file
exchange protocol format
(c) A collection of art works in a gerber format for each layer of the PCB
(d) (a) and (c) (e) None of these
31. Which of the following is(are) true about a single sided PCB?
(a) Only a single layer is used for routing the connections between components
(b) Components are placed on only one side of the PCB
(c) All of these (d) None of these
32. Which of the following is(are) true about flexible PCB?
(a) Highly flexible compared to normal PCB
(b) Uses flexible substrate for etching
(c) Commonly used for the fabrication of Antennas, membrane keyboards, etc.
(d) All of these (e) None of these
33. Which of the following technique(s) is(are) used for PCB fabrication
(a) Photo Engraving (b) PCB Milling (c) PCB printing (d) All of these
34. Which of the following is(are) subtractive process for PCB fabrication?
(a) Photo Engraving (b) PCB printing (c) PCB Milling (d) All of these
(e) None of these (f) only (a) and (c)
35. Which of the following is(are) true about ‘Solder Mask’?
(a) It is a conductive layer
(b) It is a non-conductive layer
(c) It protects the copper tracks from corrosion
(d) It prevents the ‘wetting’ of solder
(e) (b), (c) and (d)
36. Which of the following is(are) true about ‘Conformal Coating’?
(a) It is a conductive layer (b) It is a non-conductive layer
(c) It is a coating over the PCB to protect PCB
(d) Dilute solution of silicon rubber or epoxy, or plastic is used as the conformal coating material
(e) (b), (c) and (d)
378 Introduc on to Embedded Systems
Here ‘ORG’ is a
(a) Pseudo-op (b) Label (c) Opcode (d) Operand
4. Translation of assembly code to machine code is performed by the
(a) Assembler (b) Compiler (c) Linker (d) Locator
5. A cross-compiler converts an embedded ‘C’ program to
(a) The machine code corresponding to the processor of the PC used for application development
(b) The machine code corresponding to a processor which is different from the processor of the PC used for
application development
6. ‘ptr’ is an integer pointer holding the address of an integer variable say x which holds the value 10. Assume
the address of the integer variable x as 0x12ff7c. What will be the output of the below piece of code? Assume
the storage size of integer is 4
ptr+=2;
//Print the address holding by the pointer
printf(“0x%x\n”, ptr);
(a) 0x12ff7c (b) 0x12ff7e (c) 0x12ff84 (d) None
7. ‘ptr’ is a char pointer holding the address of a char variable say x which holds the value 10. Assume the
address of the char variable x as 0x12ff7c. What will be the output of the below piece of code?
//Print the address holding by the pointer
printf(“0x%x\n”, ptr++);
(a) 0x12ff7c (b) 0x12ff7d (c) 0x12ff80 (d) None
8. ‘ptr’ is a char pointer holding the address of a char variable say x which holds the value 10. Assume the
address of the char variable x as 0x12ff7c. What will be the output of the below piece of code?
//Print the address holding by the pointer
printf(“0x%x\n”, ++ptr);
(a) 0x12ff7c (b) 0x12ff7d (c) 0x12ff80 (d) None
9. ‘ptr1’ is a char pointer holding the address of the char variable say x which holds the value 10. ‘ptr2’ is a
char pointer holding the address of the char variable say y which holds the value 20. Assume the address of
char variable x as 0x12ff7c and char variable y as 0x12ff78. What will be the output of the following piece
of code?
//Print the address holding by the pointer
printf(“%x\n”, (ptr1+ptr2));
Embedded Firmware Design and Development 379
n= stricmp(str1, str2);
printf(“%d”, n);
(a) 1 (b) 0 (c) –1
18. What is the output of the following piece of code?
char str1[] = “Hello ”
char str2[] = “World!”;
strcpy(str1,str2);
printf(“%s\n”,str1);
(a) Hello (b) Hello World! (c) Compile error (d) World!
19. What is the output of the following piece of code?
char str1[] = “Hello ”
char str2[] = “World!”;
str1 = str2;
printf(“%s\n”,str1);
(a) Hello (b) Hello World! (c) Compile error (d) World!
20. Consider the following structure declaration
typedef struct
{
unsigned char command; // command to pass to device
unsigned char status; //status of command execution
unsigned char BytesToSend; //No. of bytes to send
unsigned char BytesReceived; //No. of bytes received
}Info;
Assuming the size of unsigned char as 1 byte, what will be the memory allocated for the structure?
(a) 1 byte (b) 2 bytes (c) 4 bytes (d) 0 bytes
21. Consider the following structure declaration
typedef struct
{
unsigned char hour; // command to pass to device
unsigned char minute; //status of command execution
unsigned char seconds; //No. of bytes to send
}RTC_Time;
Assuming the size of unsigned char as 1 byte, what will be the output of the following piece of code when
compiled for Keil C51 cross compiler
static volatile RTC_Time xdata *current_time = (void xdata *) 0x7000;
void main()
{
unsigned char test;
test = current_time->minute;
printf(“%d”, test);
}
Embedded Firmware Design and Development 381
Assuming the size of unsigned char as 1 byte, what will be the output of the following piece of code when
compiled for Keil C51 cross compiler
void main(void)
{
unsigned char test;
test = offsetof(RTC_Time, seconds);
printf(“%d”,test);
}
(a) 1 (b) 2 (c) Compile error (d) 0
23. Consider the following union definition
typedef union
{
int intVal;
unsigned char charVal[3];
} union_ichar;
What will be the output of the following piece of code? Assume the storage size of int as 2 and unsigned char
as 1
union_ichar int_char;
void main(void)
{
unsigned char test;
test = sizeof (int_char);
printf(“%d”,test);
}
(a) 0 (b) 2 (c) 3 (d) 5
24. The default initialiser for a union with static storage is the default for
(a) The first member variable
(b) The last member variable
(c) The member variable with the highest storage requirement
25. Which of the following is (are) True about pre-processor directives?
(a) compiler/cross-compiler directives
(b) executable code is generated for pre-processor directives on compilation
(c) No executable code is generated for pre-processor directives on compilation
(d) Start with # symbol (e) (a), (b) and (d) (f) (a), (c) and (d)
382 Introduc on to Embedded Systems
26. The ‘C’ pre-processor directive instruction always ends with a semicolon (;). State ‘True’ or ‘False’
(a) True (b) False
27. Which of the following is the file inclusion pre-processor directive?
(a) #define (b) #include (c) #ifdef (d) None of these
28. Which of the following pre-processor directive is used for indicating the end of a block following #ifdef or
#else?
(a) #define (b) #undef (c) #endif (d) #ifndef
29. Which of the following preprocessor directive is used for coding macros?
(a) #ifdef (b) #define (c) #undef (d) #endif
30. What will be the output of the following piece of code?
#define A 2+8
#define B 2+3
void main(void)
{
unsigned char result ;
result = A/B ;
printf(“%d”, result) ;
}
(a) 0 (b) 2 (c) 9 (d) 8
31. The instruction
const unsigned char* x;
represents:
(a) Pointer to constant data (b) Constant pointer to data
(c) Constant pointer to constant data (d) None of these
32. The instruction
unsigned char* const x;
represents:
(a) Pointer to constant data (b) Constant pointer to data
(c) Constant pointer to constant data (d) None of these
33. The instruction
const unsigned char* const x;
represents:
(a) Pointer to constant data (b) Constant pointer to data
(c) Constant pointer to constant data (d) None of these
34. The instruction
volatile unsigned char* x;
represents:
(a) Volatile pointer to data (b) Pointer to volatile data
(c) Volatile pointer to constant data (d) None of these
Embedded Firmware Design and Development 383
represents:
(a) Volatile pointer to data (b) Pointer to volatile data
(c) Pointer to constant volatile data (d) None of these
36. The constant volatile variable in Embedded application represents a
(a) Write only memory location/register (b) Read only memory location/register
(c) Read/Write memory location/register
37. What will be the output of the following piece of code? Assume the data bus width of the controller on which
the program is executed as 8 bits.
void main(void)
{
unsigned char flag = 0x00;
flag |= (1<<7)
printf(”%d”, flag);
}
(a) 0x00 (b) 0x70 (c) 0x80 (d) 0xFF
38. The variable ‘x’ declared with the following code statement
const int x = 5;
Racing: The situa on in which mul ple processes compete (race) each other to access and manipulate shared
data concurrently [LO 8]
Deadlock: A situa on where none of the processes are able to make any progress in their execu on. Deadlock
is the condi on in which a process is wai ng for a resource held by another process which is wai ng for a
resource held by the first process [LO 8]
Livelock: A condi on where a process always does something but is unable to make any progress in the
execu on comple on [LO 8]
Starva on: The condi on in which a process does not get the CPU or system resources required to con nue
its execu on for a long me [LO 8]
Dining Philosophers’ Problem: A real-life representa on of the deadlock, starva on, livelock and racing issues
in shared resource access in opera ng system context [LO 8]
Producer-Consumer problem: A common data sharing problem where two processes concurrently access a
shared buffer with fixed size [LO 8]
Readers-Writers problem: A data sharing problem characterised by mul ple processes trying to read and
write shared data concurrently [LO 8]
Priority inversion: The condi on in which a medium priority task gets the CPU for execu on, when a high
priority task needs to wait for a low priority task to release a resource which is shared between the high
priority task and the low priority task [LO 8]
Priority inheritance: A mechanism by which the priority of a low-priority task which is currently holding a
resource requested by a high priority task, is raised to that of the high priority task to avoid priority inversion
[LO 8]
Priority Ceiling: The mechanism in which a priority is associated with a shared resource (The priority of the
highest priority task which uses the shared resource) and the priority of the task is temporarily boosted to
the priority of the shared resource when the resource is being held by the task, for avoiding priority inversion
[LO 8]
Task/Process synchronisa on: The act of synchronising the access of shared resources by mul ple processes
and enforcing proper sequence of opera on among mul ple processes of a mul tasking system [LO 8]
Mutual Exclusion: The act of preven ng the access of a shared resource by a task/process when it is being
held by another task/process [LO 8]
Semaphore: A system resource for implemen ng mutual exclusion in shared resource access or for restric ng
the access to the shared resource [LO 8]
Mutex: The binary semaphore implementa on for exclusive resource access under certain OS kernel [LO 8]
Device driver: A piece of so ware that acts as a bridge between the opera ng system and the hardware
[LO 9]
Task Scheduling
1. Who determines which task/process is to be executed at a given point of time?
(a) Process manager (b) Context manager
(c) Scheduler (d) None of these
2. Task scheduling is an essential part of multitasking.
(a) True (b) False
3. The process scheduling decision may take place when a process switches its state from
(a) ‘Running’ to ‘Ready’ (b) ‘Running’ to ‘Blocked’
(c) ‘Blocked’ to ‘Ready’ (d) ‘Running’ to ‘Completed’
(e) All of these
(f) Any one among (a) to (d) depending on the type of multitasking supported by OS
4. A process switched its state from ‘Running’ to ‘Ready’ due to scheduling act. What is the type of multitasking
supported by the OS?
(a) Co-operative (b) Preemptive (c) Non-preemptive (d) None of these
5. A process switched its state from ‘Running’ to ‘Wait’ due to scheduling act. What is the type of multitasking
supported by the OS?
(a) Co-operative (b) Preemptive (c) Non-preemptive (d) (b) or (c)
6. Which one of the following criteria plays an important role in the selection of a scheduling algorithm?
(a) CPU utilisation (b) Throughput (c) Turnaround time (d) Waiting time
(e) Response time (f) All of these
7. For a good scheduling algorithm, the CPU utilisation is
(a) High (b) Medium (c) Non-defined
8. Under the process scheduling context, ‘Throughput’ is
(a) The number of processes executed per unit of time
(b) The time taken by a process to complete its execution
(c) None of these
9. Under the process scheduling context, ‘Turnaround Time’ for a process is
(a) The time taken to complete its execution (b) The time spent in the ‘Ready’ queue
(c) The time spent on waiting on I/O (d) None of these
10. Turnaround Time (TAT) for a process includes
(a) The time spent for waiting for the main memory
(b) The time spent in the ready queue
(c) The time spent on completing the I/O operations
(d) The time spent in execution
(e) All of these
11. For a good scheduling algorithm, the Turn Around Time (TAT) for a process should be
(a) Minimum (b) Maximum (c) Average (d) Varying
12. Under the process scheduling context, ‘Waiting time’ for a process is
(a) The time spent in the ‘Ready queue’
(b) The time spent on I/O operation (time spent in wait state)
(c) Sum of (a) and (b) (d) None of these
13. For a good scheduling algorithm, the waiting time for a process should be
(a) Minimum (b) Maximum (c) Average (d) Varying
14. Under the process scheduling context, ‘Response time’ for a process is
(a) The time spent in ‘Ready queue’
(b) The time between the submission of a process and the first response
Real-Time Opera ng System (RTOS) based Embedded System Design 495
(c) The time spent on I/O operation (time spent in wait state)
(d) None of these
15. For a good scheduling algorithm, the response time for a process should be
(a) Maximum (b) Average (c) Least (d) Varying
16. What are the different queues associated with process scheduling?
(a) Ready Queue (b) Process Queue (c) Job Queue (d) Device Queue
(e) All of the Above (f ) (a), (c) and (d)
17. The ‘Ready Queue’ contains
(a) All the processes present in the system (b) All the processes which are ‘Ready’ for execution
(c) The currently running processes (d) Processes which are waiting for I/O
18. Which among the following scheduling is (are) Non-preemptive scheduling
(a) First In First Out (FIFO/FCFS) (b) Last In First Out (LIFO/LCFS)
(c) Shortest Job First (SJF) (d) All of these
(e) None of these
19. Which of the following is true about FCFS scheduling
(a) Favours CPU bound processes (b) The device utilisation is poor
(c) Both of these (d) None of these
20. The average waiting time for a given set of process is ______ in SJF scheduling compared to FIFO
scheduling
(a) Minimal (b) Maximum (c) Average
21. Which among the following scheduling is (are) preemptive scheduling
(a) Shortest Remaining Time First (SRT) (b) Preemptive Priority based
(c) Round Robin (RR) (d) All of these
(e) None of these
22. The Shortest Job First (SJF) algorithm is a priority based scheduling. State ‘True’ or ‘False’
(a) True (b) False
23. Which among the following is true about preemptive scheduling
(a) A process is moved to the ‘Ready’ state from ‘Running’ state (preempted) without getting an explicit
request from the process
(b) A process is moved to the ‘Ready’ state from ‘Running’ state (preempted) on receiving an explicit
request from the process
(c) A process is moved to the ‘Wait’ state from the ‘Running’ state without getting an explicit request from
the process
(d) None of these
24. Which of the following scheduling technique(s) possess the drawback of ‘Starvation’
(a) Round Robin (b) Priority based preemptive
(c) Shortest Job First (SJF) (d) (b) and (c)
(e) None of these
25. Starvation describes the condition in which
(a) A process is ready to execute and is waiting in the ‘Ready’ queue for a long time and is unable to get the
CPU time due to various reasons
(b) A process is waiting for a shared resource for a long time, and is unable to get it for various reasons.
(c) Both of the above
(d) None of these
26. Which of the scheduling policy offers equal opportunity for execution for all processes?
(a) Priority based scheduling (b) Round Robin (RR) scheduling
496 Introduc on to Embedded Systems
8. In asynchronous messaging, the message posting thread just posts the message to the queue and will not wait
for an acceptance (return) from the thread to which the message is posted. State ‘True’ or ‘False’
(a) True (b) False
9. Which of the following is a blocking message passing call in Windows?
(a) PostMessage (b) PostThreadMessage
(c) SendMessage (d) All of these
(e) None of these
10. Under Windows operating system, the message is passed through _____ for Inter Process Communication
(IPC) between processes?
(a) Message structure (b) Memory mapped object
(c) Semaphore (d) All of these
11. Which of the following is true about ‘Signals’ for Inter Process Communication?
(a) Signals are used for asynchronous notifications
(b) Signals are not queued
(c) Signals do not carry any data
(d) All of these
12. Which of the following is true about Racing or Race condition?
(a) It is the condition in which multiple processes compete (race) each other to access and manipulate shared
data concurrently
(b) In a race condition the final value of the shared data depends on the process which acted on the data
finally
(c) Racing will not occur if the shared data access is atomic
(d) All of these
13. Which of the following is true about deadlock?
(a) Deadlock is the condition in which a process is waiting for a resource held by another process which is
waiting for a resource held by the first process
(b) Is the situation in which none of the competing process will be able to access the resources held by other
processes since they are locked by the respective processes
(c) Is a result of chain of circular wait
(d) All of these
14. What are the conditions favouring deadlock in multitasking?
(a) Mutual Exclusion (b) Hold and Wait
(c) No kernel resource preemption at kernel level
(d) Chain of circular waits (e) All of these
15. Livelock describes the situation where
(a) A process waits on a resource is not blocked on it and it makes frequent attempts to acquire the resource.
But unable to acquire it since it is held by other process
(b) A process waiting in the ‘Ready’ queue is unable to get the CPU time for execution
(c) Both of these (d) None of these
16. Priority inversion is
(a) The condition in which a high priority task needs to wait for a low priority task to release a resource
which is shared between the high priority task and the low priority task
(b) The act of increasing the priority of a process dynamically
(c) The act of decreasing the priority of a process dynamically
(d) All of these
498 Introduc on to Embedded Systems
(c) The state of a mutex object is set to signalled when it is not owned by any process/thread, and set to non-
signalled when it is owned by any process/thread
(d) Both (a) & (b) (e) Both (a) & (c)
26. Which of the following is (are) the wait functions provided by windows for synchronisation purpose?
(a) WaitForSingleObject (b) WaitForMultipleObjects
(c) Sleep (d) Both (a) and (b)
27. Which of the following is true about Critical Section object?
(a) It can only be used by the threads of a single process (Intra process)
(b) The ‘Critical Section’ must be initialised before the threads of a process can use it
(c) Accessing Critical Section blocks the execution of the caller thread if the critical section is already in use
by other threads
(d) Threads which are blocked by the Critical Section access call, waiting on a critical section, are added to
a wait queue and are woken when the Critical Section is available to the requested thread
(e) All of these
28. Which of the following is a non-blocking Critical Section accessing call under windows?
(a) EnterCriticalSection (b) TryEnterCriticalSection
(c) Both of these (d) None of these
29. The Critical Section object makes the piece of code residing inside it ____?
(a) Non-reentrant (b) Re-entrant (c) Thread safe (d) Both (a) and (c)
30. Which of the following synchronisation techniques is exclusively used for synchronising the access of shared
resources by the threads of a process (Intra Process Synchronisation) under Windows kernel?
(a) Mutex object (b) Critical Section object
(c) Interlocked functions (d) Both (c) and (d)
12. Which of the following is not a mechanism supported by VxWorks for Inter Task Synchronisation?
(a) Binary semaphore (b) Test and set (c) Counting semaphore
(d) Mutual exclusion semaphore
13. Which of the following is true about the scheduler locking based synchronisation under VxWorks kernel?
(a) May lead to unacceptable real-time response
(b) May increase interrupt latency
(c) Both of these
(d) None of these
14. The mutual exclusion semaphore under VxWorks kernel is a type of
(a) Counting semaphore (b) Binary semaphore
15. The mutual exclusion semaphore prevents priority inversion by
(a) Priority ceiling (b) Priority inheritance
16. Which of the following is true about Interrupt Service Routine under VxWorks kernel
(a) It runs in a separate context
(b) It runs on the same context as that of the interrupted task
(c) It depends on the processor architecture in which the VxWorks kernel is running
(d) None of these
17. Which of the following is true about the stack implementation for ISR under VxWorks?
(a) All ISRs share a common stack
(b) The ISR uses the stack of the interrupted task
(c) It depends on the processor architecture in which the kernel is running
(d) None of these
18. What is the priority levels supported by MicroC/OS-II kernel
(a) 64 (b) 56 (c) 256 (d) Unlimited
19. Which of the following is true about task scheduling under MicroC/OS-II kernel
(a) Priority based pre-emptive scheduling
(b) Priority based non-preemptive scheduling
(c) Round Robin
(d) Pre-emptive priority based with Round Robin for priority resolution
20. Which of the following is not true about tasks under MicroC/OS-II kernel
(a) Supports multiple tasks with same priority
(b) ISRs are allowed to create tasks
(c) The stack can be specified as either upward growing or downward growing
(d) All of these (e) Only (a) and (b) (f) Only (a) and (c) (g) Only (b) and (c)
21. Under MicroC/OS-II kernel changes its state from ‘RUNNING’ to ‘WAITING’, which of the following
conditions might have invoked this?
(a) The task attempted to acquire a shared resource which is currently in use by another task
(b) The task involves some I/O operation and is waiting for I/O
(c) The task undergoes sleeping
(d) The task is suspended by itself or by another task
(e) Any one of these (f) None of these
22. Which is the MicroC function responsible for initialising the different OS kernel data structure
(a) OSInit() (b) OSStart() (c) OSIdle() (d) None of these
23. Which of the following is not an IPC mechanism under MicroC/OS-II kernel
(a) Message queue (b) Mailbox (c) Pipes (d) None of these
556 Introduc on to Embedded Systems
24. Which is the function call used by an ISR to indicate the occurrence of an interrupt to the MicroC/OS-II
kernel
(a) Interrupt (b) OSIntEnter (c) OSIntExit (d) OSIntNesting
25. Under the MicroC/OS-II kernel, the ISR for normal processor architecture makes use of which stack?
(a) Stack of the Interrupted Task
(b) Separate stack
(c) A mix of a separate stack and stack of interrupted task
(d) ISR doesn’t use any stack
In Circuit Emulator (ICE): A hardware device for emula ng the target CPU for debug purpose [LO 4]
Debug Board Module (DBM): ICE device which contains the emula on control logic and emula on chip in a
single hardware unit and is designed for a par cular family of device [LO 4]
Background Debug Mode (BDM): A proprietary serial interface from Motorola for On Chip Debugging
[LO 4]
JTAG: A serial interface for target board diagnos cs and debugging [LO 4]
Boundary Scan: A target hardware debug method for checking the interconnec ons among the various chips
of a complex board [LO 6]
Boundary Scan Descrip on Language (BSDL): A language similar to VHDL, which describes the boundary scan
implementa on of a JTAG supported device [LO 6]
Tes ng Phase: Phase which deals with the execu on of various tests like Integra on tes ng, System tes ng,
User acceptance tes ng. etc. [LO 4]
Unit Tes ng: Tests carried out to verify the func oning of the individual modules of the firmware and hardware
[LO 4]
Upgrade Phase: Product Life Cycle stage which deals with the development of upgrades (new versions) for
the product which is already present in the market [LO 4]
User Acceptance Tes ng (UAT): Tests performed by the user (customer) against the acceptance values for
each requirement [LO 4]
Itera ve or Fountain Model: EDLC Model which follows the sequence—Do some analysis, follow some design,
then some implementa on [LO 5]
Linear or Waterfall Model: EDLC Model which executes all phases of the EDLC in sequence, one a er another
[LO 5]
Prototyping Model: EDLC Model which is the varia on of the itera ve model in which a more refined prototype
is produced at the end of each itera on [LO 5]
Spiral Model: EDLC model combining linear and prototyping model to give the best possible risk minimisa on
in product development [LO 5]
6. An embedded product contains LCD interfacing and a developer is assigned to work on this module. The
developer coded the module and tested its functioning using a simulator. The test performed by the developer
falls under?
(a) Integration Testing (b) Unit Testing
(c) System Testing (d) Acceptance Testing
7. For an Embedded product, the requirements are well defined and are within the scope and no change requests
are expected till the completion of the life cycle. Which is the best-suited life cycle model for developing this
product?
(a) Linear (b) Iterative (c) Prototyping (d) Spiral
8. Which of the following is(are) not a feature of prototyping model
(a) Requirements refinement (b) Documentation intensive
(c) Intensive Project Management (d) Controlled risk
9. An embedded product under consideration is very complex in nature and there is a possibility for change
in requirements of the product. Also the risk associated with the development of this product is very high.
Which is the best-suited life cycle method to handle this product development?
(a) Linear (b) Iterative (c) Prototyping (d) Spiral