Review. Questions F What are two functions of an OS? F What “layer” is above the OS? F What “layer” is below the OS?

Slides:



Advertisements
Similar presentations
Operating Systems COMP 4850/CISG 5550 Processes Introduction to Threads Dr. James Money.
Advertisements

CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
Operating System I Processes. F “A program in execution” F Modern computers allow several at once –“pseudoparallelism” A B C Program Counter A B C B A.
CSE 451: Operating Systems Winter 2006 Module 4 Processes Ed Lazowska Allen Center 570.
Processes CSCI 444/544 Operating Systems Fall 2008.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Operating Systems Processes (Ch 4.1). Processes “A program in execution” Modern computers allow several at once –“pseudoparallelism” A B C Program Counter.
Operating Systems Processes (Ch 3.1). Processes “A program in execution” Modern computers allow several at once –“pseudoparallelism” A B C Program Counter.
CSCE 351: Operating System Kernels
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.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
Operating Systems Processes (Ch 4.1). Processes “A program in execution” Modern computers allow several at once –“pseudoparallelism” A B C Program Counter.
CSE451 Processes Spring 2001 Gary Kimura Lecture #4 April 2, 2001.
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
Processes April 5, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Process Concept An operating system executes a variety of programs
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
Processes in Unix, Linux, and Windows CS-502 Fall Processes in Unix, Linux, and Windows CS502 Operating Systems (Slides include materials from Operating.
Operating Systems Review. Questions What are two functions of an OS? What “layer” is above the OS? What “layer” is below the OS?
COSC 3407: Operating Systems Lecture 3: Processes.
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.
Implementing Processes and Process Management Brian Bershad.
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 and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Processes: program + execution state
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
OS, , Part II Processes Department of Computer Engineering, PSUWannarat Suntiamorntut.
Mid Term review CSC345.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Computer Studies (AL) Operating System Process Management - Process.
Processes – Part I Processes – Part I. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Review on OSs Upon brief introduction of OSs,
Processes Questions answered in this lecture: What is a process? How does the dispatcher context-switch between processes? How does the OS create a new.
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,
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Cs431-cotter1 Processes and Threads Tanenbaum 2.1, 2.2 Crowley Chapters 3, 5 Stallings Chapter 3, 4 Silberschaz & Galvin 3, 4.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Direct memory access. IO Command includes: buffer address buffer length read or write dada position in disk When IO complete, DMA sends an interrupt request.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
Processes and threads.
Process Management Process Concept Why only the global variables?
Operating Systems Processes ENCE 360.
Chapter 3: Processes.
Intro to Processes CSSE 332 Operating Systems
Module 2.2 COP4600 – Operating Systems Richard Newman
Operating Systems Lecture November 2018.
More examples How many processes does this piece of code create?
Operating Systems Lecture 6.
Process & its States Lecture 5.
Mid Term review CSC345.
Chapter 3: Processes.
Lecture Topics: 11/1 General Operating System Concepts Processes
Operating Systems Processes (Ch 4.1).
Processes Hank Levy 1.
Processes and Process Management
Lecture 6: Multiprogramming and Context Switching
CSE 451: Operating Systems Winter 2003 Lecture 4 Processes
Operating Systems: A Modern Perspective, Chapter 6
Processes in Unix and Windows
CS510 Operating System Foundations
CSE 451: Operating Systems Autumn 2004 Module 4 Processes
Processes Hank Levy 1.
Operating Systems Processes (Ch 2.1).
Presentation transcript:

Review

Questions F What are two functions of an OS? F What “layer” is above the OS? F What “layer” is below the OS?

Questions F When is it appropriate for OS to “waste” resources? F How might the growth in networks influence OS design?

True or False F Unix is a “simple structure” OS F Micro Kernels are faster than other OS structures F Virtual Machines are faster than other OS structures

Operating Systems Processes (Ch 4.1)

Processes F “A program in execution” F Modern computers allow several at once –“pseudoparallelism” A B C Program Counter A B C B A CConceptual View Time

Processes F “A program in execution” “more” than a program: ls, tcsh “less” than a program: gcc blah.c (cpp, cc1, cc2, ln …) F “A sequential stream of execution in it’s own address space” main() {... } A() { … } main() {... } A() { … } Heap A main Stack

Process States F Consider: cat /etc/passwd | grep claypool WaitingRunningReady New Dispatch Interrupt I/O Wait I/O Complete Exit (Hey, you, show states in top !)

Design Technique: State Machines F Process states F Move from state to state based on events –Reactive system F Can be mechanically converted into a program F Other example: –string parsing, pre-processor

Unix Process Creation  System call: fork() –creates (nearly) identical copy of process –return value different for child/parent  System call: exec() –over-write with new process memory F (Hey, you, show demos!)

Process Scheduler catls... disk Scheduler vid F All services are processes F Small scheduler handles interrupts, stopping and starting processes

Process Control Block F Each process has a PCB –state –program counter –registers –memory management –… F OS keeps a table of PCB’s, one per process  (Hey! Simple Operating System, “ system.h ”)

Question F Usually the PCB is in OS memory only. F Assume we put the PCB into a processes address space. F What problems might this cause?

Interrupt Handling F Stores program counter (hardware) F Loads new program counter (hardware) –jump to interrupt service procedure F Save PCB information (assembly) F Set up new stack (assembly) F Set “waiting” process to “ready” (C) F Re-schedule (probably awakened process) (C) F If new process, called a context-switch

Context Switch F Pure overhead F So … fast, fast, fast –typically 1 to 1000 microseconds F Sometimes special hardware to speed up F How to decide when to switch contexts to another process is process scheduling