0% found this document useful (0 votes)
6 views9 pages

UNIT II Two Marks

The document is a question bank for the CS3691 Embedded Systems and IoT course at Ramco Institute of Technology, focusing on Embedded C programming and operating systems concepts. It includes questions on topics such as LCD interfacing, multitasking, scheduling policies, inter-process communication, and real-time operating systems. Additionally, it contains detailed parts for discussion and evaluation related to multitasking, multi-rate systems, and scheduling algorithms.

Uploaded by

swathisemmanan91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views9 pages

UNIT II Two Marks

The document is a question bank for the CS3691 Embedded Systems and IoT course at Ramco Institute of Technology, focusing on Embedded C programming and operating systems concepts. It includes questions on topics such as LCD interfacing, multitasking, scheduling policies, inter-process communication, and real-time operating systems. Additionally, it contains detailed parts for discussion and evaluation related to multitasking, multi-rate systems, and scheduling algorithms.

Uploaded by

swathisemmanan91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

RAMCO INSTITUTE OF TECHNOLOGY

Department of Electronics and Communication Engineering


Academic Year: 2024 - 2025 (Odd Semester)
QUESTION BANK
Degree, Semester& Branch: VI Semester B.Tech. IT
Course Code & Title : CS3691 Embedded Systems and IoT
Name of Faculty member: G.Sivakumar
UNIT II EMBEDDED C PROGRAMMING

1. What is the significance of BUSY flag in LCD interfacing? When D7 pin=1 and RS pin=0
he USY flag is set which means that LCD is busy taking

care of internal operations and will not accept any new information. Therefore, we have to

check BUSY flag before writing data to LCD.

2.How a pressed key is detected in keyboard interfacing?

The keyboards are organized in a matrix of rows and columns. The microcontroller
grounds all rows by providing zero to the output latch then reads the columns.
3.What is meant by key bouncing?

Microprocessor must wait until the key reach to a steady state; this is known as Key bounce.

4. When is an external memory access generated in 8051?


In 8051, during execution the data is fetched continuous. Most of the data is executed out of the
8051‟sbuilt-in control store. When an address is outside the internal control store, an external
memory access is generated.

5.Features of Embedded C
1. It is only the extension of C language and nothing more.
2. It has source code format that depends upon the kind of microcontroller or
microprocessor that have been being used.
3. Through embedded C high level optimization can be done.
4. It is used in microprocessor or microcontroller applications.
5. It has limited resources for used, mean the embedded system have only memory
location.
6. In embedded C constraints runs on real time and output is not available at operating
system.
6.Define Tasks and processes.
A task is a set of computations or actions that processes on a CPU under the control of a
scheduling kernel. It also has a control structure called a task control block. It has a unique
ID. It has different states: idle, ready, running, blocked and finished.
A process is an instance of a computer program that is being executed. A computer
program is a passive collection of instructions, while a process is the actual execution of
those instructions. Several processes may be associated with the same program; for example,
opening up several instances of the same program often means more than one process is
being executed.
7. What is meant by Operating System?
Operating System is a system software that manages the computer's resources, such as the
central processing unit, memory, disk drives, and printers, establish a user interface, and
execute and provide services for application software.
8. Give any two properties of Operating Systems.
The properties of OS are:
 Batch processing
 Time Sharing
 Managing the computer's resources, such as the central processing unit, memory, disk
drives, and printers
 Establishing a user interface
 Providing services for application software

9. Define multitasking.
Multitasking is the concept of performing multiple tasks over a certain period of time by
executing them concurrently. There are two basic types of multitasking: preemptive and
cooperative. In preemptive multitasking, the operating system allocates CPU time slices to
each program. In cooperative multitasking, each program can control the CPU for as long as
it needs it. If a program is not using the CPU, however, it can allow another program to use it
temporarily.
10. What is Multithreading?
Multithreading is the ability of an operating system to execute the different parts of a
program called threads at the same time.

11. What is a Real Time Operating System?


A real-time operating system (RTOS) is an operating system intended to serve real-time
application, process data as it comes in, typically without buffering delays.
12. List any two Real-Time Operating Systems.
Examples for Real-Time Operating System:
 POSIX
 Windows CE
13. How is Real-Time Operating System different from general purpose OS?
Real-Time Operating System allocates resources using algorithms that take real time
into account. General-purpose Operating System, in contrast, generally allocates resources
using other criteria like fairness. Trying to allocate the CPU equally to all processes without
considering the time can easily cause processes to miss their deadlines in Real-Time
Operating System.

14. What is Multiprocessing?


Multiprocessing is the ability of an operating system to execute more than one process
simultaneously on a multi-processor machine. In this, a computer uses more than one CPU at a
time.

15. What is a thread?


In lightweight RTOSs, the processes run in the same address space. Processes that share
the same address space are often called threads. In other words, Threads are the light weight
processes which are independent part of a process or program. It comprises of a thread id, a
program counter, a register set and a stack.

16. What is a multirate system?


In multirate systems, certain operation must be executed periodically and each operation
is executed at its own rate. E.g., Automobile engines, Printers, Cellphones.

17. What is scheduling policy? List the process scheduling policies.


A scheduling policy defines how processes are selected for promotion from the ready
state to the executing state. Every multitasking OS implements some scheduling policy.
Scheduling policies vary widely in the generality of the timing requirements they can handle
and the efficiency with which they use the CPU. Some of the scheduling policies are:
 Round Robin Scheduling
 Priority Based Scheduling
 RMS-Rate Monotonic Scheduling
 EDF-Earliest Deadline First
18. Define priority-based scheduling.
Each process is assigned a priority, an integer-valued number. The scheduler
maintains a priority queue of processes that are in the ready state out of which the task
having highest-valued priority will be made to run.
19. What does a scheduler do in an Operation System environment?
The scheduler is an operating system module that selects the next programs to be
admitted into the system and the next process to run. Operating systems may feature up to
three distinct scheduler types: a long-term scheduler, a medium-term scheduler, and a short-
term scheduler.
 Long term scheduling - Determines which programs are admitted to the system for
execution and when, and which programs should exit.

20. List the process scheduling policies.


Some of the process scheduling policies are:
 Round Robin Scheduling
 Priority Based Scheduling
 RMS-Rate Monotonic Scheduling
 EDF-Earliest Deadline First

21. Define Rate Monotonic Scheduling.


Rate Monotonic Scheduling (RMS) is a scheduling algorithm used in real-time operating
systems with static-priority scheduling. The static priorities are assigned on the basis of the
period of the process. The process with the shortest period is assigned the highest priority.

22. Define Earliest Deadline First (EDF) scheduling.


Earliest Deadline First (EDF) is a dynamic scheduling algorithm used in real-time
operating systems to place processes in a priority queue. Whenever a scheduling event occurs
the queue will be searched for the process closest to its deadline. This is the next process to
be scheduled for execution.

23. What is meant by context switching?


The set of registers that define process is known as its context. Context switching is
the process of storing and restoring the state (context) of a process or thread so that execution
can be resumed from the same point at a later time. This enables multiple processes to share a
single CPU and is an essential feature of a multitasking operating system.
24. Define Inter-Process Communication.
Inter-Process Communication (IPC) is a set of techniques used for the exchange of
data among the processes. Processes may be running on one or more computers connected by
a network. Some of the IPC techniques are message passing, synchronization, shared
memory, and remote procedure calls.
25. List the different types of Inter-Process Communication.
The different types of Inter-Process Communication are:
 Shared memory
 Message passing
 Queue
 Signal
 Mailbox
26. Write about blocking and non-blocking inter-process communication.
 Process can send a communication in one of the two ways: blocking or non-blocking.
 In blocking communication, after sending, the process goes into the waiting state until
it receives a response.
 Non-blocking communication allows the process to continue execution after sending
the communication.

27. What is a semaphore?


Semaphores are provided by OS to guard a resource. There are different types of
semaphores namely Binary semaphore, Counting semaphore and Mutex. Semaphores are
mainly used to protect critical sections of code.
28. Define race condition.
When several process access and manipulate same data concurrently, then the
outcome of the execution depends on the particular order in which the access takes place.
This is called a race condition or critical timing race. To avoid race condition, only one
process at a time can manipulate the shared variable. This can be done with the help of
semaphore.
29.Define Tasks and processes.
A task is a set of computations or actions that processes on a CPU under the control of a
scheduling kernel. It also has a control structure called a task control block. It has a unique
ID. It has different states: idle, ready, running, blocked and finished.
A process is an instance of a computer program that is being executed. A computer
program is a passive collection of instructions, while a process is the actual execution of
those instructions. Several processes may be associated with the same program; for example,
opening up several instances of the same program often means more than one process is
being executed.

PART B (16 Marks)

1. Discuss in detail multitasking and multiprocessing.


2. Write short notes on multi-rate systems. (or) Describe why automobile engines require a
multi-rate control.
3. Describe the two basic concepts involved in pre-emptive Real-Time Operating Systems.
4. Explain the principle of priority based context switching mechanism. Discuss about the
various priority based scheduling algorithms. (or) Explain in detail Rate Monotonic
Algorithm and Earliest Deadline First algorithm.
5. What is meant by critical timing race or race condition and how to avoid it?
6. Define priority inversion. Describe the method that is used to avoid priority inversion.
7. Explain inter-process communication with neat sketches.
8. How to evaluate the operating system performance?
9. Schedule the process given below using Earliest Deadline First (EDF) scheduling policy.
Compute the schedule for an interval equal to the least common multiple of the periods of
the process. Assume the time starts at t=0.

Process Execution time Period


P1 1 3
P2 1 4
P3 2 5

PART – C
1. An audio system processes samples at a rate of 44.1 kHz. At what rate could we sample
the system’s front panel to both simplify analysis of the system schedule and provide
adequate response to the user’s front panel requests?
2. Compute the utilization of this periodic set of tasks

3. Show a cyclostatic schedule for the tasks and Compute the CPU utilization for the system
4. For the given periodic process execution times and periods, show how much CPU time of
higher-priority processes will be required during one period of each of the following
processes:
a. P1
b. P2
c. P3
d. P4

5. For the periodic processes shown below:


a. Schedule the processes using an RMS policy.
b. Schedule the processes using an EDF policy.
In each case, compute the schedule for an interval equal to the hyper period of the
processes. Time starts at t = 0.

6. Evaluate the system design technique for large data analysis using video accelerator.

10. Discuss in detail multitasking and multiprocessing.


11. Write short notes on multi-rate systems. (or) Describe why automobile engines require a
multi-rate control.
12. Describe the two basic concepts involved in pre-emptive Real-Time Operating Systems.
13. Explain the principle of priority based context switching mechanism. Discuss about the
various priority based scheduling algorithms. (or) Explain in detail Rate Monotonic
Algorithm and Earliest Deadline First algorithm.
14. What is meant by critical timing race or race condition and how to avoid it?
15. Define priority inversion. Describe the method that is used to avoid priority inversion.
16. Explain inter-process communication with neat sketches.
17. Schedule the process given below using Earliest Deadline First (EDF) scheduling policy.
Compute the schedule for an interval equal to the least common multiple of the periods of
the process. Assume the time starts at t=0.
Process Execution time Period
P1 1 3
P2 1 4
P3 2 5

7. Compute the utilization of this periodic set of tasks

8. Show a cyclostatic schedule for the tasks and Compute the CPU utilization for the system

9. For the given periodic process execution times and periods, show how much CPU time of
higher-priority processes will be required during one period of each of the following
processes:
a. P1
b. P2
c. P3
d. P4

10. For the periodic processes shown below:


a. Schedule the processes using an RMS policy.
b. Schedule the processes using an EDF policy.
In each case, compute the schedule for an interval equal to the hyper period of the
processes. Time starts at t = 0.

11. Evaluate the system design technique for large data analysis using video accelerator.

You might also like