Operating Systems Lecture 5. Agenda for Today Review of previous lecture Browsing UNIX/Linux directory structure Useful UNIX/Linux commands Process concept.

Slides:



Advertisements
Similar presentations
Processes Management.
Advertisements

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.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives Understand Process concept Process scheduling Creating.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
CMPT 300: Operating Systems I Ch 3: Processes Dr. Mohamed Hefeeda
1/23/2008CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Process Concept An operating system executes a variety of programs
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
1/26/2007CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
CE Operating Systems Lecture 5 Processes. Overview of lecture In this lecture we will be looking at What is a process? Structure of a process Process.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication in Client-Server.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Process Concept Process – a program.
Exec Function calls Used to begin a processes execution. Accomplished by overwriting process imaged of caller with that of called. Several flavors, use.
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.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
Processes: program + execution state
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
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.
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,
11/13/20151 Processes ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
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,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
1  process  process creation/termination  context  process control block (PCB)  context switch  5-state process model  process scheduling short/medium/long.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
 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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
ITC250 Copyright 2008© ITC 1 Assessment -4- Choose the correct answer.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
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.
Chapter 3: Processes.
Chapter 3: Process Concept
Topic 3 (Textbook - Chapter 3) Processes
Operating Systems (CS 340 D)
Sujata Ray Dey Maheshtala College Computer Science Department
Lecture Topics: 11/1 Processes Process Management
Process Management Presented By Aditya Gupta Assistant Professor
Chapter 3: Process Concept
Chapter 3: Processes.
Operating Systems (CS 340 D)
Chapter 3: Processes.
Process Virtualization. Process Process is a program that has initiated its execution. A program is a passive entity; whereas a process is an active entity.
Lecture 2: Processes Part 1
Operating Systems Lecture 6.
Operating Systems Lecture 5.
Process & its States Lecture 5.
Chapter 3: Processes.
Operating System Concepts
Sujata Ray Dey Maheshtala College Computer Science Department
Chapter 3: Processes.
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Chapter 3: Processes Process Concept Process Scheduling
Chapter 3: Process Concept
Presentation transcript:

Operating Systems Lecture 5

Agenda for Today Review of previous lecture Browsing UNIX/Linux directory structure Useful UNIX/Linux commands Process concept Process scheduling concepts Process creation and termination Recap of the lecture

UNIX/Linux Directory Hierarchy

 Root directory (/)  Home/login directory (~, $HOME, $home)  Current working directory (.)  Parent of the current working directory (..)

Browsing the File Hierarchy  lsDisplay contents of a directory  cdChange directory  pwdPrint working directory  mkdirCreate directory  rmdirRemove directory  cpCopy file  mvMove file  rmRemove file

Browsing the File Hierarchy  lsDisplay contents of a directory  cdChange directory  pwdPrint working directory  mkdirCreate directory  rmdirRemove directory  cpCopy file  mvMove file  rmRemove file

Browsing the File Hierarchy  mkdir temp Create the ‘temp’ directory in your current directory mkdir ~/courses/cs604/programs Create the ‘programs’ directory in your ~/courses/cs604 directory  rmkdir ~/courses/cs604/programs Remove the ‘programs’ directory under your ~/courses/cs604 directory

Browsing the File Hierarchy  cp file1 file2 Copy ‘file1’ in your current directory to ‘file2’ in your current directory cp ~/file1 ~/memos/file2 Copy ‘~/file1’ to ‘~/memos/file2’  mv file1 file2 Move ‘file1’ in your current directory to ‘file2’ in your current directory mv ~/file1 ~/memos/file2 Move ‘~/file1’ to ‘~/memos/file2’

Browsing the File Hierarchy  rm file1 Remove ‘file1’ from your current directory rm ~/courses/cs604/programs/test.c Remove ‘test1’ in the ‘programs’ directory in your ~/courses/cs604 directory  rm *.o Remove all.o (i.e., object) files from your current directory

$ gcc program.c $../a.out [ program output ] $ gcc program.c –o assignment $ assignment [ program output ] $ gcc program.c –o assignment -lm $ assignment [ program output ] $ Compiling and Running C Programs

Useful Internet Resources UNIX Tutorial for Beginners nixindex.html

Useful Internet Resources emacs tutorial vi tutorial 09.html eBase/search_results?query=vi pico tutorial

What is a process?  Process – a program in execution; process execution must progress in sequential fashion.  A process consists of:  Code (text) section  Data section  Stack  Heap  Environment  CPU state (program counter, etc.)  Process control block (PCB)

CPU and I/O Bound Processes  I/O-bound process – spends more time doing I/O than computations, many short CPU bursts. I/O BurstCPU Burst I/O BurstCPU Burst I/OCPU Burst I/O  CPU-bound process – spends more time doing computations; few very long CPU bursts. Processes can be:

Process States As a process executes, it changes state  new: The process is being created.  ready: The process is waiting to be assigned to a processor.  running: Instructions are being executed.  waiting: The process is waiting for some event to occur.  terminated: The process has finished execution.

Process States

Process Control Block (PCB) Process information and attributes  Process state  Program counter  CPU registers  CPU scheduling information  Memory-management information  Accounting information  I/O status information  Per process file table  Process ID (PID)  Parent PID, etc.

Process Control Block (PCB)

CPU Switch From Process to Process

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 waiting for I/O devices.  Process migration between the various queues.

Queues in the OS

Queues in a Computer System

Schedulers  Long term scheduler  Short term scheduler  Medium term scheduler

Recap of Lecture Review of previous lecture Browsing UNIX/Linux directory structure Useful UNIX/Linux commands Process concept Process scheduling concepts