Introduction to Process in Computing Systems SEEM

Similar documents
Introduction to Processes in Computer Systems SEEM

Operating Systems, Unix Files and Commands SEEM

Process Description and Control

Process Description and Control. Chapter 3

IT 540 Operating Systems ECE519 Advanced Operating Systems

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

Binghamton University. CS-220 Spring Sharing Resources. Computer Systems Chapter 8.2, 8.4

Process Description and Control. Chapter 3

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

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

Process Description and Control. Major Requirements of an Operating System

Major Requirements of an Operating System Process Description and Control

Major Requirements of an OS

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

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

Process Description and Control

Chapter 3 Process Description and Control

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

Chapter 8. Operating System Support. Yonsei University

Process Description and Control

Processes. Sanzheng Qiao. December, Department of Computing and Software

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

Process Description and Control

Sistemi in Tempo Reale

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

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

CSC 539: Operating Systems Structure and Design. Spring 2006

Lecture Topics. Announcements. Today: Uniprocessor Scheduling (Stallings, chapter ) Next: Advanced Scheduling (Stallings, chapter

Module 1. Introduction:

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

Process. Discussion session 3 1/30/2016

Process Description and Control. Chapter 3

Today: Computer System Overview (Stallings, chapter ) Next: Operating System Overview (Stallings, chapter ,

Linux System Administration

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

آنستیتیوت تکنالوجی معلوماتی و مخابراتی ICTI

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

PROCESS DESCRIPTION AND CONTROL

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Threads Chapter 5 1 Chapter 5

Operating Systems. Lecture 05

CSCE Introduction to Computer Systems Spring 2019

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Operating System Support

Chap 4, 5: Process. Dongkun Shin, SKKU

The functionality. Managing more than Operating

Chapter 3 Process Description and Control

Processes, PCB, Context Switch

Announcements. Program #1. Program #0. Reading. Is due at 9:00 AM on Thursday. Re-grade requests are due by Monday at 11:59:59 PM.

CSE 153 Design of Operating Systems

CS2506 Quick Revision

Misc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs

Chapter 4 File Systems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

CS162 - Operating Systems and Systems Programming. Address Translation => Paging"

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

Mon Sep 17, 2007 Lecture 3: Process Management

Comp 310 Computer Systems and Organization

3.1 Introduction. Computers perform operations concurrently

Operating System Control Structures

Module 11: I/O Systems

Chapter 5. File and Memory Management

Processes. CS3026 Operating Systems Lecture 05

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

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

Operating System Support

csci3411: Operating Systems

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

1 PROCESSES PROCESS CONCEPT The Process Process State Process Control Block 5

Process Management Rab Nawaz Jadoon

CSC 453 Operating Systems

CSI3131 Final Exam Review

File Management. Chapter 12

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Virtual or Logical. Logical Addr. MMU (Memory Mgt. Unit) Physical. Addr. 1. (50 ns access)

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

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

Learning Outcomes. Processes and Threads. Major Requirements of an Operating System. Processes and Threads

Operating Systems and Computer Networks. Memory Management. Dr.-Ing. Pascal A. Klein

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

OPERATING SYSTEM SUPPORT (Part 1)

Lecture 12 2/19/04 13:43. Lecture 12. Operating Systems (S&G, 6.4) 2/19/04 CS Lecture Read S&G ch. 7, 7.1

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

CS Lecture 2! Processes! George Mason University! Fall 2010!

Announcements. Program #1. Reading. Due 2/15 at 5:00 pm. Finish scheduling Process Synchronization: Chapter 6 (8 th Ed) or Chapter 7 (6 th Ed)

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

Roadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - III Processes. Louisiana State University. Virtual Machines Processes

Preview. The Thread Model Motivation of Threads Benefits of Threads Implementation of Thread

SMD149 - Operating Systems

Operating Systems Process description and control

Lecture 5: Process Description and Control Multithreading Basics in Interprocess communication Introduction to multiprocessors

Unix Processes. What is a Process?

REVIEW OF COMMONLY USED DATA STRUCTURES IN OS

Preview. Memory Management

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Processes and threads

Lecture 3: Processes. CMPUT 379, Section A1, Winter 2014 January 13, 15 and 17

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

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Transcription:

Introduction to Process in Computing Systems SEEM 3460 1

Programs and Processes One way to describe the hardware of a computer system is to say that it provides a framework for executing programs and storing files. A file is a collection of data that is usually stored on disk, although some files are stored on tape. UNIX treats peripherals as special files, so that terminals, printers, and other devices are accessible in the same way as disk-based files. A program is a collection of bytes representing code and data that are stored in a file. When a program is started, it is loaded from disk into the main memory (RAM). When a program is running, it is called a process. Most processes read and write data from files. SEEM 3460 2

Processes The concept of process A program in execution The animated spirit of a program The entity that can be assigned to and executed on a processor The life of a process is bounded by its creation and termination. In a typical computer system, it may be running thousands of processes at the same time. SEEM 3460 3

Processes In order to be executed by the CPU, the code and data of a process must be located in the main memory. CPU SEEM 3460 4

Major Components of Operating Systems (OS) Process management Resource management CPU Memory Device File system SEEM 3460 5

Process Management One major operating system (OS) function is the sharing of limited resources among competing processes. Limited resources in a typical computer system include CPUs, memory, disk space, and peripherals such as printers. OS shares CPUs among processes By dividing each second of CPU time into equalsized slices (typically 1/10 second) and then allocating them to processes on the basis of a priority scheme. SEEM 3460 6

Process Management The operating system usually interleaves the execution of all processes to maximize processor utilization while providing reasonable response time. Process A Process B Process C CPU Time Slice One component in the operating system is called dispatcher which takes care of the interleaving of the execution of the processes. SEEM 3460 7

Trace of a Process (cont d) c SEEM 3460 8

Interrupts A mechanism by which other modules may interrupt the normal processing of the processor. The classes of Interrupts Timer: Generated by a timer within the processor. I/O: Generated by an I/O controller. Interrupt is an interruption of the normal sequence of execution. After interrupt is completed, the normal program execution is resumed. Interrupts are provided primarily to improve processing efficiency. I/O time is substantially slower than CPU processing Avoid CPU waiting for slow I/O devices Lecture Note 7 SEG 3460A/B Computer Processing Systems Concepts 9

SEEM 3460 10

Show Processes in Unix The Unix command ps can display the current processes in the computer. cuse93:> ps -a PID TT S TIME COMMAND 360 console S 0:00 /usr/lib/saf/ttymon 2434 pts/2 O 0:00 -tcsh 2431 pts/2 O 0:00 ps a cuse93:> ps -au display all processes display all processes with user info USER PID %CPU %MEM SZ RSS TT S START TIME COMMAND root 360 0.0 0.1 2987 1504 console S Feb 17 0:00 /usr/lib. wlam 2434 0.2 0.1 3302 2354 pts/2 O 17:34:21 0:00 -tcsh wlam 2431 0.1 0.2 3421 1456 pts/2 O 17:34:21 0:00 ps -au SEEM 3460 11

A Two-State Process Model A process model is used to describe the behavior what we want the processes to exhibit. Two-State Process Model SEEM 3460 12

A Two-State Process Model (cont d) Each process must be represented in some way so that OS can keep track of it. current state location in memory Each queue item may be: a pointer to a particular process a data block representing a process Process creation (Process Spawning): OS may create a process by itself e.g. a user logs on to the system OS may create a process on behalf of an application e.g. requests a file to be printed Application may create process e.g. a Web browser creates a process to download a file Process termination: Termination request by application, error and fault conditions. SEEM 3460 13

A Five-State Process Model The 2-state model does not consider that some processes in the queue may not be ready to execute e.g. waiting for I/O, blocked I/O operation is much slower than CPU computation SEEM 3460 14

A Five-State Process Model (cont d) Running: The process is currently being executed Ready: The process is prepared to execute when given the opportunity Blocked: The process cannot execute until some event (e.g. I/O read/write) occurs New: The process has just been created but has not yet been admitted to the pool of executable processes by the OS. Exit: The process has been released from the pool of executable processes by the OS. SEEM 3460 15

SEEM 3460 16

A Five-State Process Model (cont d) Queuing Model SEEM 3460 17

Processes and Resources SEEM 3460 18

OS Functions OS controls events within the computer system. Main functions of OS: schedules and dispatches processes for execution by the processor allocates resources to processes responds to requests by user programs for basic services. OS manages the use of system resources by processes SEEM 3460 19

Owner of Processes and Files Processes and files have an owner and may be protected against unauthorized access. UNIX supports a hierarchical directory structure. Files and processes have a location within the directory hierarchy. A process may change its own location or the location of a file. The figure below is an illustration of a tiny UNIX directory hierarchy that contains four files and a process running the sort utility. SEEM 3460 20

Sharing Resources OS shares memory among processes By dividing the main memory up into thousands of equal-sized chunks of memory and then allocating them to processes The chunks of a process are called pages and chunks of memory are called frames SEEM 3460 21

Sharing Memory - Paging SEEM 3460 22

Sharing Memory - Paging SEEM 3460 23

Sharing Memory Page Tables for Paging Operating system maintains a page table for each process contains the frame location for each page in the process memory address consist of a page number and offset within the page SEEM 3460 24

Sharing Memory Page Tables for Paging SEEM 3460 25

Sharing Resources OS shares disk space among users by dividing the disks into thousands of equal-sized blocks and then allocating them to users according to a quota system. A single file is built out of one or more blocks. SEEM 3460 26