This set of Embedded Systems Multiple Choice Questions & Answers (MCQs) focuses on “Tasks, Threads and Process”.
1. Which of the following can be used to refer to entities within the RTOS?
a) threads
b) kernels
c) system
d) applications
View Answer
Explanation: The threads and processes can be used to refer to entities within the RTOS. They provide an interchangeable replacement for the task. They have a slight difference in their function. A process is a program in execution and it has its own address space whereas threads have a shared address space. The task can be defined as a set of instructions which can be loaded into the memory.
2. Which of the following defines the set of instructions loaded into the memory?
a) process
b) task
c) thread
d) system hardware
View Answer
Explanation: The task can be defined by the set of instructions which is loaded into the memory and it can split into two or more tasks.
3. Which of the following uses its own address space?
a) thread
b) process
c) task
d) kernel
View Answer
Explanation: Threads uses shared memory space and it uses the memory space of the process.
4. Which of the following does not uses a shared memory?
a) process
b) thread
c) task
d) kernel
View Answer
Explanation: The program in execution is known as the process. The process does not share the memory space but the threads have a shared memory address. When the CPU switches from process to another, the current information is stored in the process descriptor.
5. Which of the following can own and control the resources?
a) thread
b) task
c) system
d) peripheral
View Answer
Explanation: The task and process have several characteristics and one such is that the task or process can own or control resources and it has threads of execution which are the paths through the code.
6. Which can be supported if the task or process maintains a separate data area for each thread?
a) single thread system
b) mono thread system
c) multiple threads
d) dual threads
View Answer
Explanation: The multiple threads can be supported only if the process or task can maintain separate data areas for each thread.
7. Which of the following possesses threads of execution?
a) process
b) thread
c) kernel
d) operating system
View Answer
Explanation: The process has threads of execution which are the paths through the code.
8. Which of the following is inherited from the parent task?
a) task
b) process
c) thread
d) kernel
View Answer
Explanation: The threads are a part of the process, that is, it uses a shared memory of the process and therefore said that its resources are inherited from the parent process or task.
9. Which term is used to encompass more than a simple context switch?
a) process
b) single thread system
c) thread
d) multithread
View Answer
Explanation: The process includes the additional information which is used to encompass more than a simple context switch. This is similar to the task switching, that is why it is said that process and task are interchangeable.
10. Which can be considered as the lower level in the multitasking operating system?
a) process
b) task
c) threads
d) multi threads
View Answer
Explanation: In the multitasking operating system, the process and tasks form the higher level whereas the thread is the lower level. But in a simple operating system, there is no difference between the context switch of thread and the process.
Sanfoundry Global Education & Learning Series – Embedded System.
To practice all areas of Embedded System, here is complete set of 1000+ Multiple Choice Questions and Answers.