Example question model for
Module-3 and Module-4 (Data Structures and RTOS)
1. An Embedded
system has only computer Hardware.(True/False)
2. Aperiodic
task have either soft deadline or no deadline.(True/False)
3. Device driver exists in the Kernel space .(True/False)
4. Embedded
system is a software system that is completely encapsulated by the hardware
that it controls.(True/False)
5. RTOS is necessary in highly responsive embedded system and during processing multiple
processes.(True/Flase)
6. The
advantage with the cooperative scheduling is that a long execution time of a
low priority task makes the high priority task wait until it finishes.(True/False)
7. Kernel is
not aware of the exisitance of user level threads.(True/False)
8. In RTOS the
necessary signaling between the interrupt routine and the task code is handled
by the user code.(TRUE/FALSE)
9. RTOS can
suspend one task code in the middle of its processing in order to run another.(TRUE/FALSE)
10.Does uc/OS-II RTOS support nested interrupts (True/Flase)
11.If there is already a message in the mailbox,
it is not overwritten (True/False)
12.In
uc/OS-II of the 64 priority
levels 7 of them are Reserved (True/False)
Multiple choice questions
1.
Entries
in a stack are "ordered". What is the meaning of this statement? (1 mark)
1.
A collection of stacks can be sorted.
2.
Stack entries may be compared with the
'<' operations
3.
The entries must be stored in a linked
list.
4.
There is a first entry, a second entry,
and so on.
2.
The
operation for adding an entry to a stack is traditionally called: (1
mark)
1.
add
2.
append
3.
insert
4.
push
3.
Which of
the following applications may use a stack?
(1 mark)
1.
A parentheses balancing program.
2.
Keeping track of local variables at run
time.
3.
Syntax analyzer for a compiler.
4.
All of the above
4.
which of
the following is the feature of stack
(1 mark)
1.
all operations are at one end
2.
it cannot reuse its memory
3.
all elements are of different data
types
4.
any element can be accessed from it
directly
5.
To create
a linked list, we can allocate space and make something point to it, by
writing:
struct-name *pointer-variable; (2 mark)
Which of the following statement will correctly allocate the space
struct-name *pointer-variable; (2 mark)
Which of the following statement will correctly allocate the space
1.
pointer-variable =
malloc(sizeof(*struct-name));
2.
pointer-variable = (struct-name *)
malloc(sizeof(struct struct-name));
3.
pointer-variable = alloc(sizeof(struct
struct-name));
4.
pointer-variable =
alloc(sizeof(*struct-name));
6.
what is
the output of the following code. (3
mark)
#include <stdio.h>
struct mystruct1
{
int a;
int b;
char c;
};
struct mystruct2
{
int a;
int b;
char c;
char d;
};
int main()
{
int k=0;
k=sizeof(struct
mystruct2)==sizeof(struct mystruct1)?3:6;
k|=(1<<2);
printf("k=%d",k);
}
1. K=3
2. K=4
3. K=6
4. K=7
No comments:
Post a Comment