Linux 202 Training Module Program and Process.

Slides:



Advertisements
Similar presentations
1 Chapter 5 Threads 2 Contents  Overview  Benefits  User and Kernel Threads  Multithreading Models  Solaris 2 Threads  Java Threads.
Advertisements

Operating Systems Yasir Kiani. 20-Sep Agenda for Today Review of previous lecture Use of FIFOs in a program Example code Process management commands.
Threads Lab اللهم علمنا ما ينفعنا،،، وانفعنا بما علمتنا،،، وزدنا علماً
Structure of Processes
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
Linux Overview.
Process Scheduling. Process The activation of a program. Can have multiple processes of a program Entities associated with a process –Instruction pointer,
UNIX System Administration Handbook Chapter 4. Controlling Processes 3 rd Edition Evi Nemeth et al. Li Song CMSC691X Summer 2002.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 4 More Hands-on Commands.
10/16/ Realizing Concurrency using the thread model B. Ramamurthy.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Managing processes and services. 1. How Linux handles processes 2. Managing running processes 3. Scheduling processes.
Lecture – Performance Performance management on UNIX.
CERN IT Department CH-1211 Genève 23 Switzerland t Multithreading in CASTOR Experiences from a real life application Giuseppe Lo Presti (IT/DM)
Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
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.
CERN IT Department CH-1211 Genève 23 Switzerland t Multithreading in CASTOR How to use pthreads without seeing them (almost…) Giuseppe Lo.
Multi-Tasking The Multi-Tasking service is offered by VxWorks with its real- time kernel “WIND”.
1  process  process creation/termination  context  process control block (PCB)  context switch  5-state process model  process scheduling short/medium/long.
12/22/ Thread Model for Realizing Concurrency B. Ramamurthy.
CS 390 Unix Programming Environment
CSC 660: Advanced Operating Systems
Copyright ©: Nahrstedt, Angrave, Abdelzaher
1 A Seven-State Process Model. 2 CPU Switch From Process to Process Silberschatz, Galvin, and Gagne  1999.
Threads A thread is an alternative model of program execution
1 Structure of Processes Chapter 6 Process State and Transition Data Structure for Process Layout of System Memory THE DESIGN OF THE UNIX OPERATING SYSTEM.
Embedded Real-Time Systems
B. RAMAMURTHY 5/10/2013 Amrita-UB-MSES Realizing Concurrency using the thread model.
7/9/ Realizing Concurrency using Posix Threads (pthreads) B. Ramamurthy.
Tutorial 4. In this tutorial session we’ll see Threads.
Linux I/O Tuning Anshul Gupta. 2 - Performance Gathering Tools -I/O Elevators -File System -Swap and Caches Agenda.
A thread is a basic unit of CPU utilization within a process Each thread has its own – thread ID – program counter – register set – stack It shares the.
Where'd all my memory go? Joshua Miller SCALE 12x – 22 FEB 2014.
Realizing Concurrency using the thread model
Linux Command Tips.
Linux203Training Module System Mgmt.
Process Management Process Concept Why only the global variables?
Chapter 3: Process Concept
Linux 103 Training MOdule Basic System Mgmt.
Midterm Review Chris Gill CSE 422S - Operating Systems Organization
Realizing Concurrency using the thread model
Proc File System Sadi Evren SEKER.
Threads and Scheduling
Thread Programming.
Chapter 4: Threads.
Linux Processes & Threads
Operating Systems 9 – scheduling
Processes A process is a running program.
IT 344: Operating Systems Module 4 Processes
Operating Systems Lecture 11.
Realizing Concurrency using Posix Threads (pthreads)
The Linux Command Line Chapter 10
Realizing Concurrency using the thread model
High-Performance Computing at the Martinos Center
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Thread Programming.
Realizing Concurrency using the thread model
Operating System Concepts
CSE 451 Autumn 2003 Section 3 October 16.
Realizing Concurrency using the thread model
Realizing Concurrency using Posix Threads (pthreads)
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Realizing Concurrency using the thread model
Chapter 3: Processes.
Realizing Concurrency using Posix Threads (pthreads)
CSE 451: Operating Systems Autumn 2004 Module 4 Processes
Tutorial 4.
MULTITHREADING PROGRAMMING
Concurrency, Processes and Threads
Presentation transcript:

Linux 202 Training Module Program and Process

This presentation will cover the following topics Thread top   ps details mem, cpu, etc

Thread A thread of execution is often regarded as the smallest unit of processing that a scheduler works on. Following are some of the major differences between the thread and the processes : Processes do not share their address space while threads executing under same process share the address space. Context switching between threads is fast as compared to context switching between processes

#include <pthread.h> int pthread_create(pthread_t *restrict tidp, const pthread_attr_t *restrict attr, void *(*start_rtn)(void), void *restrict arg)

Top command The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel. top top - 10:28:24 up 4 days, 22:13, 4 users, load average: 0.00, 0.01, 0.05 Tasks: 219 total, 1 running, 217 sleeping, 0 stopped, 1 zombie Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 4046188k total, 3914008k used, 132180k free, 1028328k buffers Swap: 6127612k total, 263468k used, 5864144k free, 1422996k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2494 netstorm 20 0 2180m 1096 1096 S 0.3 0.0 1:09.97 java 2588 root 20 0 2245m 23m 1312 S 0.3 0.6 2:07.85 java 2867 root 20 0 2570m 26m 1272 S 0.3 0.7 2:05.50 java 1 root 20 0 19416 688 456 S 0.0 0.0 0:00.87 init