Languages-Assembly Language [3i Infotech Placement]: Sample Questions 14 - 15 of 51

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 14

Assembly Language
Edit

Describe in Detail

Essay▾

What do you mean by wait state? Why is it needed?

Explanation

  • A wait state is the delay experienced by a microprocessor when accessing external memory or another device that is slow to respond.
  • Similarly to access slow memory the microprocessor must be able to delay the transfer until the memory access is complete.
  • Some microprocessors provide a special control input called READY to allow the memory to set its own memory cycle time- controlling the processor cycle.
  • After sending an address out, the microprocessor waits until it receives a READY input from memory- it enters a wait state for as long as READY line is in 0 state.
  • When the memory access is complete, the READY goes high to indicate that the memory is ready for specified transfer.

Question 15

Assembly Language

Question

MCQ▾

Memory allocation of variables declared in a program is

Choices

Choice (4)

a.

allocated in RAM.

b.

allocated in ROM.

c.

assigned to registers.

d.

allocated on stack.

Answer

d.

Explanation

Memory Allocation
  • Variables declared in a program are allocated on the stack.
  • In a stack data is added or removed in a last in first out manner.
  • If a region of memory lies on the thread՚s stack, that memory is said to have been allocated on the stack.
  • Stack-based memory allocation is very simple and typically faster than heap-based memory allocation.
  • Memory on heap is allocated dynamically by the program.
  • Stack based allocation is suitable for temporary data or data which is no longer required after the creating function exits.

Developed by: