1 / 13

EE551 Real-Time Operating Systems

EE551 Real-Time Operating Systems. Processes, Threads and Tasks Course originally developed by Maj Ron Smith. Processes. The process is the most central concept in an operating system A process is an abstraction of a running program

brian
Télécharger la présentation

EE551 Real-Time Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE551 Real-Time Operating Systems Processes, Threads and Tasks Course originally developed by Maj Ron Smith

  2. Processes • The process is the most central concept in an operating system • A process is an abstraction of a running program • A number of processes (at least more than one) executing at the same time is referred to as: multitasking, multiprocessing multithreading, multiprogramming • Are these programs truly running in parallel? Dr Alain Beaulieu

  3. The Process Model • The process model is simply the idea that all runnable software on the computer (including the OS) is organized into a number of sequential processes Dr Alain Beaulieu

  4. Processes on a single processor Conceptual Program Text Flow Process Execution in Time Dr Alain Beaulieu

  5. Virtual process parallelism • Requires that we keep the state of a process to be able to re-establish it after interrupts • From hardware devices • Position limit detectors, Resolvers, • Clocks (tics) • Software Interrupts (system calls) • Context Switch – What is a context? Dr Alain Beaulieu

  6. Process States So the tasks in the ready and blocked state have some info stored but what? Dr Alain Beaulieu

  7. Implementation of Processes Not really for RTOS in Embedded systems Typical Fields in a Process Table Entry (depends on OS) Dr Alain Beaulieu

  8. The Thread Model • Traditional operating systems have a number of processes each with an address space and a single thread of control • The process model discussed previously was based on two independent concepts: • Resource grouping • Address space (program text & data), open files, child processes, pending alarms, signal handlers, etc. • Execution (Thread of Execution or Thread) • The part of the program text that is running Dr Alain Beaulieu

  9. The Thread Model • Processes vs. Threads: Dr Alain Beaulieu

  10. Threads in User Space • Each process needs a thread table • Similar to a process table, but tracks only: • Program Counter • Stack Pointer • Registers • State • Table managed by the run-time system Dr Alain Beaulieu

  11. Threads in Kernel Space • Put the concept of the thread in the kernel • There is no need of a run-time system • The kernel has a thread table • Threads make calls to the kernel for thread creation/termination • Kernel holds each thread’s registers, state, etc... Dr Alain Beaulieu

  12. Tasks? • So we understand that a process has everything to do with Resources allocated to a program • Virtual (including time such as alarms) • Physical • A thread has everything to do with the Execution of a program • So what is a task in the realm of µC/OS? Dr Alain Beaulieu

  13. Multitasking • A task in µC/OS lives in a process that includes the operating system as it is compiled and linked with the solution code • A single task in µC/OS would therefore look like a process it has resources and it is a program in execution • A task also looks like a thread because it has its own stack and shares the resources with other tasks. Dr Alain Beaulieu

More Related