CSCI 4500 Operating Systems. In This Module

Size: px
Start display at page:

Download "CSCI 4500 Operating Systems. In This Module"

Transcription

1 CSCI 4500 Operating Systems Module 2 OS Concepts: Processes and File Systems 2008 Stanley A. Wileman, Jr. Operating Systems Slide 1 In This Module Operating System Concepts Introduction to Processes Files and Data Sets Name Binding, Catalogs and Directories System Calls for Processes and Tasks Sample Programs Using Processes 2008 Stanley A. Wileman, Jr. Operating Systems Slide 2 Documentation on System Calls On loki, use man name, or man 2 name where name is the system call name. You can also find many UNIX system calls described in the document at the end of the class web page. Windows system calls are described at -- look at the API index, specifically for System Services and Data Access Stanley A. Wileman, Jr. Operating Systems Slide 3 1

2 Operating System Concepts Recall that we will study operating systems from two points of view. These are the views of Application writers, using the various system calls to achieve interaction with the system and its resources. OS implementers, who must write the code for the operating system that implements the system calls. Let s consider two major system call categories, those for processes and for file systems Stanley A. Wileman, Jr. Operating Systems Slide 4 Introduction to Processes (Tasks) A process, sometimes called a task, is essentially a packaged unit of work for a computer system. In many cases when you enter a command or double click on an icon, a command interpreter process (a shell ) will create a new process to run the program. Processes will always have an address space in which they can execute, and a set of processor registers to hold data, next instruction address, and so forth Stanley A. Wileman, Jr. Operating Systems Slide 5 Processes In a multiprogramming system, multiple processes (at least one per user) are being virtually executed. But it s obvious only one process can be actually executed at a time on a single processor. Thus, the process currently being executed is occasionally freeze dried and another process is executed for a while. This is called a context switch, since the processor s context changes. When a process is not being executed, salient details (e.g. CPU register contents and file pointers) are stored away in a process table Stanley A. Wileman, Jr. Operating Systems Slide 6 2

3 Process Example: The CPU executes some instructions from process A LOAD A ADD B. STORE C. DIV X. ADD Z STORE Y Process A LOAD K DIV E MPY T STORE N CMP L JNE LOOP Process B 2008 Stanley A. Wileman, Jr. Operating Systems Slide 7 then saves process A s context and executes some instructions from process B LOAD A ADD B STORE C DIV X ADD Z STORE Y Process A LOAD K. DIV E. MPY T. STORE N CMP L JNE LOOP Process B 2008 Stanley A. Wileman, Jr. Operating Systems Slide 8 then saves process B s context, restores A s context and executes some more instructions. LOAD A ADD B STORE C DIV X ADD Z STORE Y Process A... LOAD K DIV E MPY T STORE N CMP L JNE LOOP Process B 2008 Stanley A. Wileman, Jr. Operating Systems Slide 9 3

4 System Calls for Processes Key process-related system calls include those in the following categories: create or terminate a process; cause a process to wait, if necessary, until it can use a particular resource; manage the memory used by a process; and control the handling of asynchronous signals sent to a process. We will later examine some of these system calls in detail, and use them in a program Stanley A. Wileman, Jr. Operating Systems Slide 10 Process Tables A process table has one entry for every process in the system. Each process table entry contains information about process ownership, relation to other processes, process state, and statistical information. Process tables are frequently organized as static arrays Stanley A. Wileman, Jr. Operating Systems Slide 11 Process Identification and Ownership Each process in a system must be uniquely identified. In UNIX systems, this identification is provided by an integer called the process ID. Each process is also owned by a particular user, identified by a user ID (uid). One uid, associated with the super user, imparts special privileges (e.g. shutdown the system, and read arbitrary files) to processes. (OS/390 UNIX allows multiple super users. ) 2008 Stanley A. Wileman, Jr. Operating Systems Slide 12 4

5 Files and Data Sets Another major operating system function is to provide convenient access to information organized in files, or data sets. (The term data set is frequently used for files on mainframes.) Files are named collections of information, usually stored on disk or magnetic tape. Files can also be stored on other devices, including RAM disks and removable memory cards for use with portable devices (e.g. cameras and handheld computers) Stanley A. Wileman, Jr. Operating Systems Slide 13 File Systems A file system is a storage structure (like a data structure, but normally tailored for a secondary storage device like a disk). There are many different types of file systems, even for the same operating system. Speed, reliability, media type, and other factors influence the design of a file system. For example, CD Rom file systems differ considerably from those for hard drives Stanley A. Wileman, Jr. Operating Systems Slide 14 System Calls for File Manipulation The usual system calls for manipulating files include the following: open prepare a file for input/output read copy data from file to memory write copy data from memory to file close conclude I/O operations on a file Other system calls may be provided for things like file locking, random positioning, concurrent I/O, tape positioning, communication functions, and so forth. We will later take a detailed look at a number of these system calls and use them in a program Stanley A. Wileman, Jr. Operating Systems Slide 15 5

6 Organizing Files Even systems designed for use by a single user may have thousands of files. How are these files organized? Most systems use a hierarchical naming scheme for files. A particular file is accessed by giving first the name at the top level of the hierarchy, then the second level name, and so forth, finishing with the name of the desired file Stanley A. Wileman, Jr. Operating Systems Slide 16 Hierarchical Naming Examples A mainframe computer might use names like STANW.SAMPLE.JOBS and STANW.SAMPLE.CLIST for data sets containing different types of sample code. If these were stored in a UNIX file system, they might be /u/stanw/sample/jobs and /u/stanw/sample/clist. Note that the basic concepts are the same. It s much like describing a path through a tree, from the root to a particular node Stanley A. Wileman, Jr. Operating Systems Slide 17 Binding The term binding is used to indicate the mechanism by which a name is associated with an object. For file systems, binding refers to the mechanism used to associate a name with a file. There are many different binding techniques used in different file systems Stanley A. Wileman, Jr. Operating Systems Slide 18 6

7 Binding Examples The IBM MVS system uses catalogs, each of which stores pairs of the form (name, location), where name might be STANW.SAMPLE.JOBS and location would identify the physical location of the file. UNIX systems use multiple directories are used to store this information, each directory similar to an interior node of a tree. Thus each directory entry (called a link) contains one component of a hierarchical name and a reference to the named object, which could be another directory or a regular file Stanley A. Wileman, Jr. Operating Systems Slide 19 Catalogs STANW.SAMPLE.JOBS STANW.SAMPLE.CLIST Stanley A. Wileman, Jr. Operating Systems Slide 20 Directories u stanw stanw sample sample jobs clist 2008 Stanley A. Wileman, Jr. Operating Systems Slide 21 7

8 Catalogs and Directories We frequently say a catalog or directory contains a group of files, but this is only a conceptual idea. As we have seen, a directory or catalog only contains a list of file identifiers and other information, but not the files themselves. Directories and catalogs are usually themselves stored in files, but with limited access for writing since their organization must be carefully maintained. This is crucial for the proper operation of the file system Stanley A. Wileman, Jr. Operating Systems Slide 22 Common Filesystems Some common file systems include: FAT (used with MS-DOS) NTFS (used with Windows NT) CDFS (used on CD-ROMs) UFS (used with UNIX systems) HFS (used with OS/390 UNIX) MVS (used with mainframe systems) Each of these has a unique way of naming and storing files, and mapping from a file name to its storage. The functions they provide, however, are basically the same Stanley A. Wileman, Jr. Operating Systems Slide 23 Hierarchical File System Conventions The top directory (node) in a hierarchical file system tree is called, naturally, the root node or root directory. This concept does not apply to the MVS file system. MVS may, however, have multiple catalogs, the first of which is called the master catalog. The first component of a data set s name in MVS is called the high level qualifier (HLQ) Stanley A. Wileman, Jr. Operating Systems Slide 24 8

9 Relative and Absolute Path Names In many systems (UNIX, Windows, etc.), a unique file can be identified by giving a path to it, starting from the root directory. This is called an absolute, or complete path path to the file. A path may be given from a working directory, which is just a directory identified as such by the user. A default working directory, called the user s home directory, is in effect at login time. Absolute paths always begin with / ; a relative path is one that does not start with / Stanley A. Wileman, Jr. Operating Systems Slide 25 Example Paths Absolute or complete paths /u/stanw/samples/jobs /usr/man/man2/fork.2 Equivalent relative paths (where cwd means current working directory) jobs (with cwd of/u/stanw/samples) man2/fork.2 (with cwd of/usr/man) 2008 Stanley A. Wileman, Jr. Operating Systems Slide 26 System Calls for Directories Windows NT: CreateDirectory, RemoveDirectory GetCurrentDirectory, SetCurrentDirectory UNIX: mkdir, rmdir link, unlink, mount, unmount chdir, chroot 2008 Stanley A. Wileman, Jr. Operating Systems Slide 27 9

10 Non-Hierarchical File Systems Some file systems do not support hierarchical file naming (in the traditional manner). For example, the CP/M operating system (the predecessor of MS-DOS) only allows each file to have 11 characters in its file name, in the common 8.3 format (e.g. computer.txt). There is only one directory, which contains an entry for every file in the CP/M file system Stanley A. Wileman, Jr. Operating Systems Slide 28 File Permissions Most systems provide some protection for files to restrict who can read, write, create, or delete particular files. UNIX systems use a 9-bit code containing three groups (for the user/owner, the user s group, and all others) of 3 bits each. Each group of bits is interpreted as r w x. If r is set, then reading is allowed; w = write; x = execute Stanley A. Wileman, Jr. Operating Systems Slide 29 RACF (pronounced Rack F ) OS/390 provides optional security systems (like RACF) that provide security external to the file system. Each system call that seeks to access an object (e.g. a file) causes the operating system to query RACF to see if the requested access is permitted. This global approach to providing security is different (and much more comprehensive) than the file-system integral approach used by UNIX Stanley A. Wileman, Jr. Operating Systems Slide 30 10

11 Access Control Lists Windows NT and RACF also provide ACLs, or Access Control Lists. An ACL is a list of pairs, each pair identifying a user or group of users, and the type of access permitted to the file. Each file system object may have an associated ACL. RACF extends ACLs to virtually every object in the system Stanley A. Wileman, Jr. Operating Systems Slide 31 Special Files UNIX allows access to physical devices (for suitably privileged processes) using the same I/O system calls used for regular files. Character special files are used to model devices that do transfer one character at a time. Examples include serial ports, mice, keyboards, printers, etc. Block special files model devices that transfer a block of data at a time (disks and tapes) Stanley A. Wileman, Jr. Operating Systems Slide 32 File Descriptors / Handles Opening a file requires specification of the file name, or the path to the file. The type of access desired (e.g. read, write) is also indicated. After the file is open, other system calls referencing the file use a reference to a data structure containing information about the open file; this reference is returned by the open call. In UNIX, this reference is called a file descriptor. In Windows, it is called a handle. And in MVS it is a pointer to a data control block Stanley A. Wileman, Jr. Operating Systems Slide 33 11

12 Files Automatically Open in UNIX Processes Three (or more) files are usually available (opened automatically) when a process begins execution: Standard input (usually the keyboard) Standard output (usually the CRT) Standard error (usually also the CRT) Standard print (in MS-DOS and Windows) 2008 Stanley A. Wileman, Jr. Operating Systems Slide 34 High Level Language I/O In a high-level language (like C or Pascal), application programs rarely directly use the reference returned by the open system call. Instead, they use a reference to a higher-level data structure managed by standard libraries provided by the language. For example, to read a character c from the keyboard in C, we could use either read (0, &c, 1); (using the system call) c = getchar(stdin); (using a standard library function) 2008 Stanley A. Wileman, Jr. Operating Systems Slide 35 Pipes A pipe is essentially queue of bytes treated as an I/O device. When a pipe is created, the user is usually given two handles (or file descriptors). The first handle is used for reading, and the second handle is used for writing. Data written into the pipe is conceptually written at the tail of the queue; reading from the pipe removes data from the head of the queue. Pipes are frequently used for communication between processes Stanley A. Wileman, Jr. Operating Systems Slide 36 12

13 Implementation of System Calls Q. Since the operating system code usually executes in kernel mode, and applications run in user mode, how can an application make a system call which requires the application to enter the kernel mode? A. Special instructions are used that cause traps - just as in a divide by 0, but these traps indicate to the OS that a system call was made. While in kernel mode, the application can only execute the specified system call s code, thus ensuring security Stanley A. Wileman, Jr. Operating Systems Slide 37 Making System Calls from C Rather than have users struggle with writing special trap instructions, libraries are included with C implementations that define functions that execute the appropriate trap instructions. Example (UNIX): char buffer[80]; int count; count = read (0,buffer,80); The read function handles parameter passing and arranges for the appropriate trap instruction to be executed Stanley A. Wileman, Jr. Operating Systems Slide 38 System Call Results Most system calls are designed to return a unique code indicating failure. In UNIX, this is usually 1. When a system call fails, an additional mechanism is available to identify the particular reason for failure: errno (a global variable in UNIX) GetLastError (a function call in WindowsNT) a processor register s contents in MVS 2008 Stanley A. Wileman, Jr. Operating Systems Slide 39 13

14 Command Interpreters (Shells) Character-oriented interfaces to operating systems (as opposed to GUIs) utilize one or more programs that interpret a command language, frequently resulting in requests to create processes and execute programs. These interpreters are normally called shells (e.g. sh, csh, mush, tcsh and ksh in UNIX). Windows NT uses a program called cmd.exe, and MS-DOS uses command.com Stanley A. Wileman, Jr. Operating Systems Slide 40 Typical Features of Shells A user-configurable prompt is issued to indicate the shell is ready for the next command. prog arg1 arg2 would be typed to request creation of a process for execution of the executable program in file prog (a relative path) with arguments arg1 and arg2 (more on arguments later) Stanley A. Wileman, Jr. Operating Systems Slide 41 More Shell Features prog < input executes prog with its standard input redirected to the file input. prog > output redirects standard output to the named file. prog < input > output redirects both standard input and standard output. prog1 prog2 runs prog1 and prog2; the standard output of prog1 piped to prog2 s input. prog & runs prog concurrently with shell Stanley A. Wileman, Jr. Operating Systems Slide 42 14

15 Other Approaches Note that the mechanism by which an executable program is submitted for execution, and how external objects (e.g. files and terminals) are associated with the process, is usually independent of the system calls made by the process. For example, in MVS, program execution is requested by statements in a data set (file) containing JCL (job command language). The program itself, while unchanged, could have its execution requested by a command line in UNIX Stanley A. Wileman, Jr. Operating Systems Slide 43 MVS Job Control Language JCL statements usually have three fields: a label, a statement type, and parameters. The JOB statement is used to define a job consisting of one or more job steps: //DOIT JOB ACCT#, USERNAME The EXEC statement requests the execution of a program: //STEP1 EXEC PGM=COMPILER The DD statement associates a ddname with a data set (the ddname is referenced inside the program): //SYSIN DD DSN=MY.SOURCE.PROGRAM 2008 Stanley A. Wileman, Jr. Operating Systems Slide 44 A Typical MVS Job //DOIT JOB , USERNAME // EXEC COB2UCLG //COB2.SYSIN DD * The COBOL program goes here /* //GO.OUT DD SYSOUT=* //GO.IN DD DSN=MY.INPUT.DATA,DISP=SHR 2008 Stanley A. Wileman, Jr. Operating Systems Slide 45 15

16 The UNIX fork System Call The UNIX system call fork() duplicates the process that executes it: memory contents, open file handles, quotas, permissions, etc. In the parent (creating) process, fork() returns the unique process id (an integer) of the newly created process. In the child process, fork() returns Stanley A. Wileman, Jr. Operating Systems Slide 46 The UNIX execve System Call The execve() system call replaces the core image (memory contents) of the currently executing process with that of another program. Shells begin the execution of a program (specified on the command line) by first executing fork, and then arranging for the child process to exec the appropriate program Stanley A. Wileman, Jr. Operating Systems Slide 47 The Windows NT CreateProcess System Call The CreateProcess system call combines the effects of the UNIX fork and exec system calls. CreateProcess creates a new process which begins executing a named program with a specified set of arguments Stanley A. Wileman, Jr. Operating Systems Slide 48 16

17 The MVS ATTACHX System Call The ATTACHX system call is used in MVS to create a new subtask (process) and have it execute a named program. MVS System calls are usually made from code generated by assembler macros. The ATTACHX macro places the address of a parameter block in a register, then executes the instruction SVC 42 which invokes the operating system by causing a trap. The parameter block includes the name of the program to be executed by the new task Stanley A. Wileman, Jr. Operating Systems Slide 49 Passing Arguments to UNIX Processes When a UNIX process begins execution, it receives command line parameters in a variable length array of pointers to character strings. In C, the main function uses two (or three) arguments: An integer giving the number of arguments A pointer to an array of character strings which contains the arguments The third argument points to the environment (which we will cover later) Stanley A. Wileman, Jr. Operating Systems Slide 50 Sample Program Using Arguments The program args.c illustrates a C program that references the arguments provided on the command line. The program just prints the arguments. If invoked as args one two three, the program will print the following: Number of arguments = 4 Argument 0: <args> Argument 1: <one> Argument 2: <two> Argument 3: <three> 2008 Stanley A. Wileman, Jr. Operating Systems Slide 51 17

18 UNIX program: args.c /************************************/ /* Print the command line arguments */ /************************************/ #include <stdio.h> main (int argc, char *argv[]) { int i; printf("number of arguments = %d\n, argc); for (i=0;i<argc;i++) printf(" Argument %d: <%s>\n",i, argv[i]); exit(0); } 2008 Stanley A. Wileman, Jr. Operating Systems Slide 52 Sample Program Using Fork/Exec The program prun.c illustrates a C program that creates a new process that then executes a named program with arguments. If invoked as prun pargs one two, the program will create a new process (using fork()) and terminate. The new process will then execute the pargs program (using execve()) which will print the expected output Stanley A. Wileman, Jr. Operating Systems Slide 53 UNIX program: prun.c (part 1) /*********************************************/ /* Create a new process to execute a program */ /*********************************************/ #include <stdio.h> extern char **environ; void main( int argc, char *argv[]) { char *args[10]; int i; /* Eliminate argv[0] prior to use by execve */ for (i=1; i<argc;i++) args[i-1] = argv[i]; args[i-1] = NULL; if (argc < 2) { /* error: too few arguments */ printf("usage: prun <prog> <arg>...\n" ); exit(1); } 2008 Stanley A. Wileman, Jr. Operating Systems Slide 54 18

19 Program: prun.c (part 2) if (fork() == 0) { /* fork, test for error */ /* inside the new process, execute the prog */ execve(argv[1], args, environ); perror("execve"); /* if execve had error */ exit(1); } printf( "prun complete.\n", i ); exit(0); } 2008 Stanley A. Wileman, Jr. Operating Systems Slide 55 Next In the next module we ll examine the process model in more detail. We will examine the states in which processes may exist, and the causes for transitions between these states. Threads will be considered as alternatives to processes. And interprocess communication (IPC) will be introduced Stanley A. Wileman, Jr. Operating Systems Slide 56 19

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1 Reading Assignment 4 Chapter 4 Threads, due 2/7 1/31/13 CSE325 - Processes 1 What s Next? 1. Process Concept 2. Process Manager Responsibilities 3. Operations on Processes 4. Process Scheduling 5. Cooperating

More information

UNIX Kernel. UNIX History

UNIX Kernel. UNIX History UNIX History UNIX Kernel 1965-1969 Bell Labs participates in the Multics project. 1969 Ken Thomson develops the first UNIX version in assembly for an DEC PDP-7 1973 Dennis Ritchie helps to rewrite UNIX

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

System Programming. Introduction to Unix

System Programming. Introduction to Unix Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 3 Introduction

More information

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

More information

Windows architecture. user. mode. Env. subsystems. Executive. Device drivers Kernel. kernel. mode HAL. Hardware. Process B. Process C.

Windows architecture. user. mode. Env. subsystems. Executive. Device drivers Kernel. kernel. mode HAL. Hardware. Process B. Process C. Structure Unix architecture users Functions of the System tools (shell, editors, compilers, ) standard library System call Standard library (printf, fork, ) OS kernel: processes, memory management, file

More information

Fall 2015 COMP Operating Systems. Lab #3

Fall 2015 COMP Operating Systems. Lab #3 Fall 2015 COMP 3511 Operating Systems Lab #3 Outline n Operating System Debugging, Generation and System Boot n Review Questions n Process Control n UNIX fork() and Examples on fork() n exec family: execute

More information

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this programming assignment is to give you some experience

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

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

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017)

UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall Programming Assignment 1 (updated 9/16/2017) UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Fall 2017 Programming Assignment 1 (updated 9/16/2017) Introduction The purpose of this programming assignment is to give you

More information

(In columns, of course.)

(In columns, of course.) CPS 310 first midterm exam, 10/9/2013 Your name please: Part 1. Fun with forks (a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not always the same.

More information

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview Today CSCI 4061 Introduction to s Instructor: Abhishek Chandra OS Evolution Unix Overview Unix Structure Shells and Utilities Calls and APIs 2 Evolution How did the OS evolve? Generation 1: Mono-programming

More information

The Classical OS Model in Unix

The Classical OS Model in Unix The Classical OS Model in Unix Nachos Exec/Exit/Join Example Exec parent Join Exec child Exit SpaceID pid = Exec( myprogram, 0); Create a new process running the program myprogram. int status = Join(pid);

More information

518 Lecture Notes Week 3

518 Lecture Notes Week 3 518 Lecture Notes Week 3 (Sept. 15, 2014) 1/8 518 Lecture Notes Week 3 1 Topics Process management Process creation with fork() Overlaying an existing process with exec Notes on Lab 3 2 Process management

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

Programming Assignment #1: A Simple Shell

Programming Assignment #1: A Simple Shell Programming Assignment #1: A Simple Shell Due: Check My Courses In this assignment you are required to create a C program that implements a shell interface that accepts user commands and executes each

More information

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed Process Management CS 537 Lecture 3: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units

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

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview

Today. Operating System Evolution. CSCI 4061 Introduction to Operating Systems. Gen 1: Mono-programming ( ) OS Evolution Unix Overview Today CSCI 4061 Introduction to s Instructor: Abhishek Chandra OS Evolution Unix Overview Unix Structure Shells and Utilities Calls and APIs 2 Evolution How did the OS evolve? Dependent on hardware and

More information

628 Lecture Notes Week 4

628 Lecture Notes Week 4 628 Lecture Notes Week 4 (February 3, 2016) 1/8 628 Lecture Notes Week 4 1 Topics I/O Redirection Notes on Lab 4 Introduction to Threads Review Memory spaces #include #include int

More information

Mon Sep 17, 2007 Lecture 3: Process Management

Mon Sep 17, 2007 Lecture 3: Process Management Mon Sep 17, 2007 Lecture 3: Process Management September 19, 2007 1 Review OS mediates between hardware and user software QUIZ: Q: Name three layers of a computer system where the OS is one of these layers.

More information

ADVANCED OPERATING SYSTEMS

ADVANCED OPERATING SYSTEMS ADVANCED OPERATING SYSTEMS UNIT I INTRODUCTION TO UNIX/LINUX KERNEL BY MR.PRASAD SAWANT Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS PREREQUISITES: 1. Working knowledge of C programming. 2.

More information

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Architectural Support for Operating Systems Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Basic structure of OS Basic computer

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

Architectural Support for OS

Architectural Support for OS Architectural Support for OS Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3052: Introduction to Operating Systems, Fall 2017, Jinkyu Jeong (jinkyu@skku.edu)

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

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

OS lpr. www. nfsd gcc emacs ls 9/18/11. Process Management. CS 537 Lecture 4: Processes. The Process. Why Processes? Simplicity + Speed

OS lpr. www. nfsd gcc emacs ls 9/18/11. Process Management. CS 537 Lecture 4: Processes. The Process. Why Processes? Simplicity + Speed Process Management CS 537 Lecture 4: Processes Today: processes and process management what are the OS units of execution? how are they represented inside the OS? how is the CPU scheduled across processes?

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

CSE506: Operating Systems CSE 506: Operating Systems

CSE506: Operating Systems CSE 506: Operating Systems CSE 506: Operating Systems What Software Expects of the OS What Software Expects of the OS Shell Memory Address Space for Process System Calls System Services Launching Program Executables Shell Gives

More information

Processes. CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers University

Processes. CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers University Processes Design, Spring 2011 Department of Computer Science Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode instruction Execute instruction CPU

More information

(MCQZ-CS604 Operating Systems)

(MCQZ-CS604 Operating Systems) command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs. CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs

More information

Chp1 Introduction. Introduction. Objective. Logging In. Shell. Briefly describe services provided by various versions of the UNIX operating system.

Chp1 Introduction. Introduction. Objective. Logging In. Shell. Briefly describe services provided by various versions of the UNIX operating system. Chp1 Objective Briefly describe services provided by various versions of the UNIX operating system. Logging In /etc/passwd local machine or NIS DB root:x:0:1:super-user:/root:/bin/tcsh Login-name, encrypted

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

for Operating Systems Computer Systems Laboratory Sungkyunkwan University

for Operating Systems Computer Systems Laboratory Sungkyunkwan University Architectural t Support for Operating Systems Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Basic computer system architecture

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #2 After A.S.Tanenbaum, Modern Operating Systems, 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD INTRODUCTION Operating systems structure OPERATING SYSTEM

More information

File Systems. What do we need to know?

File Systems. What do we need to know? File Systems Chapter 4 1 What do we need to know? How are files viewed on different OS s? What is a file system from the programmer s viewpoint? You mostly know this, but we ll review the main points.

More information

www nfsd emacs lpr Process Management CS 537 Lecture 4: Processes Example OS in operation Why Processes? Simplicity + Speed

www nfsd emacs lpr Process Management CS 537 Lecture 4: Processes Example OS in operation Why Processes? Simplicity + Speed Process Management CS 537 Lecture 4: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units

More information

ELEC 377 Operating Systems. Week 1 Class 2

ELEC 377 Operating Systems. Week 1 Class 2 Operating Systems Week 1 Class 2 Labs vs. Assignments The only work to turn in are the labs. In some of the handouts I refer to the labs as assignments. There are no assignments separate from the labs.

More information

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J Processes & Threads Today! Process concept! Process model! Implementing processes! Multiprocessing once again Next Time! More of the same J The process model! Most computers can do more than one thing

More information

An Introduction to Unix Power Tools

An Introduction to Unix Power Tools An to Unix Power Tools Randolph Langley Department of Computer Science Florida State University August 27, 2008 History of Unix Unix Today Command line versus graphical interfaces to COP 4342, Fall History

More information

Linux Operating System

Linux Operating System Linux Operating System Dept. of Computer Science & Engineering 1 History Linux is a modern, free operating system based on UNIX standards. First developed as a small but self-contained kernel in 1991 by

More information

CSC209 Review. Yeah! We made it!

CSC209 Review. Yeah! We made it! CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions

More information

COMP 3100 Operating Systems

COMP 3100 Operating Systems Programming Interface» A process is an instance of a running program. COMP 3100 Operating Systems» Functionality that an OS provides to applications» Process Management» Input/Output Week 3 Processes and

More information

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University Architectural Support for Operating Systems Jinkyu Jeong ( jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Basic services of OS Basic computer system

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

CSE506: Operating Systems CSE 506: Operating Systems

CSE506: Operating Systems CSE 506: Operating Systems CSE 506: Operating Systems What Software Expects of the OS What Software Expects of the OS Memory System Calls System Services Launching Program Executables Shell Memory Abstraction CSE506: Operating Systems

More information

OS COMPONENTS OVERVIEW OF UNIX FILE I/O. CS124 Operating Systems Fall , Lecture 2

OS COMPONENTS OVERVIEW OF UNIX FILE I/O. CS124 Operating Systems Fall , Lecture 2 OS COMPONENTS OVERVIEW OF UNIX FILE I/O CS124 Operating Systems Fall 2017-2018, Lecture 2 2 Operating System Components (1) Common components of operating systems: Users: Want to solve problems by using

More information

SE350: Operating Systems

SE350: Operating Systems SE350: Operating Systems Tutorial: The Programming Interface Main Points Creating and managing processes fork, exec, wait Example: implementing a shell Shell A shell is a job control system Allows programmer

More information

Files and the Filesystems. Linux Files

Files and the Filesystems. Linux Files Files and the Filesystems Linux Files The file is the most basic and fundamental abstraction in Linux. Linux follows the everything-is-a-file philosophy. Consequently, much interaction occurs via reading

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

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

CS153: Process 2. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 1 CS153: Process 2 Chengyu Song Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 2 Administrivia Lab New TA Bojian Du, office hours Th 3:30pm-5:30pm at WCH 465 Please participate

More information

CMPS 105 Systems Programming. Prof. Darrell Long E2.371

CMPS 105 Systems Programming. Prof. Darrell Long E2.371 + CMPS 105 Systems Programming Prof. Darrell Long E2.371 darrell@ucsc.edu + Chapter 1 + Introduction n Operating systems provide services for programs n Execute a program, open a file, read a file, allocate

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

Definition: An operating system is the software that manages resources

Definition: An operating system is the software that manages resources 13-1 Operating Systems 13-1 Definition: An operating system is the software that manages resources in a computer. Resources A resource is (usually) hardware that needs to be accessed. There are rules for

More information

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Introduction to Operating Systems Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics What is OS? History of OS 2 What is OS? (1) Application

More information

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel OS Structure, Processes & Process Management Don Porter Portions courtesy Emmett Witchel 1 What is a Process?! A process is a program during execution. Ø Program = static file (image) Ø Process = executing

More information

Building blocks for Unix power tools

Building blocks for Unix power tools for Unix power tools Now that we have given a good overview of a lot of the better Unix tools, I want to take some time to talk about our toolset for building Unix programs. The most important of these

More information

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

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions 1. What are the different parts of UNIX system? i. Programs

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

Project 2: Shell with History1

Project 2: Shell with History1 Project 2: Shell with History1 See course webpage for due date. Submit deliverables to CourSys: https://courses.cs.sfu.ca/ Late penalty is 10% per calendar day (each 0 to 24 hour period past due). Maximum

More information

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 3 Threads & Concurrency Jonathan Walpole Computer Science Portland State University 1 The Process Concept 2 The Process Concept Process a program in execution

More information

CS 5460/6460 Operating Systems

CS 5460/6460 Operating Systems CS 5460/6460 Operating Systems Fall 2009 Instructor: Matthew Flatt Lecturer: Kevin Tew TAs: Bigyan Mukherjee, Amrish Kapoor 1 Join the Mailing List! Reminders Make sure you can log into the CADE machines

More information

CSE 380 Computer Operating Systems. Instructor: Insup Lee. University of Pennsylvania Fall 2003

CSE 380 Computer Operating Systems. Instructor: Insup Lee. University of Pennsylvania Fall 2003 CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note 2: Processes and Threads Lecture Note 2.1: Processes and System Calls 1 Process q Consider a simple

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

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

Chapter 1 - Introduction. September 8, 2016

Chapter 1 - Introduction. September 8, 2016 Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help

More information

PROCESSES. Jo, Heeseung

PROCESSES. Jo, Heeseung PROCESSES Jo, Heeseung TODAY'S TOPICS What is the process? How to implement processes? Inter-Process Communication (IPC) 2 WHAT IS THE PROCESS? Program? vs. Process? vs. Processor? 3 PROCESS CONCEPT (1)

More information

Processes. Jo, Heeseung

Processes. Jo, Heeseung Processes Jo, Heeseung Today's Topics What is the process? How to implement processes? Inter-Process Communication (IPC) 2 What Is The Process? Program? vs. Process? vs. Processor? 3 Process Concept (1)

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

What is a Process? Processes and Process Management Details for running a program

What is a Process? Processes and Process Management Details for running a program 1 What is a Process? Program to Process OS Structure, Processes & Process Management Don Porter Portions courtesy Emmett Witchel! A process is a program during execution. Ø Program = static file (image)

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Sanghoon Han(sanghoon.han@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) Please come

More information

OPERATING SYSTEMS OVERVIEW. Operating Systems 2015 Spring by Euiseong Seo

OPERATING SYSTEMS OVERVIEW. Operating Systems 2015 Spring by Euiseong Seo OPERATING SYSTEMS OVERVIEW Operating Systems 2015 Spring by Euiseong Seo What is an Operating System? A program that acts as an intermediary between a user of a computer and computer hardware Operating

More information

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. CS 33 Architecture and the OS CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. The Operating System My Program Mary s Program Bob s Program OS CS33 Intro to

More information

Process Management! Goals of this Lecture!

Process Management! Goals of this Lecture! Process Management! 1 Goals of this Lecture! Help you learn about:" Creating new processes" Programmatically redirecting stdin, stdout, and stderr" (Appendix) communication between processes via pipes"

More information

CSC209 Fall Karen Reid 1

CSC209 Fall Karen Reid 1 ' & ) ) #$ "! How user programs interact with the Operating System. Somehow we need to convert a program into machine code (object code). A compiler passes over a whole program before translating it into

More information

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

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts CSCI 2132 Software Development Lecture 3: Unix Shells and Other Basic Concepts Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 10-Sep-2018 (3) CSCI 2132 1 Introduction to UNIX

More information

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Latest Solved from Mid term Papers Resource Person Hina 1-The problem with priority scheduling algorithm is. Deadlock Starvation (Page# 84) Aging

More information

Glossary. The target of keyboard input in a

Glossary. The target of keyboard input in a Glossary absolute search A search that begins at the root directory of the file system hierarchy and always descends the hierarchy. See also relative search. access modes A set of file permissions that

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

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Introduction to Operating Systems Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Why OS? 2 What is an OS? Software that converts hardware into

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Introduction to File Systems

Introduction to File Systems Introduction to File Systems CS-3013 Operating Systems Hugh C. Lauer (Slides include materials from Slides include materials from Modern Operating Systems, 3 rd ed., by Andrew Tanenbaum and from Operating

More information

W4118: OS Overview. Junfeng Yang

W4118: OS Overview. Junfeng Yang W4118: OS Overview Junfeng Yang References: Modern Operating Systems (3 rd edition), Operating Systems Concepts (8 th edition), previous W4118, and OS at MIT, Stanford, and UWisc Outline OS definitions

More information

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. CS 33 Architecture and the OS CS33 Intro to Computer Systems XIX 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. The Operating System My Program Mary s Program Bob s Program OS CS33 Intro to

More information

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring 2009 Topic Notes: C and Unix Overview This course is about computer organization, but since most of our programming is

More information

Unix API Books. Linux Kernel Books. Assignments and Exams. Grading for CSC 256. Operating Systems 8/31/2018. CSC 256/456 Fall

Unix API Books. Linux Kernel Books. Assignments and Exams. Grading for CSC 256. Operating Systems 8/31/2018. CSC 256/456 Fall Prerequisites CSC 2/456: Operating s CSC 252 or equivalent C/C++ programming experience on Unix systems Instructor: Sandhya Dwarkadas TAs: Zhuojia Shen, Mohsen Mohammadi 8/31/2018 CSC 2/456 1 2 Meaning

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

13-2 EE 4770 Lecture Transparency. Formatted 8:18, 13 March 1998 from lsli

13-2 EE 4770 Lecture Transparency. Formatted 8:18, 13 March 1998 from lsli 13-1 13-1 Operating Systems Definition: An operating system is the software that manages resources in a computer. Resources A resource is (usually) hardware that needs to be accessed. There are rules for

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

Process Management! Goals of this Lecture!

Process Management! Goals of this Lecture! Process Management! 1 Goals of this Lecture! Help you learn about:" Creating new processes" Programmatically redirecting stdin, stdout, and stderr" Unix system-level functions for I/O" The Unix stream

More information

COE518 Lecture Notes Week 2 (Sept. 12, 2011)

COE518 Lecture Notes Week 2 (Sept. 12, 2011) C)E 518 Operating Systems Week 2 September 12, 2011 1/8 COE518 Lecture Notes Week 2 (Sept. 12, 2011) Topics Creating a cloned process with fork() Running a new process with exec...() Textbook sections

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

What Is A Process? Process States. Process Concept. Process Control Block (PCB) Process State Transition Diagram 9/6/2013. Process Fundamentals

What Is A Process? Process States. Process Concept. Process Control Block (PCB) Process State Transition Diagram 9/6/2013. Process Fundamentals What Is A Process? A process is a program in execution. Process Fundamentals #include int main(int argc, char*argv[]) { int v; printf( hello world\n ); scanf( %d, &v); return 0; Program test

More information

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. File-System Structure File structure Logical storage unit Collection of related information File

More information

Operating Systems CS 571

Operating Systems CS 571 Operating Systems CS 571 Prof. Sanjeev Setia Fall 2003 1 Prerequisites Overview Computer Architecture (CS 365) Data structures and programming (CS 310) (C++/C/Java progamming) Textbooks Modern Operating

More information