Multi-Tasking The Multi-Tasking service is offered by VxWorks with its real- time kernel “WIND”.

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

Chapter 3 Process Description and Control
Threads Irfan Khan Myo Thein What Are Threads ? a light, fine, string like length of material made up of two or more fibers or strands of spun cotton,
CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
Processes CSCI 444/544 Operating Systems Fall 2008.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Ceng Operating Systems Chapter 2.1 : Processes Process concept Process scheduling Interprocess communication Deadlocks Threads.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Processes and Resources
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
Process Concept An operating system executes a variety of programs
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process Description and Control A process is sometimes called a task, it is a program in execution.
ThreadsThreads operating systems. ThreadsThreads A Thread, or thread of execution, is the sequence of instructions being executed. A process may have.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Chapter 4: Threads Adapted to COP4610 by Robert van Engelen.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Outline Introduction to MQX Initializing and starting MQX
Process Description and Control
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
CSC 501 Lecture 2: Processes. Process Process is a running program a program in execution an “instantiation” of a program Program is a bunch of instructions.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
Processes & Threads Bahareh Goodarzi. Single & Multiple Thread of control code files data code files data.
Operating Systems 1 K. Salah Module 2.0: Processes Process Concept Trace of Processes Process Context Context Switching Threads –ULT –KLT.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
1 Chapter 2.1 : Processes Process concept Process concept Process scheduling Process scheduling Interprocess communication Interprocess communication Threads.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Threads G.Anuradha (Reference : William Stallings)
CS333 Intro to Operating Systems Jonathan Walpole.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
1 Chapter 4 Processes R. C. Chang. 2 Linux Processes n Each process is represented by a task_struct data structure (task and process are terms that Linux.
ITFN 3601 Introduction to Operating Systems Lecture 3 Processes, Threads & Scheduling Intro.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 14 Threads 2 Read Ch.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
12/22/ Thread Model for Realizing Concurrency B. Ramamurthy.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
1 OS Review Processes and Threads Chi Zhang
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Threads & Multithreading
Process concept.
Process Management Process Concept Why only the global variables?
CS 6560: Operating Systems Design
Topics Covered What is Real Time Operating System (RTOS)
OPERATING SYSTEMS CS3502 Fall 2017
Day 08 Processes.
Day 09 Processes.
Threads & multithreading
Structure of Processes
Processor Management Damian Gordon.
Lecture Topics: 11/1 General Operating System Concepts Processes
Threads Chapter 4.
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
Chapter 3: Processes.
CSE 451: Operating Systems Winter 2003 Lecture 4 Processes
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Processes in Unix and Windows
CS510 Operating System Foundations
Process Description and Control in Unix
Process Description and Control in Unix
Processor Management Damian Gordon.
Threads CSE 2431: Introduction to Operating Systems
Presentation transcript:

Multi-Tasking The Multi-Tasking service is offered by VxWorks with its real- time kernel “WIND”.

Scheduling VxWorks offers: 1.Pre-emptive priority based scheduling 2.Round robin scheduling  Pre-emption: When a high priority task comes in, the low priority task is swapped for the high priority task.

Task Switching The process of Swapping tasks is called Task switching. When a high priority task comes in, the processor completes the current assembly instruction of the low priority task, saves the context of the current task and then switches to the high priority task.

Task Control Block Each individual program is considered as a task and has its own context. While switching, the context of the current task is saved in a Task Control Block (TCB) that acts like a Process control block(PCB) of a general purpose operating system.

Contents of TCB 1.A thread of execution (program counter) 2.CPU register & floating point registers 3.Stack of the task. 4.I/O assignments for stdio 5.Timers 6.Kernel Control Structures 7.Others (Signal handlers etc..)

The difference between a PCB and TCB is, the TCB doesn’t contain the memory address space of the task unlike PCB. Reason: Every task in Vxworks operates in a unique memory address space and the mapping is done through the concept of Virtual Memory Interface (VxVMI).

By default the tasks created in VxWorks are in a Suspended state and every task has to be explicitly activated to be moved to the ready state. Note: taskSpawn() can be used to create and activate a task simulateneously

APIs used for task information The basic tasking routines are provide by tasklib.h These routines provide the means for task creation, control, and information. VxWorks tasks can be controlled from the host-resident shell (Tornado user shell)

Taskshow library This library provides routines to show task-related information, such as register values, task status, etc. The taskShowInit( ) routine links the task show facility into the VxWorks system. It is called automatically when this show facility is configured into VxWorks using either of the following methods: taskShowInit If you use the configuration header files, define INCLUDE_SHOW_ROUTINES in config.h. If you use the Tornado project facility, select INCLUDE_TASK_SHOW.

taskInfoGet( ) taskInfoGet( ) - get information about a task STATUS taskInfoGet ( int tid, /*ID of task for which to get info */ TASK_DESC * pTaskDesc /* task descriptor to be filled in */ ) This routine fills in a specified task descriptor (TASK_DESC) for a specified task. The information in the task descriptor is, for the most part, a copy of information kept in the task control block (WIND_TCB). The TASK_DESC structure is useful for common information and avoids dealing directly with the unwieldy WIND_TCB.

taskShow( ) taskShow( ) - display task information from TCBs STATUS taskShow ( int tid, /* task ID */ int level /* 0 = summary, 1 = details, 2 = all tasks */ ) This routine displays the contents of a task control block (TCB) for a specified task. If level is 1, it also displays task options and registers. If level is 2, it displays all tasks.

taskRegsShow( ) taskRegsShow( ) - display the contents of a task's registers void taskRegsShow ( int tid /* task ID */ ) This routine displays the register contents of a specified task on standard output.

taskStatusString( ) taskStatusString( ) - get a task's status as a string. STATUS taskStatusString ( int tid, /* task to get string for */ char * pString /* where to return string */ ) This routine deciphers the WIND task status word in the TCB for a specified task, and copies the appropriate string to pString.