Process states inWindows 2000 and Linux Module 2.1.

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

Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
2.3 InterProcess Communication (IPC) Part A. IPC methods 1. Signals 2. Mutex (MUTual EXclusion) 3. Semaphores 4. Shared memory 5. Memory mapped files.
1 Select and poll and Signals CS 241 April 6, 2012 University of Illinois.
Chapter 5 Processes and Threads Copyright © 2008.
Page 1 Task Control: Signals and Alarms Havilland and Salama’s Unix Systems Programming B. Ramamurthy.
1 CS318 Project #3 Preemptive Kernel. 2 Continuing from Project 2 Project 2 involved: Context Switch Stack Manipulation Saving State Moving between threads,
Page 1 Task Control: Signals and Alarms Chapter 7 and 8 B. Ramamurthy.
Chapter 6 Implementing Processes, Threads, and Resources.
1 Chapter 4 Threads Dr. İbrahim Körpeoğlu Bilkent University Department of Computer Engineering CS342 Operating Systems.
B. RAMAMURTHY Pag e 1 Task Control: Signals and Alarms Chapter 7 and 8 7/2/2015.
Operating Systems Yasir Kiani. 22-Sep Agenda for Today Review of previous lecture Process management commands: bg, fg, ^Z, jobs, ^C, kill Thread.
1 Chapter 4 Threads Dr. İbrahim Körpeoğlu Bilkent University Department of Computer Engineering CS342 Operating Systems.
SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to UNIX / Linux - 8 Dr. Jerry Shiao, Silicon Valley University.
The kernel considers each program running on your system to be a process A process lives as it executes, with a lifetime that may be short or long A process.
Operating Systems CSE 411 CPU Management Sept Lecture 9 Instructor: Bhuvan Urgaonkar.
Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
Threads G.Anuradha (Reference : William Stallings)
Agenda  Working with Processes: Purpose Running Programs within same process (execl, execlp, execle, execv, execvp, execve) “Spawning” other process (fork,
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R S I X Exception Handling.
System calls for Process management
Scis.regis.edu ● CS 468: Advanced UNIX Class 5 Dr. Jesús Borrego Regis University 1.
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.
Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Concurrent Processes Processes can concurrently run same program. Processes can concurrently run same program. Processes can start other processes. Processes.
Concurrency & Context Switching Process Control Block What's in it and why? How is it used? Who sees it? 5 State Process Model State Labels. Causes of.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Processes.
Signals and Signal Processing CIS 370 Lab 7 Umass Dartmouth.
Outline for Today Objectives –Finish discussion of Birrell –UNIX Signals –Eraser Administrative –Spider talk after class.
Signals (Chap 10 in the book “Advanced Programming in the UNIX Environment”) Acknowledgement : Prof. Y. Moon at Kangwon Nat’l Univ.
UNIX Signals * POSIX-Defined Signals * Signaling Processes * Signal Mask * sigaction * kill and sigaction * alarm * Interval Timers * POSIX.1b Timers *
Interprocess Communication Mechanisms. IPC Signals Pipes System V IPC.
4300 Lines Added 1800 Lines Removed 1500 Lines Modified PER DAY DURING SUSE Lab.
CSC Advanced Unix Programming, Fall, 2008 Welcome back to UNIX System Programming! Monday, September 22, class 5.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
© 숙대 창병모 1 제 10 장 신호 (Signal). © 숙대 창병모 2 Contents 1. Signal Concepts 2. signal() 3. Interrupted System Calls 4. kill() /raise() 5. alarm() pause() 6.
CSC 660: Advanced Operating Systems
2 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager.
S -1 Processes. S -2 wait and waitpid (11.2) Recall from a previous slide: pid_t wait( int *status ) wait() can: (a) block; (b) return with status; (c)
System calls for Process management Process creation, termination, waiting.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Signals.
CSE 451: Operating Systems Spring 2010 Module 4: Processes John Zahorjan Allen Center 534.
Chapter 4 – Thread Concepts
UNIX signals.
Task Control: Signals and Alarms Chapter 7 and 8
Threads and Scheduling
Chapter 4 Threads.
Chapter 4 – Thread Concepts
O/S State Diagrams © 2004, D. J. Foreman.
Process and Thread State Diagrams
Chapter 4: Threads.
Chapter 4: Threads.
CSC Advanced Unix Programming, Fall 2015
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
Operating Systems Lecture 12.
Mid Term review CSC345.
Signals Tanzir Ahmed CSCE 313 Fall 2018.
Inter-Process Communication ENCE 360
Process and Thread State Diagrams
Task Control: Signals and Alarms Chapter 7 and 8
Implementing Processes, Threads, and Resources
The Bash Shell Bash Programming
CSE 451: Operating Systems Spring 2006 Module 4 Processes
Process Management and System Monitoring
Signals.
Process Description and Control in Unix
Implementing Processes, Threads, and Resources
Chapter 4: Threads.
Chapter 4: Threads.
Presentation transcript:

Process states inWindows 2000 and Linux Module 2.1

Windows 2000 Process Object

Windows 2000 Thread Object

Windows 2000 Thread States Ready Standby Running Waiting Transition Terminated

Linux Process & Threads Most multithreaded OSs define a thread separately from processes. Linus Torvalds has defined that a thread is “context of execution” (COE). This means that only one process/thread table and one scheduler is needed. So switching thread or process is the same in Linux. Creation of thread is done using “clone” system call. Creation of a process is done using “fork” system call. Clone has options to share: all VM, filesystem, I/O, signal handlers. clone() is an extension to fork(). In fact, clone(SIGCHLD,0) == fork(). There are “Kernel threads” running only in kernel mode and only runs system programs and execute a single specific kernel function, e.g., kflushd, kupdate, kpiod, kswapd. Linux Threads FAQ –

Linux States of a Process Running and Ready: The process is either running (it is the current process in the system) or it is ready to run (it is waiting to be assigned to one of the system’s CPUs). Interruptable: Means the task is sleeping (waiting for an I/o or synchronization event) but can be woken up by a signal. To list all signals, use “kill –l” SIGHUP SIGINT SIGKILL SIGTRAP SIGIOT SIGBUS SIGFPE SIGKILL SIGUSR1 SIGSEGV SIGUSR2 SIGPIPE SIGALRM SIGTERM SIGCHLD SIGCONT SIGSTOP SIGSTP SIGTTIN SITTOUT SIGURG SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGIO SIGPWR Uninterruptable: Same as TASK_INTERRUPTABLE, except it cannot be woken up by signals or timer Stopped: Task was stopped, usually by a SIGSTOP signal such as when performing debugging Zombie: Task has terminated but has not had its status collected (wait()-ed for) by the parent.