0% found this document useful (0 votes)
71 views5 pages

Unit3 2 Marks &16

A process is a single execution of a program that has its own state including registers and memory. Processes that share the same address space are called threads. Multi-rate embedded systems have computations that run at different periodic rates, like automobile engines, printers, and cell phones. A process's release time is when it becomes ready to run, while its deadline is the time it must finish. The period is time between executions and rate is the inverse of period. Processes are in ready, waiting, or executing states depending on if they have data and are selected to run by the scheduler. Interrupts allow the kernel to determine the next process and context switching changes the active process's register set.

Uploaded by

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

Unit3 2 Marks &16

A process is a single execution of a program that has its own state including registers and memory. Processes that share the same address space are called threads. Multi-rate embedded systems have computations that run at different periodic rates, like automobile engines, printers, and cell phones. A process's release time is when it becomes ready to run, while its deadline is the time it must finish. The period is time between executions and rate is the inverse of period. Processes are in ready, waiting, or executing states depending on if they have data and are selected to run by the scheduler. Interrupts allow the kernel to determine the next process and context switching changes the active process's register set.

Uploaded by

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

UNIT 3

1. Define process and threads.


A process is a single execution of a program. If we run the same program two different times, we
have created two different processes. Each process has its own state that includes not only its
registers but all of its memory.
Processes that share the same address space are often called threads
2. What is multi-rate embedded system? Give 3 examples

When multiple rates of computation has followed, it is difficult to write codes for fulfilling timing
need. Multirate embedded computing systems are very common, including automobile engines,
printers, and cell phones. In all these systems, certain operations must be executed periodically, and
each operation is executed at its own rate.

3. Define release time and deadline.


The release time is the time at which the process becomes ready to execute; this is not necessarily
the time at which it actually takes control of the CPU and starts to run.
A deadline specifies when a computation must be finished. The deadline for an aperiodic process is
generally measured from the release time. The deadline for a periodic process may in general occur
at some time other than the end of the period
4. Outline period and rate.
The period of a process is the time between successive executions. For example,the period of a
digital filter is defined by the time interval between successive input samples.The process’s rate is
the inverse of its period. In a multirate system,each process executes at its own distinct rate.
5. Compare the ready and waiting states of process scheduling.
Ready Waiting
A process goes into the ready state when it A process goes into the waiting state when it
receives its required data and when it enters a needs data that it has not yet received or when it
new period. has finished all its work for the current period.
Any process that could execute is in the ready A process may be waiting for data from an I/O
state;the OS chooses among the ready processes device or another process,or it may be set to run
to select the next executing process. from a timer that has not yet expired. Such
processes are in the waiting state.

6. Identify the three basic scheduling states in OS.


 Waiting- A process goes into the waiting state when it needs data that it has not yet received
or when it has finished all its work for the current period
 Ready- A process goes into the ready state when it receives its required data and when it
enters a new period.
 Executing- A process can go into the executing state only when it has all its data, is ready to
run, and the scheduler selects the process as the next process to run.
7. Make use of scheduling policy for process scheduling.

A scheduling policy defines how processes are selected for promotion from the ready state to the
running state. Every multitasking OS implements some type of scheduling policy.

Schedulability means whether there exists a schedule of execution for the processes in a system that
satisfies all their timing requirements.

8. Identify utilization of multi-state systems and function sequences.


U=CPU time for useful work / total available CPU time

Utilization is the ratio of the CPU time that is being used for useful computations to the total
available CPU time. This ratio ranges between 0 and 1, with 1 meaning that all of the
available CPU time is being used for system purposes. The utilization is often expressed as a
percentage. If we measure the total execution time of all processes over an interval of time t,
then the CPU utilization is

U=T/t
9. Identify the role of Kernel in Embedded System and define it.
The kernel is the part of the OS that determines what process is running. The kernel is activated
periodically by the timer.The length of the timer period is known as the time quantum
The kernel determines what process will run next and causes that process to run. On the next timer
interrupt,the kernel may pick the same process or another process to run.
10. Choose the two major styles of inter process communication.
 Shared memory
 Message passing
11. Construct the task graph in which P1 and P2 each process separate inputs and then pass their
results onto P3 for further processing.
A set of processes with data dependencies is known as a task graph

12. Apply the concept of context switching for an application.

The set of registers that define a process are known as its context and switching from one process’s
register set to another is known as context switching.
13. What is the use of interrupts service routines?
 Input/output data transfer for peripheral devices.
 Input signals to be used for timing purpose.
 Real time executives/multitasking
 Event driven program
14. What do you meant by Semaphore?

A test-and-set can be used to implement a semaphore,which is a language-level synchronization


construct.The system provides one semaphore that is used to guard access to a block of protected
memory. Any process that wants to access the memory must use the semaphore to ensure that no
other process is actively using it.

15. When a process is said to be reentrant function?


 The ability of a program to be executed multiple times, using the same memory image
without error.
 A function that can be called asynchronously from multiple threads without concern for
synchronization or mutual process is said to be reentrant function
16. Categorize between initiation time and completion time.
The initiation time is the time at which a process actually starts executing on the CPU. The
completion time is the time at which the process finishes its work.
17. Dissect the two ways of assigning priority to a process.

After assigning priorities,the OS takes care of the rest by choosing the highest-priority ready
process.There are two major ways to assign priorities:static priorities that do not change during
execution and dynamic priorities that do change

18. Assess the response time of an application.


The response time of a process as the time at which the process finishes. The critical instant for a
process is defined as the instant during execution at which the task has the largest response time.

19. Distinguish the two different styles used for inter process communication.

Shared memory- Two components,such as a CPU and an I/O device,communicate through a shared
memory location. The software on the CPU has been designed to know the address of the shared
location;the shared location has also been loaded into the proper register of the I/O device.

Message passing- Message passing communication complements the shared memory model. each
communicating entity has its own message send/receive unit. The message is not stored on the
communications link,but rather at the senders/ receivers at the end points.

20. Analyze the various scheduling states of a process.

Waiting- A process goes into the waiting state when it needs data that it has not yet received or
when it has finished all its work for the current period

Ready- A process goes into the ready state when it receives its required data and when it enters a
new period.
Executing- A process can go into the executing state only when it has all its data, is ready to run,
and the scheduler selects the process as the next process to run.

21. Examine priority inversion.


Scheduling the processes without considering the resources those processes require can cause
priority inversion,in which a low-priority process blocks execution of a higher priority process by
keeping hold of its resource.
22. What are the three conditions that must be satisfied by the re-entrant function?

A function is called re-entrant function when the following three conditions are satisfied:

 All the arguments pass the values and some of the argument is a pointer whenever a calling
function calls it.
 When an operation is not atomic, the function should not operate on any variable, which is
declared but passed by reference not passed by arguments in to the function.
 That function does not call any other function that is not itself re-entrant

23. Compare preemptive and non preemptive scheduling.


Basic The resources are allocated to a Once resources are allocated to a process, the
process for a limited time. process holds it till it completes its burst time
or switches to waiting state.

Process can be interrupted in between. Process can not be interrupted till it terminates
Interrupt or switches to waiting state.

If a high priority process frequently If a process with long burst time is running
Starvation arrives in the ready queue, low CPU, then another process with less CPU
priority process may starve. burst time may starve.

24. Define Scheduling Overhead

The execution time required to choose the next execution process,which is incurred in addition to
any context switching overhead. In general,the more sophisticated the scheduling policy,the more
CPU time it takes during system operation to implement it.
25. Propose the requirements that a solution to the critical section problem must satisfy.

 Mutual Exclusion : If a process is executing in its critical section, then no other process is
allowed to execute in the critical section.
 Progress : If no process is executing in the critical section and other processes are waiting
outside the critical section, then only those processes that are not executing in their remainder
section can participate in deciding which will enter in the critical section next, and the
selection can not be postponed indefinitely.
 Bounded Waiting : A bound must exist on the number of times that other processes are
allowed to enter their critical sections after a process has made a request to enter its critical
section and before that request is granted.
PART-B

1. Describe multiple tasks and multiple processes with appropriate diagrams .


2. Explain in detail the various priority based scheduling policies with example.
3. Summarize the following a) Inter process communication b) Context Switching
4. Identify the various performance issues in detail.
5. Construct suitable examples to illustrate RMS and EDF.
6. Make use of Preemptive and Non-Preemptive real time operating system and explain
performance issues in scheduling.
7. If your set of processes is un-schedulable and you need to guarantee that they complete their
deadlines, develop possible ways to solve this problem?
8. Discuss the function,pipes,queues and semaphore used for the IPC in the embedded system
9. Apply a Scheduling process using an EDF Policy.
10. Examine the following : (i) Blocking interprocess communication (ii) Nonblocking interprocess
communication (iii) Shared memory communication.
11. Make use of shared memory and message passing in detail.
12. Construct a scheduling process using an EDF policy.

process Capacity Deadline Period


T1 3 7 20
T2 2 4 5
T3 2 8 10

13. Analyze on the various scheduling mechanisms in detail.


14. Construct a scheduling process using an RMS policy.
15. Examine static and dynamic priorities

You might also like