 Hello myself, Ravindra Chauhan, Assistant Professor, Department of Electronics Engineering, Vulture Institute of Technology, Solapur. So, in this session, we will discuss the concepts of process, tasks and threads in association with the operating system and especially with the real-time operating system. The learning outcome of this session, at the end of this session, the student will be able to describe the RTOS architecture. Also, the student will be able to describe and compare the RTOS process, tasks and threads. Outlines of this session, the first we will see the RTOS architecture. Then, we will define and discuss the concepts of process, threads and tasks, RTOS architecture. The real-time operating system is defined like this. It is the multi-tasking operating system, mainly designed for real-time applications where timing constraint is very, very important. Means, the output of the system must respond to the input. As far as the RTOS architecture is concerned, at the center, the very small component of software is lying, which is called the kernel. This kernel is the smallest component of the real-time operating system. Around the kernel, one can build the different modules as per the requirement. Now, for example, if the system is requiring to play with the different input and output devices, then around the kernel, one can build the IO device management system. If required, one can design the different drivers for the different devices. If required, one can build the file systems. The file systems means it is the information of the different files, the information like the size, its attribute, its status and like that. One can build the debugging facilities, one can add the networking protocols and other required components. If required, one can also build the C library. So, the kernel is the basic requirement and around the kernel, the designer can put or design the different modules shown in this particular figure. Mainly, the RTOS consists of two parts. The first one is called the kernel space or kernel mode and second is called the user space or user mode. So, kernel is the smallest and central component of an operating system. The kernel services are memory management, input-output device management and also kernel provides an interface for software applications to use the different resources, managing the protection of programs and multitasking. The major services offered by the RTOS kernel are like this, memory management, IO device management, timer management, timer management means the kernel is providing the CPU time to different programs or processes, interrupts and event handling. The interrupt means whenever any device is required some sort of service from the processor, then that device can get the required service by interrupting the processor. Then the task management and mainly the communication between the different tasks. Then we will see what the process is. So, any software consists of number of processes. Means the process is the sub-module or sub-program of the any software and each process runs under the control of an operating system. Now, these processes are having the different states and these states may be the ready state, running state, blocked or finished state. So, any process it is in one of these states at any time. Process is also having its own structure which is called the process structure and this process structure means the data associating with the process, the different objects, the different resources and the process control block. Now, process control block consists of the following information about the process. The information consists of process ID, process priority, address of the process control block of the next process which will run. Then addresses of program memory from physical memory space means address of the different instruction which are the part of this different process. Addresses of process specific data memory means process control block provides where the actual data is stored in the memory. Address of data generated during the process run. Addresses of process stack saving the CPU registers etc. Now, the another component which is called as a threads. Now, thread consists of executable program or code and has a state running, blocked or finished. A thread is a process or sub process within a process. Threads has its own program counter, stack pointer and priority parameters. A thread is a process level controlled entity and does not depend on the kernel level process. So, thread can be called as lightweight process. The next term is called as the task. So, task is the term used for the process in real-time operating system. So, as far as the meaning of process and task is one and the same, process mainly it is referred to in the general operating system and task is the term used for the process in real-time operating system. A task consists of sequentially executable codes and a state. The state information of the task which includes the running, blocked or finished. Means the state information tells whether the task is executing that is it is in running or whether the task is blocked by the kernel or whether the task has completed its work. The task is having its own structure which is called the task structure and which consists of the data associating with the particular task, the different objects, resources and task control block. Now the task control block consists of the following information. Whenever task is created, the kernel is assigning the unique identification number to that particular task. And that identification number is reflected in the respective task control block. So, task control block consists of its ID, then the priority assigned to that particular task, the status of the task means whether the task is in the running state, blocked state or waiting state. Also, task control block provides the information about the CPU registers associating with the particular task, the respective program counter which points the address of the instruction to be executed and the stack pointer associating with the particular task which points the respective data from the stack. Now the next is task state diagram. Now in this mainly four states are shown the dormant, ready, running and blocked. A dormant state denotes the task has been created but not activated. The ready state denotes the task is waiting for other higher priority tasks to be executed. Means this state indicates that now task is ready to execute. Then the running state denotes that the microprocessor is executing the task. Means the specified task is executing. And blocked state denotes the task is waiting for some external events. Then the kernel puts the task in the blocked state. Or same can be called as a finished state. When task has completed its work, then the task will go into the finished state. Now you pause the video and compare the program, process, threads and task. A program is general term for a unit of computation and is typically used in the context of programming. A process refers to a program in execution. A process is an independently executable unit handled by an operating system. A process is further broken up into threads. Threads are sometimes referred to as a lightweight process. A task is a generic term which refers to an independently schedulable unit of computation and is used typically in the context of scheduling of computation on the processor. References. The book embedded systems by Raj Kamal and embedded slash real time systems by Dr. K. V. K. Prasad. Thank you.