CGS 3763 Operating Systems Concepts Spring 2013

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

Adapted from slides ©2005 Silberschatz, Galvin, and Gagne Lecture 4: Processes.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives Understand Process concept Process scheduling Creating.
Chapter 3: Processes.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
CMPT 300: Operating Systems I Ch 3: Processes Dr. Mohamed Hefeeda
Chapter 3: Processes. Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Process Concept Process – a program.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-1: Process Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Outline n Process Concept n Process.
Chapter 3: Processes. 3.2CSCI 380 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
8-Sep Operating Systems Yasir Kiani. 8-Sep Agenda for Today Review of previous lecture Process scheduling concepts Process creation and termination.
CS212: OPERATING SYSTEM Lecture 2: Process 1. Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Linux Processes Travis Willey Jeff Mihalik. What is a process? A process is a program in execution A process includes: –program counter –stack –data section.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 3 Operating Systems.
Lecture 4: Processes & Threads. Lecture 4 / Page 2AE4B33OSS Silberschatz, Galvin and Gagne ©2005 Contents The concept of Process Process states and life-cycle.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Process by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
XE33OSA Chapter 3: Processes. 3.2XE33OSASilberschatz, Galvin and Gagne ©2005 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
Chapter 3: Processes.
Lecture 3 Process.
Chapter 3: Processes.
Chapter 3: Process Concept
Topic 3 (Textbook - Chapter 3) Processes
Process Management Presented By Aditya Gupta Assistant Professor
Chapter 4: Processes Process Concept Process Scheduling
Processes Overview: Process Concept Process Scheduling
Chapter 3: Process Concept
Chapter 3: Processes.
Example questions… Can a shell kill itself? Can a shell within a shell kill the parent shell? What happens to background processes when you exit from.
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 3: Processes.
Applied Operating System Concepts
Chapter 3: Processes.
Chapter 3 Process Management.
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 4: Processes Process Concept Process Scheduling
Lecture 2: Processes Part 1
Chapter 3: Processes.
CGS 3763 Operating Systems Concepts Spring 2013
Operating Systems Lecture 6.
Chapter 3: Processes.
Chapter 3: Processes.
Process & its States Lecture 5.
Chapter 3: Processes.
Process Creation Process Termination
Chapter 3: Processes.
Chapter 3: Processes.
Chapter 3: Processes.
Chapter 3: Processes.
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
EECE.4810/EECE.5730 Operating Systems
Chapter 3: Process Concept
EECE.4810/EECE.5730 Operating Systems
Processes August 10, 2019 OS:Processes.
Presentation transcript:

CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM

11/28/2018

Lecture 12 – Monday, February 4, 2013 Last time: Answers to student questions Today: Creation and termination of processes Inter-process communication Message passing Sockets Next time Client-server systems Remote procedure call Reading assignments Chapters 3 and 4 of the textbook Chapters 3 and 4 textbook slides 11/28/2018

Process Creation A parent process create children processes, which, in turn create other processes, forming a tree of processes A process is identified by a process identifier (pid) Possible resource sharing strategies between parent and children Parent and children share all resources Children share subset of parent’s resources Parent and child share no resources Execution Parent and children execute concurrently Parent waits until children terminate

Process Creation (Cont’d) Address space Child duplicate of parent Child has a program loaded into it UNIX examples fork system call creates new process exec system call used after a fork to load in the address space of the child process a new program

Process Creation – the parent waits until the child process terminates

Pid – the process ID In UNIX-like operating systems The current process ID is provided by a getpid() system call. The process ID of a parent process can be obtained with the getppid() system call. In Windows one can get the ID of the current process using GetCurrentProcessId()  the ID of other processes using  GetProcessId() 11/28/2018

C Program Forking Separate Process int main() { pid_t pid; /* fork another process */ pid = fork(); if (pid < 0) { /* error occurred */ fprintf(stderr, "Fork Failed"); exit(-1); } else if (pid == 0) { /* child process */ execlp("/bin/ls", "ls", NULL); else { /* parent process */ /* parent will wait for the child to complete */ wait (NULL); printf ("Child Complete"); exit(0);

System processes swapper or sched has PID=0 and is responsible for paging, and is a kernel process (daemon) init – in Unix-based computer systems, init (short for initialization) is a daemon, the direct/indirect ancestor of all other processes. Init is the first process started during booting, and is typically assigned PID =1. inetd (internet service daemon) is a daemon on Unix systems that manages Internet services. It  listens on designated ports used by Internet services such as FTP, POP3, and telnet. When a TCP packet or an UDP packet arrives with a particular destination port number, inetd launches the appropriate server program to handle the connection e.g., telnetd. Telnetd – Telnet daemon process handling communication using the Telnet protocol 11/28/2018

OS shells Operating system shell  a software that presents a user interface to various OS functions (e.g., process and file management) and services. C shell (csh) is a Unix shell   a command processor typically run in a text window, allowing the user to type commands. The C shell can also read commands from a file, called a script. On Mac OS X and Red Hat Linux, csh is actually tcsh, an improved version of csh. On Debian, Ubuntu, and their derivatives, there are two different packages: csh and tcsh. 11/28/2018

A tree of processes on a typical Solaris

Process Termination Process executes last statement and asks the operating system to delete it (exit) Output data from child to parent (via wait) Process’ resources are deallocated by operating system Parent may terminate execution of children processes (abort) Child has exceeded allocated resources Task assigned to child is no longer required If parent is exiting Some operating system do not allow child to continue if its parent terminates All children terminated - cascading termination

Interprocess communication Processes within a system may be independent cooperating A process can affect or be affected by other processes, including sharing data Reasons for cooperating processes: Information sharing Computation speedup Modularity Convenience IPC - interprocess communication. Two models: Shared memory Message passing

Communications models Message passing Shared memory

Asynchronicity Asynchronous events occur independently of the main program flow. Asynchronous actions  executed in a non-blocking scheme, allowing the main program flow to continue processing. Asynchronous I/O   input/output processing that permits a processing to continue before the I/O operations has finished. Asynchronous processes do not share a clock Asynchronous communication  the sender does not wait to receive an acknowledgment from the receiver. 11/28/2018