Wednesday, September 14, Chapter 3: Processes

Size: px
Start display at page:

Download "Wednesday, September 14, Chapter 3: Processes"

Transcription

1 Chapter 3: Processes

2 Themes (so far) Computers solve problems Automate computation, scientific models OS evolved to solve problems Common I/O, shared HW, multitasking, protection Implementations vary, but concepts persist

3 Process Program in execution Instance of a running program Entity scheduled for CPU time Combination of code, state, and resources

4

5

6

7

8

9 How is this represented?

10 Process creation New batch job Interactive logon Provide OS service Spawning

11 Process termination Normal completion Time limit exceeded Memory unavailable Bounds violation Protection error Arithmetic error Time overrun I/O failure Invalid instruction Privileged instruction Data misuse Intervention Parent termination Parent request

12 New Admit Ready Dispatch Running Release Exit Timeout Event Occurs Event Wait Blocked Figure 3.6 Five-State Process Model

13 0xffffffff 0xc kernel 0xffffffff 0xc kernel 0xffffffff 0xc kernel code+data code+data code+data 0x x x

14 0xffffffff 0xc kernel 0xffffffff 0xc kernel 0xffffffff 0xc kernel code+data code+data code+data 0x x x ready kernel blocked

15 0xffffffff 0xc kernel 0xffffffff 0xc kernel 0xffffffff 0xc kernel code+data code+data code+data 0x x x ready kernel blocked

16 0xffffffff 0xc kernel 0xffffffff 0xc kernel 0xffffffff 0xc kernel code+data code+data code+data 0x x x ready kernel blocked

17 Process A Process B Process C Dispatcher = Running = Ready = Blocked Figure 3.7 Process States for Trace of Figure 3.4

18

19

20 ready ready blocked new blocked ready

21 ready ready new blocked blocked ready

22 ready ready ready blocked blocked ready

23 ready ready ready blocked suspended ready

24 Suspended process Not immediately available for execution May or may not be waiting Suspended by an agent Agent must explicitly un-suspend

25

26

27

28 Process representation Code Data Associated resources

29

30

31 Code: (program.c) #include <stdio.h> #include <fcntl.h> int main() { int f; size_t s; char c[10]; f = open("program.c",o_rdonly); printf ("f = %d\n",f); } s = read(f, c, 9); c[9] = '\0'; printf("c is '%s'\n",c); close(f); return 0;

32 Code: (program.c) #include <stdio.h> #include <fcntl.h> Output: f = 3 c is #include int main() { int f; size_t s; char c[10]; f = open("program.c",o_rdonly); printf ("f = %d\n",f); } s = read(f, c, 9); c[9] = '\0'; printf("c is '%s'\n",c); close(f); return 0;

33 Code: (program.c) #include <stdio.h> #include <fcntl.h> int main() { int f; size_t s; char c[10]; f = open("program.c",o_rdonly); printf ("f = %d\n",f); Output: f = 3 c is #include 0 = stdin 1 = stdout 2 = stderr } s = read(f, c, 9); c[9] = '\0'; printf("c is '%s'\n",c); close(f); return 0;

34 Process location

35 Process location 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

36 Process location code + data + 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

37 Process location attributes () code + data + 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

38 Process location Memory Storage 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

39 Process location Memory Storage 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

40 Process location Memory Storage 0xffffffff kernel 0xc user V grows downward grows upward ^ user heap uninitialized data segment (BSS) initialized data segment code segment 0x

41 Process attributes Process identification PID, PPID, UID Processor state information User-visible registers, control/status registers (PC, etc.), pointers Process control information Scheduling (state, priority, events), pointers to other, IPC, privileges, memory mgmt., resources

42

43

44 proc int

45 int hdlr proc int

46 int hdlr kernel proc int irt

47 int hdlr kernel proc proc int irt int

48 int hdlr kernel int hdlr proc proc int irt int int

49

50 Process creation 1. Assign unique PID 2. Allocate space 3. Initialize 4. Set linkages 5. Create/expand data structures

51 Process switching When? Interrupt, trap, supervisor (system) call How? Mode switch vs. context switch

52 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

53 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

54 kernel code INT ==> Mode switch kernel code gen reg CPU ctl reg vm reg pc code+data code+data

55 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

56 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

57 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

58 kernel kernel code code gen reg CPU ctl reg vm reg pc code+data code+data

59 kernel code Control registers PC Kernel pointer User pointer PSW (x86 EFLAGS) CR0, CR1, CR2, CR3 (for VM) kernel code gen reg CPU ctl reg vm reg pc code+data code+data

60 Context switch 1. Save CPU context 2. Update of running process 3. Move to queue 4. Select next process 5. Update of new process 6. Update memory management 7. Restore context of selected process

61

Process Description and Control. Chapter 3

Process Description and Control. Chapter 3 Process Description and Control Chapter 3 Major Requirements of an Operating System Interleave the execution of many processes to maximize processor utilization while providing reasonable response time

More information

Process Description and Control. Major Requirements of an Operating System

Process Description and Control. Major Requirements of an Operating System Process Description and Control Chapter 3 1 Major Requirements of an Operating System Interleave the execution of several processes to maximize processor utilization while providing reasonable response

More information

Major Requirements of an Operating System Process Description and Control

Major Requirements of an Operating System Process Description and Control Major Requirements of an Operating System Process Description and Control Chapter 3 Interleave the execution of several processes to maximize processor utilization while providing reasonable response time

More information

Process Description and Control

Process Description and Control Process Description and Control Chapter 3 Muhammad Adri, MT 1 Major Requirements of an Operating System Interleave the execution of several processes to maximize processor utilization while providing reasonable

More information

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated? Processes Process Management Chapter 3 1 A process is a program in a state of execution (created but not terminated) Program is a passive entity one on your disk (survivor.class, kelly.out, ) Process is

More information

Process Description and Control. Chapter 3

Process Description and Control. Chapter 3 Process Description and Control Chapter 3 Contents Process states Process description Process control Unix process management Process From processor s point of view execute instruction dictated by program

More information

Dr. D. M. Akbar Hussain DE5 Department of Electronic Systems

Dr. D. M. Akbar Hussain DE5 Department of Electronic Systems Process /Task 1 Process Management Creation & termination of processes (user + System) Interleaving the execution of processes Scheduling of processes Synchronization mechanism between processes Communication

More information

Process Description and Control

Process Description and Control Process Description and Control B.Ramamurthy 1/28/02 B.Ramamurthy 1 Introduction The fundamental task of any operating system is process management. OS must allocate resources to processes, enable sharing

More information

IT 540 Operating Systems ECE519 Advanced Operating Systems

IT 540 Operating Systems ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (3 rd Week) (Advanced) Operating Systems 3. Process Description and Control 3. Outline What Is a Process? Process

More information

Major Requirements of an OS

Major Requirements of an OS Process CSCE 351: Operating System Kernels Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization while providing reasonable response time Allocate

More information

Operating Systems. Lecture 3- Process Description and Control. Masood Niazi Torshiz

Operating Systems. Lecture 3- Process Description and Control. Masood Niazi Torshiz Operating Systems Lecture 3- Process Description and Control Masood Niazi Torshiz www.mniazi.ir 1 Requirements of an Operating System Interleave the execution of multiple processes to maximize processor

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 Processes Dmitri Loguinov Texas A&M University January 24, 2019 1 Chapter 3: Roadmap 3.1 What is a process? 3.2 Process states 3.3 Process description

More information

Operating System Control Structures

Operating System Control Structures Operating System Control Structures Information about the current status of each process and resource Tables are constructed for each entity the operating system manages 26 Memory Tables Allocation of

More information

Today s class. Finish review of C Process description and control. Informationsteknologi. Tuesday, September 18, 2007

Today s class. Finish review of C Process description and control. Informationsteknologi. Tuesday, September 18, 2007 Today s class Finish review of C Process description and control Computer Systems/Operating Systems - Class 6 1 Finish review of C Review in class exercise 3 #1: game cptr is 5004 #2: The value of c is

More information

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D) MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications

More information

Process Description and Control. Chapter 3

Process Description and Control. Chapter 3 Process Description and Control 1 Chapter 3 2 Processes Working definition: An instance of a program Processes are among the most important abstractions in an OS all the running software on a computer,

More information

Lecture 4: Process Management

Lecture 4: Process Management Lecture 4: Process Management (Chapters 2-3) Process: execution context of running program. A process does not equal a program! Process is an instance of a program Many copies of same program can be running

More information

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering Operating System Chapter 3. Process Lynn Choi School of Electrical Engineering Process Def: A process is an instance of a program in execution. One of the most profound ideas in computer science. Not the

More information

Processes. CS3026 Operating Systems Lecture 05

Processes. CS3026 Operating Systems Lecture 05 Processes CS3026 Operating Systems Lecture 05 Dispatcher Admit Ready Queue Dispatch Processor Release Timeout or Yield Event Occurs Blocked Queue Event Wait Implementation: Using one Ready and one Blocked

More information

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems OS Structure Processes COMP755 Advanced Operating Systems An OS has many parts. The Kernel is the core of the OS. It controls the execution of the system. Many OS features run outside of the kernel, such

More information

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process

More information

Chapter 3 Process Description and Control

Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The concept of process

More information

Announcement. Exercise #2 will be out today. Due date is next Monday

Announcement. Exercise #2 will be out today. Due date is next Monday Announcement Exercise #2 will be out today Due date is next Monday Major OS Developments 2 Evolution of Operating Systems Generations include: Serial Processing Simple Batch Systems Multiprogrammed Batch

More information

Process Description and Control

Process Description and Control Process Description and Control 1 summary basic concepts process control block process trace process dispatching process states process description process control 2 Process A program in execution (running)

More information

OPERATING SYSTEM. The Process. Introduction Process creation & termination Process state diagram Process scheduling & its criteria

OPERATING SYSTEM. The Process. Introduction Process creation & termination Process state diagram Process scheduling & its criteria OPERATING SYSTEM The Process Introduction Process creation & termination Process state diagram Process scheduling & its criteria Process The concept of process is fundamental to the structure of operating

More information

Processes, PCB, Context Switch

Processes, PCB, Context Switch THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering EIE 272 CAOS Operating Systems Part II Processes, PCB, Context Switch Instructor Dr. M. Sakalli enmsaka@eie.polyu.edu.hk

More information

Sistemi in Tempo Reale

Sistemi in Tempo Reale Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It

More information

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - III Processes. Louisiana State University. Processes. September 1 st, 2009

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - III Processes. Louisiana State University. Processes. September 1 st, 2009 CSC 4103 - Operating Systems Fall 2009 Lecture - III Processes Tevfik Ko!ar Louisiana State University September 1 st, 2009 1 Roadmap Processes Basic Concepts Process Creation Process Termination Context

More information

Process. Discussion session 3 1/30/2016

Process. Discussion session 3 1/30/2016 Process Discussion session 3 1/30/2016 A program in execution What is the process? An instance of a program running on a computer The entity can be assigned to and executed on a processor A unit of activity

More information

CSCE 313: Intro to Computer Systems

CSCE 313: Intro to Computer Systems CSCE 313 Introduction to Computer Systems Instructor: Dr. Guofei Gu http://courses.cse.tamu.edu/guofei/csce313/ Programs, Processes, and Threads Programs and Processes Threads 1 Programs, Processes, and

More information

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song CSCE 313 Introduction to Computer Systems Instructor: Dezhen Song Programs, Processes, and Threads Programs and Processes Threads Programs, Processes, and Threads Programs and Processes Threads Processes

More information

! The Process Control Block (PCB) " is included in the context,

! The Process Control Block (PCB)  is included in the context, CSE 421/521 - Operating Systems Fall 2012 Lecture - III Processes Tevfik Koşar Roadmap Processes Basic Concepts Process Creation Process Termination Context Switching Process Queues Process Scheduling

More information

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017 CS 471 Operating Systems Yue Cheng George Mason University Fall 2017 Outline o Process concept o Process creation o Process states and scheduling o Preemption and context switch o Inter-process communication

More information

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch-3 Process Description and Control

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch-3 Process Description and Control Introduction :- The design of an operating system (OS) reflects certain general requirements. All multiprogramming operating systems, from single-user systems such as Windows 98 to mainframe systems such

More information

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 Processes in Unix, Linux, and Windows Unix pre-empted

More information

Concurrent programming: Introduction II. Anna Lina Ruscelli Scuola Superiore Sant Anna

Concurrent programming: Introduction II. Anna Lina Ruscelli Scuola Superiore Sant Anna Concurrent programming: Introduction II Anna Lina Ruscelli Scuola Superiore Sant Anna Outline Concepts of Process Thread Mode switch Process switch Introduction to competition and collaboration 2 Computer

More information

Introduction to Processes in Computer Systems SEEM

Introduction to Processes in Computer Systems SEEM Introduction to Processes in Computer Systems SEEM 3460 1 Overview of Processes What is the concept of a process A program in execution The animated spirit of a program The entity that can be assigned

More information

Process! Process Creation / Termination! Process Transitions in" the Two-State Process Model! A Two-State Process Model!

Process! Process Creation / Termination! Process Transitions in the Two-State Process Model! A Two-State Process Model! Process! Process Creation / Termination!!! A process (sometimes called a task, or a job) is a program in execution"!! Process is not the same as program "!! We distinguish between a passive program stored

More information

Part V. Process Management. Sadeghi, Cubaleska RUB Course Operating System Security Memory Management and Protection

Part V. Process Management. Sadeghi, Cubaleska RUB Course Operating System Security Memory Management and Protection Part V Process Management Sadeghi, Cubaleska RUB 2008-09 Course Operating System Security Memory Management and Protection Roadmap of Chapter 5 Notion of Process and Thread Data Structures Used to Manage

More information

Process Scheduling Queues

Process Scheduling Queues Process Control Process Scheduling Queues Job queue set of all processes in the system. Ready queue set of all processes residing in main memory, ready and waiting to execute. Device queues set of processes

More information

Computer Systems II. First Two Major Computer System Evolution Steps

Computer Systems II. First Two Major Computer System Evolution Steps Computer Systems II Introduction to Processes 1 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent processes) 2 1 At First (1945 1955) In the beginning,

More information

Processes. Dr. Yingwu Zhu

Processes. Dr. Yingwu Zhu Processes Dr. Yingwu Zhu Process Growing Memory Stack expands automatically Data area (heap) can grow via a system call that requests more memory - malloc() in c/c++ Entering the kernel (mode) Hardware

More information

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100 GATE- 2016-17 Postal Correspondence 1 Operating Systems Computer Science & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It

More information

Operating Systems. Lecture 05

Operating Systems. Lecture 05 Operating Systems Lecture 05 http://web.uettaxila.edu.pk/cms/sp2013/seosbs/ February 25, 2013 Process Scheduling, System Calls Execution (Fork,Wait,Exit,Exec), Inter- Process Communication Schedulers Long

More information

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5)

Announcements. Reading. Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) CMSC 412 S14 (lect 5) Announcements Reading Project #1 due in 1 week at 5:00 pm Scheduling Chapter 6 (6 th ed) or Chapter 5 (8 th ed) 1 Relationship between Kernel mod and User Mode User Process Kernel System Calls User Process

More information

Processes and More. CSCI 315 Operating Systems Design Department of Computer Science

Processes and More. CSCI 315 Operating Systems Design Department of Computer Science Processes and More CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating Systems Concepts,

More information

Processes COMPSCI 386

Processes COMPSCI 386 Processes COMPSCI 386 Elements of a Process A process is a program in execution. Distinct processes may be created from the same program, but they are separate execution sequences. call stack heap STACK

More information

REVIEW OF COMMONLY USED DATA STRUCTURES IN OS

REVIEW OF COMMONLY USED DATA STRUCTURES IN OS REVIEW OF COMMONLY USED DATA STRUCTURES IN OS NEEDS FOR EFFICIENT DATA STRUCTURE Storage complexity & Computation complexity matter Consider the problem of scheduling tasks according to their priority

More information

Processes in linux. What s s a process? process? A dynamically executing instance of a program. David Morgan. David Morgan

Processes in linux. What s s a process? process? A dynamically executing instance of a program. David Morgan. David Morgan Processes in linux David Morgan What s s a process? process? A dynamically executing instance of a program 1 Constituents of a process its code data various attributes OS needs to manage it OS keeps track

More information

Killing Zombies, Working, Sleeping, and Spawning Children

Killing Zombies, Working, Sleeping, and Spawning Children Killing Zombies, Working, Sleeping, and Spawning Children CS 333 Prof. Karavanic (c) 2015 Karen L. Karavanic 1 The Process Model The OS loads program code and starts each job. Then it cleans up afterwards,

More information

Chap 4, 5: Process. Dongkun Shin, SKKU

Chap 4, 5: Process. Dongkun Shin, SKKU Chap 4, 5: Process 1 Process Concept Job A bundle of program and data to be executed An entity before submission for execution Process (= running program) An entity that is registered to kernel for execution

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency

More information

CS 322 Operating Systems Practice Midterm Questions

CS 322 Operating Systems Practice Midterm Questions ! CS 322 Operating Systems 1. Processes go through the following states in their lifetime. time slice ends Consider the following events and answer the questions that follow. Assume there are 5 processes,

More information

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo PROCESS MANAGEMENT Operating Systems 2015 Spring by Euiseong Seo Today s Topics Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication

More information

csci3411: Operating Systems

csci3411: Operating Systems csci3411: Operating Systems Lecture 3: System structure and Processes Gabriel Parmer Some slide material from Silberschatz and West System Structure System Structure How different parts of software 1)

More information

UNIT 3. PROCESS MANAGEMENT

UNIT 3. PROCESS MANAGEMENT This document can be downloaded from www.chetanahegde.in with most recent updates. 1 UNIT 3. PROCESS MANAGEMENT 3.1 PROCESS A process can be defined in several ways: A program in execution An instance

More information

CS 355 Operating Systems. Keeping Track of Processes. When are processes created? Process States 1/26/18. Processes, Unix Processes and System Calls

CS 355 Operating Systems. Keeping Track of Processes. When are processes created? Process States 1/26/18. Processes, Unix Processes and System Calls CS 355 Operating Systems Processes, Unix Processes and System Calls Process User types command like run foo at keyboard I/O device driver for keyboard and screen Command is parsed by command shell Executable

More information

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476 CSE 451: Operating Systems Winter 2015 Module 4 Processes Mark Zbikowski mzbik@cs.washington.edu Allen Center 476 2013 Gribble, Lazowska, Levy, Zahorjan Process management This module begins a series of

More information

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu OS Internals User space shell ls trap shell ps Kernel space File System Management I/O

More information

A process. the stack

A process. the stack A process Processes Johan Montelius What is a process?... a computation KTH 2017 a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other processes

More information

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized) Process management CSE 451: Operating Systems Spring 2012 Module 4 Processes Ed Lazowska lazowska@cs.washington.edu Allen Center 570 This module begins a series of topics on processes, threads, and synchronization

More information

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter Lecture Topics Today: Operating System Overview (Stallings, chapter 2.1-2.4, 2.8-2.10) Next: Processes (Stallings, chapter 3.1-3.6) 1 Announcements Consulting hours posted Self-Study Exercise #3 posted

More information

Most of the work is done in the context of the process rather than handled separately by the kernel

Most of the work is done in the context of the process rather than handled separately by the kernel Process Control Process Abstraction for a running program Manages program s use of memory, cpu time, and i/o resources Most of the work is done in the context of the process rather than handled separately

More information

CSC 539: Operating Systems Structure and Design. Spring 2006

CSC 539: Operating Systems Structure and Design. Spring 2006 CSC 539: Operating Systems Structure and Design Spring 2006 Processes and threads process concept process scheduling: state, PCB, process queues, schedulers process operations: create, terminate, wait,

More information

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7 THE PROCESS ABSTRACTION CS124 Operating Systems Winter 2015-2016, Lecture 7 2 The Process Abstraction Most modern OSes include the notion of a process Term is short for a sequential process Frequently

More information

CS510 Operating System Foundations. Jonathan Walpole

CS510 Operating System Foundations. Jonathan Walpole CS510 Operating System Foundations Jonathan Walpole The Process Concept 2 The Process Concept Process a program in execution Program - description of how to perform an activity instructions and static

More information

OPERATING SYSTEM SUPPORT (Part 1)

OPERATING SYSTEM SUPPORT (Part 1) Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture OPERATING SYSTEM SUPPORT (Part 1) Introduction The operating system (OS) is the software

More information

Processes and Threads

Processes and Threads OPERATING SYSTEMS CS3502 Spring 2018 Processes and Threads (Chapter 2) Processes Two important types of dynamic entities in a computer system are processes and threads. Dynamic entities only exist at execution

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

CS 111. Operating Systems Peter Reiher

CS 111. Operating Systems Peter Reiher Operating System Principles: Processes, Execution, and State Operating Systems Peter Reiher Page 1 Outline What are processes? How does an operating system handle processes? How do we manage the state

More information

Operating Systemss and Multicore Programming (1DT089)

Operating Systemss and Multicore Programming (1DT089) Operating Systemss and Multicore Programming (1DT089) The Process Concept and Inter Processs Communication (Chapter 3) Tuesday january 28 Uppsala University 2014 karl.marklund@it.uu.se 1.5.1) Dual-Mode

More information

3.1 Introduction. Computers perform operations concurrently

3.1 Introduction. Computers perform operations concurrently PROCESS CONCEPTS 1 3.1 Introduction Computers perform operations concurrently For example, compiling a program, sending a file to a printer, rendering a Web page, playing music and receiving e-mail Processes

More information

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Midterm Exam October 23, 2012, Duration: 80 Minutes (10 pages, 12 questions, 100 Marks) Instructor: Dr. Kamran Sartipi Question 1 (Computer Systgem)

More information

Processes. Johan Montelius KTH

Processes. Johan Montelius KTH Processes Johan Montelius KTH 2017 1 / 47 A process What is a process?... a computation a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other

More information

Process Description and Control

Process Description and Control Process Description and Control 1 Process:the concept Process = a program in execution Example processes: OS kernel OS shell Program executing after compilation www-browser Process management by OS : Allocate

More information

csci3411: Operating Systems

csci3411: Operating Systems csci3411: Operating Systems Lecture 3: System structure and Processes Gabriel Parmer Some slide material from Silberschatz and West System Structure System Structure How different parts of software 1)

More information

Processes and Threads. Processes and Threads. Processes (2) Processes (1)

Processes and Threads. Processes and Threads. Processes (2) Processes (1) Processes and Threads (Topic 2-1) 2 홍성수 Processes and Threads Question: What is a process and why is it useful? Why? With many things happening at once in a system, need some way of separating them all

More information

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation Virtual Memory Topics (Chapter 9) Motivations for VM Address translation 1 Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Address space of a process can exceed physical memory

More information

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware es CS 217 Operating System Supports virtual machines Promises each process the illusion of having whole machine to itself Provides services: Protection Scheduling Memory management File systems Synchronization

More information

CS153: Process. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian

CS153: Process. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 1 CS153: Process Chengyu Song Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 2 Administrivia Lab New TA Bojian Du Group info in process, will help the rest form groups Ask questions,

More information

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve? What is an Operating System? A Whirlwind Tour of Operating Systems Trusted software interposed between the hardware and application/utilities to improve efficiency and usability Most computing systems

More information

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534 CSE 410: Computer Systems Spring 2018 Processes John Zahorjan zahorjan@cs.washington.edu Allen Center 534 1. What is a process? Processes 2. What's the process namespace? 3. How are processes represented

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

CSE 153 Design of Operating Systems Fall 2018

CSE 153 Design of Operating Systems Fall 2018 CSE 153 Design of Operating Systems Fall 2018 Lecture 4: Processes (2) Threads Process Creation: Unix In Unix, processes are created using fork() int fork() fork() Creates and initializes a new PCB Creates

More information

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Clicker Question #1 Program == Process (A) True (B) False Answer on Next Slide The Big Picture So Far Hardware abstraction

More information

Following are a few basic questions that cover the essentials of OS:

Following are a few basic questions that cover the essentials of OS: Operating Systems Following are a few basic questions that cover the essentials of OS: 1. Explain the concept of Reentrancy. It is a useful, memory-saving technique for multiprogrammed timesharing systems.

More information

System Call. Preview. System Call. System Call. System Call 9/7/2018

System Call. Preview. System Call. System Call. System Call 9/7/2018 Preview Operating System Structure Monolithic Layered System Microkernel Virtual Machine Process Management Process Models Process Creation Process Termination Process State Process Implementation Operating

More information

OS 1 st Exam Name Solution St # (Q1) (19 points) True/False. Circle the appropriate choice (there are no trick questions).

OS 1 st Exam Name Solution St # (Q1) (19 points) True/False. Circle the appropriate choice (there are no trick questions). OS 1 st Exam Name Solution St # (Q1) (19 points) True/False. Circle the appropriate choice (there are no trick questions). (a) (b) (c) (d) (e) (f) (g) (h) (i) T_ The two primary purposes of an operating

More information

UNIT -3 PROCESS AND OPERATING SYSTEMS 2marks 1. Define Process? Process is a computational unit that processes on a CPU under the control of a scheduling kernel of an OS. It has a process structure, called

More information

Operating System. Chapter 4. Threads. Lynn Choi School of Electrical Engineering

Operating System. Chapter 4. Threads. Lynn Choi School of Electrical Engineering Operating System Chapter 4. Threads Lynn Choi School of Electrical Engineering Process Characteristics Resource ownership Includes a virtual address space (process image) Ownership of resources including

More information

SMD149 - Operating Systems

SMD149 - Operating Systems SMD149 - Operating Systems Roland Parviainen November 3, 2005 1 / 45 Outline Overview 2 / 45 Process (tasks) are necessary for concurrency Instance of a program in execution Next invocation of the program

More information

Chapter 3 Process Description and Control

Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Process Control Block Structure of Process Images in Virtual Memory How

More information

The Big Picture So Far. Chapter 4: Processes

The Big Picture So Far. Chapter 4: Processes The Big Picture So Far HW Abstraction Processor Memory IO devices File system Distributed systems Example OS Services Process management, protection, synchronization Memory Protection, management, VM Interrupt

More information

Process Concept. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.

Process Concept. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University. Process Concept Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered Process Concept Definition, states, PCB Process Scheduling Scheduling queues,

More information

OS Main Goals. 10/24/2013 Operating Systems, Beykent University 1

OS Main Goals. 10/24/2013 Operating Systems, Beykent University 1 OS Main Goals Interleave the execution of the number of processes to maximize processor utilization Provide reasonable response time Allocate resources to processes Support inter-process communication

More information

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University EECS3221.3 Operating System Fundamentals No.2 Process Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University How OS manages CPU usage? How CPU is used? Users use CPU to run

More information

Process Concepts 8/21/2014. CS341: Operating System. Scheduling: Theoretical Analysis

Process Concepts 8/21/2014. CS341: Operating System. Scheduling: Theoretical Analysis CS341: Operating System Process Concepts Process States, PCB System call related to Process & C examples IPC & Thread in Future class Scheduling: Theoretical Analysis Lect10 : 21 th Aug 2014 Dr. A. Sahu

More information

Inf2C - Computer Systems Lecture 16 Exceptions and Processor Management

Inf2C - Computer Systems Lecture 16 Exceptions and Processor Management Inf2C - Computer Systems Lecture 16 Exceptions and Processor Management Boris Grot School of Informatics University of Edinburgh Class party! When: Friday, Dec 1 @ 8pm Where: Bar 50 on Cowgate Inf2C Computer

More information

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No.

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No. EECS3221.3 Operating System Fundamentals No.2 Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University How OS manages CPU usage? How CPU is used? Users use CPU to run programs

More information