CPS221 Lecture: Operating System Functions

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "CPS221 Lecture: Operating System Functions"

Transcription

1 CPS221 Lecture: Operating System Functions Objectives last revised 6/23/10 1. To overview key hardware concepts 2. To iintroduce the process concept 3. To discuss the various kinds of functionality of the OS I. Introduction A. Operating systems play a central role in the operation of most computer systems. In fact, when one speaks of a computer system, one often refers to the operating system - e.g. a Windows machine or a Linux machine or a Macintosh (Only in the latter case does the name say anything about the hardware, and only because MacOS only runs on machines made by Apple). B. In essence, what the operating system does is to create a layer of abstraction around the basic hardware, such that the user does not see the actual underlying machine, but rather a virtual machine that the operating system provides: User Application Programs Operating System Hardware 1. The user and the application programs do not see the hardware directly, but only through the operating system. 2. One benefit of this abstraction is that it hides differences in machines from the user, so that the user can focus on the general solution to his problem, rather than the intricacies of a particular machine it runs on. This facilitates portability of programs. 3. The UNIX operating system has carried this even further. a) Most operating systems are specific to a particular type of CPU and even manufacturer. (e.g. the 80x86 family for Windows; 80x86 made by Apple for MacOS), 1

2 b) UNIX and Unix-like systems (including Linux) have been implemented on many different CPU's. Application programs may, of course, need to be recompiled for a particular hardware architecture, since the machine language is different; but the basic UNIX file system and system services is the same in all cases, so that Unix-like programs are highly portable from machine to machine. C. One way to view an operating system is in terms of four basic interfaces: 1. The interface to the underlying hardware (specific to a particular machine). A modern operating system is responsible for managing five general categories of hardware resources: a) The CPU itself b) Primary memory c) Various sorts of IO devices (1) One user at a time devices like a printer, keyboard, or monitor (2) The file system (3) Networking capabilities 2. The interface to application programs (should look the same whereever a given operating system is implemented) 3. The interface to the user (command language, utilities) 4. The interface to system management capabilities. D. Each of these interfaces provides a "view" of the operating system that is important to certain kinds of people. 1. People who build interfaces for new kinds of hardware devices are, of course, most interested in the operating system's hardware interface. 2. Application programmers are primarily interested in the operating system's program interface - though they also use the user interface in their work. 3. Many users are only interested in the user interface. Indeed, many popular books about particular operating systems deal primarily with this aspect. 2

3 4. More sophisticated users and system managers are also concerned with the administrative interfaces. E. Many operating systems are delivered as three major components: a kernel plus a collection of libraries plus a collection of system programs. 1. The core of the operating system (the operating system proper) provides the first interface, plus some additional functionality we will discuss. 2. The libraries provide the second interface, relying on mechanisms provided by the operating system proper. 3. The system programs provide the latter two, relying on mechanisms provided by the operating system proper and the libraries. 4. Our principle focus in the course will be on the hardware and the application program interface, though we will say a bit about the user and management interfaces. II. The Operating System Proper A. The operating system proper directly controls the hardware. There are a few fundamental hardware concepts that are important to understand at this point. 1. The notion of CPU mode. a) General-purpose CPU s typically operate in one of two modes - kernel and user. (1) This is often specified by a single bit in the CPU s state. (2) When the CPU is in kernel mode (a) Any instruction in its instruction set is legal (b) Any location in its physical memory is accessible (c) Any IO device can be accessed (3) When the CPU is in kernel mode (a) Certain privileged instructions cannot be executed - e.g. the instruction that halts the CPU, or that changes its mode. 3

4 (b) There are restrictions on what locations in physical memory can be accessed, and on the nature of that access (read only or read and write) (c) IO devices generally cannot be accessed. (d) If code executing in user mode attempts to perform some operation it is not allowed to perform, a trap to operating system code occurs. b) This distinction provides the basis for protecting the operating system from user code, and for preventing different users from interfering with each other. (1) User code cannot execute an instruction (like halt) which would interfere with others. (2) User code cannot access physical memory belonging to the operating system or another user. (3) User code cannot access physical devices including files residing on disk. c) Historically, code that was part of the operating system proper was designed to execute with the CPU in kernel mode, while utilities, compilers, and user applications alway execute in user mode. (1) Today, though, a trend in operating system design is to have only certain portions of the operating system (commonly called the kernel) execute in kernel mode, while the rest of the operating system executes in user mode. (2) This reduces the risk of catastrophic failure resulting from an error in operating system code. (3) It also reduces security vulnerabilities - worms, viruses and the like sometimes rely on getting the CPU to execute their own code in kernel mode. d) So what does user code do when it needs to perform an operation that can only be performed in kernel mode? (1) It places a description of what it wants done in some systemspecific place. 4

5 (2) It then executes a special instruction (commonly called a system call) that both changes the CPU to kernel mode and begins executing operating system code that analyzes the user code s request and carries it out if it is permissible. e) Some CPU s provide more than two modes to allow finer-grained specification of access privileges - but we will not discuss this further. 2. A second key notion is the notion of an interrupt or trap. a) The two terms interrupt and trap have distinct technical meanings, but are handled similarly, and the one term interrupt is often used collectively to cover both. (1) An interrupt is an event that is triggered by an external device - e.g. when an IO operation to a device is complete, or when a hardware clock ticks. In the case of an IO interrupt, there is typically some process in the waiting state that is waiting for the operation to complete. (2) A trap is a CPU event that is triggered by the program currently running on the CPU. There are two sources for traps. (a) It may be the result of some kind of fault such as executing an illegal instruction or attempting to access a protected region of memory or an IO device. (b) It may be deliberately triggered by the system call instruction. All CPU architectures include some instruction like this, which the hardware treats as an illegal instruction (thus initiating fault processing), but the OS recognizes as a system call rather than a fault. b) Either sort of event is handled by the hardware in essentially the same way: (1) The hardware saves minimal information about the current state of the system - at least the program counter and its current mode (user or kernel), and sometimes a bit of other information. (Details vary from architecture to architecture). (2) The hardware changes mode to kernel 5

6 (3) The hardware starts executing appropriate OS kernel code. (a) On some hardware architectures, the code that is executed is a dispatcher routine in the OS that analyzes the cause of the interrupt/trap and passes control to the correct handler routine in the OS. (b) On other architectures, this analysis is effectively done by the hardware. (c) In either case, the end result is that the hardware begins executing an appropriate handler routine in the OS. There is one handler for each external device that might cause an interrupt, and one handler for each possible cause for a trap. c) However, what the OS handler routine does depends on the nature of the interrupt or trap. (1) In the case of interrupts from an IO device, the typical actions include: (a) Changing the state of the process waiting for the IO operation to complete from waiting to ready. (b) Possibly initiating a new IO operation on the same device, if there is one waiting. (On a shared device like a disk, one process may request an operation while the device is busy serving another process - in fact, there may be a whole queue of pending requests for a device.) (2) An internal clock tick may result in some process that was waiting a specific period time becoming ready. (3) In the case of traps resulting from a fault, one of the following is done: (a) Initiating appropriate exception processing in the process (b) Terminating the offending process. (4) In the case of a trap resulting from a request for a system service: (a) Prior to initiating the trap, the process will have placed information about what it wants in some appropriate place. 6

7 (b) The system service handler will analyze this information to determine what the process wants and to see if it is legitimate. If it is legitimate, processing will be initiated; if it is not legitimate, the request will be handled as if it were a fault. d) In any case, after processing the interrupt or trap, the OS handler will have to decide whether to resume running the process that was running at the time the trap occurred, or to run some other process - e.g. because a waiting process of higher priority has just become ready, or because the running process has requested an operation for which it must wait. 3. The book also talked about hardware facilities for memory management. Because we talk about these in CPS311, we will discuss neither these facilities nor the memory management functions of an operating system in this course. B. One of the key responsibilities of the operating system is to manage a collection of processes. 1. A process is a program in execution. At any given time, the status of a process includes: a) A region of memory that contains the code that it is executing. plus the values of its variables. b) Its state. At any given time, a process may either by ready to use the CPU, or waiting for some event to occur before it can proceed further c) The contents of the various CPU registers - particularly the program counter, which indicates the location in memory of the instruction the process is about to execute next. d) Note the difference between a program and a process - a process is a program in execution. (1) When a program is running, there is generally a one-to-one correspondence between the program and the process running it. (2) However, it is possible that some programs, when run, may give rise to multiple processes. 7

8 (3) Conversely, a single process may run different programs over the course of its life. e) Actually, it is possible on newer systems for a process to be decomposed into a set of threads, each of which has its own set of register values and state, though all share the same memory. We will ignore this for now, but come back to it later. 2. At any given time, a system may running several types of processes. a) Some processes are providing service directly to users - e.g command interpreters, application programs, utilities. Example: as I am writing this, at least three processes I am aware of are currently running on my computer - one running my word processor, my program, and a web browser. b) Some processes may be server processes providing services to other computers on the network. c) Others processes are providing operating system functions that the user may not be consciously aware of. 3. The kernel provides a number of services concerned with the management of processes - e.g. services that create processes, allow processes to terminate (either normally or in error) and (sometimes) that allow processes to communicate with or control other processes. C. Another major task of the operating system is resource allocation. There is a sense in which the various processes on the system are in competition for various system resources, and it is the kernel's task to apportion them appropriately. 1. One such resource is the CPU. a) On a one-cpu system, only one process can actually be executing on the CPU at a time. (If the system has multiple CPU s or is multicore, the number may be greater than one but still typically much less than the number of processes in existence). b) If there are multiple processes that could use the CPU, the operating system must determine which process gets it, and for how long. 2. Memory is another resource to be allocated. Each process needs one or more regions of memory to hold its code and data. 8

9 3. Another resource to be managed is the various IO devices. a) One user at a time devices b) The file system c) Network connections. D. Another kernel task is providing support services needed by processes. These include: 1. Support for IO operations, so that application programs can be shielded from hardware-specific details. This can be very sophisticated on windowing systems, where a single physical display is shared by multiple processes through individual windows that can overlap one in various ways. 2. File system management (directory structures, etc.) 3. Networking to other systems. 4. Of course, the operating system should also guarantee processes protection from interference by other processes. E. The heart of the operating system is a collection of routines that are normally entered as a result of hardware interrupts or traps. 1. Most of the time the CPU is executing code on behalf of a user process. 2. The operating system contains a collection of handlers. The execution of one of these is triggered by an external interrupt, or a fault or a system service request by the currently running program. 3. In either case, after servicing the event, the OS handler code resumes the running of some user process. III. Libraries - the API A. All operating systems provide a collection of routines that can be used by application programs - commonly called the API. B. An operating system API includes routines that correspond directly to the various system services, but provide a more straightforward interface. 9

10 Example: On Unix systems, each of the system service calls is given a number, which is specified (together with other parameters) when the system service is invoked. For each system service, the API also defines a routine that takes the correct number of arguments and supplies the service number. For example, the function read() with three arguments executes a trap with code 3 - which corresponds to the read system service. C. Typically, an API also provides a large number of routines that provide more general support application programs (including things like mathematical functions as well system type operations.) 1. For example, there is a family of IEEE standards for Unix and Unixlike API s known as POSIX (Portable Operating System Interface [for Unix] a) Most versions of Unix (including MacOSX) fully support POSIX. b) Linux mostly supports POSIX c) Microsoft provides an add-on for some versions of Windows that provides full support for the POSIX API. 2. Both Windows and MacOS include extensive libraries as part of the OS distributiion D. There is a somewhat blurry line between API libraries and middleware. The term middleware refers to an add-on API that facilitates cooperation between processes, possibly running on multiple machines. PROJECT APPLICATIONS MIDDLEWARE OPERATING SYSTEM 10

11 1. Examples: Microsoft.NET, web servers, Object-request brokers, remote procedure call facilities, etc. 2. In practice, the line is often drawn between the API furnished by the operating system, per-se, and that furnished by add-on software - so we get a situation that looks like this: IV. System Programs A. Operating Systems also include a collection of system programs thar can be run when needed. (When such a program is running it gives rise to a process that the kernel manages like other processes.) B. One important kind of system program is the program that provides the user interface to the rest of the system. 1. This can take on of two forms a) A command interpreter that reads textual commands and performs them. DEMO: Shell b) A graphical user interface 2. Systems often provide several interfaces like this that the user can choose from. a) On both the Macintosh and Windows, the normal user interface is via a GUI. b) But on both systems, it is possible to access a command-line interface (as was just demonstrated on a Macintosh). c) On Unix/Unix-like systems, the system can be configured to start up with either a command-line or a GUI interface, but it is always possible to access a command-line when running a GUI interface. d) In the Unix world, the command line is known as the shell, and Unix or Unix-like systems often include a number of different shells that the user can choose from. (1) Both our Linux machines and Mac OSX have the following shells 11

12 (a) The Bourne shell (named after its developer Steven Bourne) - (known by the name sh) (b) A GNU-variant known as the Bourne again shell (bash) (c) The Korn shell (ksh) (d) The C-Shell - a shell with syntax that resembles the C programming language (csh) (e) A variant of the C Shell (tcsh) (f) The Z shell (zsh) (2) Unix shells have many of the features of a programming language, making it possible to create shell scripts in which the primitive operations are actually the execution of various programs 3. The user interface (whether a GUI or a command line) allows the user to perform various file system operations (e.g examining directories, moving, renaming, or deleting files) as well as to run programs. a) In a GUI, these capabilities are typically part of the GUI. b) With a shell, they may be built into the shell, or provided by system programs that the shell runs. Example: to delete a file on a Unix-like system, one uses the shell command rm, which runs a program known as rm. C. Other system programs support the user interface or provide other utility or administrative services. Example: Show /Applications/Utilities on a Macintosh - describe/demo a few programs Example: Show System Preferences on the Macintosh - describe/demo a few panes 12

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 Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. Operating System Services User Operating System Interface

More information

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues 4.2 Silberschatz, Galvin

More information

Operating System Services

Operating System Services CSE325 Principles of Operating Systems Operating System Services David Duggan dduggan@sandia.gov January 22, 2013 Reading Assignment 3 Chapter 3, due 01/29 1/23/13 CSE325 - OS Services 2 What Categories

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 4, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

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

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation Comp 104: Operating Systems Concepts Management Scheduling & Resource Allocation Today OS evolution Introduction to processes OS structure 1 2 Evolution of OS Largely driven by desire to do something useful

More information

Chapter 4: Threads. Chapter 4: Threads

Chapter 4: Threads. Chapter 4: Threads Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples

More information

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads Chapter 4: Threads Objectives To introduce the notion of a

More information

Chapter 3 Process Description and Control

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

More information

Chapter 4: Threads. Operating System Concepts 9 th Edition

Chapter 4: Threads. Operating System Concepts 9 th Edition Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples

More information

Chapter 4: Threads. Operating System Concepts 9 th Edit9on

Chapter 4: Threads. Operating System Concepts 9 th Edit9on Chapter 4: Threads Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads 1. Overview 2. Multicore Programming 3. Multithreading Models 4. Thread Libraries 5. Implicit

More information

Chapter 4: Threads. Operating System Concepts 9 th Edition

Chapter 4: Threads. Operating System Concepts 9 th Edition Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples

More information

Chap2: Operating-System Structures

Chap2: Operating-System Structures Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they

More information

CS420: Operating Systems. OS Services & System Calls

CS420: Operating Systems. OS Services & System Calls OS Services & System Calls James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Operating

More information

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition Chapter 2: Operating-System Structures Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 2: Operating-System Structures Operating System Services User Operating

More information

Chapter 2: Operating-System

Chapter 2: Operating-System Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services! User Operating System Interface! System Calls! Types of System Calls! System Programs! Operating

More information

UNIX 2 OPERATING SYSTEM

UNIX 2 OPERATING SYSTEM UNIX 2 OPERATING SYSTEM hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: Process management in Solaris. omponents of the operating system. Flow of control within the operating

More information

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

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests

More information

Unix/Linux: History and Philosophy

Unix/Linux: History and Philosophy Unix/Linux: History and Philosophy History and Background Multics project Unix Linux Multiplexed Information and Computing Service Collaborative venture between General Electric, Bell Telephone Labs, and

More information

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Operating System Structure

Operating System Structure Operating System Structure Heechul Yun Disclaimer: some slides are adopted from the book authors slides with permission Recap: Memory Hierarchy Fast, Expensive Slow, Inexpensive 2 Recap Architectural support

More information

Chapter 4: Multi-Threaded Programming

Chapter 4: Multi-Threaded Programming Chapter 4: Multi-Threaded Programming Chapter 4: Threads 4.1 Overview 4.2 Multicore Programming 4.3 Multithreading Models 4.4 Thread Libraries Pthreads Win32 Threads Java Threads 4.5 Implicit Threading

More information

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system

OS Structure. Hardware protection & privilege levels Control transfer to and from the operating system OS Structure Topics Hardware protection & privilege levels Control transfer to and from the operating system Learning Objectives: Explain what hardware protection boundaries are. Explain how applications

More information

Operating System Structure

Operating System Structure Operating System Structure Heechul Yun Disclaimer: some slides are adopted from the book authors slides with permission Recap OS needs to understand architecture Hardware (CPU, memory, disk) trends and

More information

Hardware OS & OS- Application interface

Hardware OS & OS- Application interface CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts

More information

Overview of Operating Systems

Overview of Operating Systems Lecture Outline Overview of Operating Systems Instructor: Dr. Tongping Liu Thank Dr. Dakai Zhu and Dr. Palden Lama for providing their slides. 1 2 Lecture Outline Von Neumann Architecture 3 This describes

More information

Objectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services

Objectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services Objectives Chapter 2: Operating-System Structures To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system

More information

Chapter 4: Threads. Operating System Concepts 8 th Edition,

Chapter 4: Threads. Operating System Concepts 8 th Edition, Chapter 4: Threads, Silberschatz, Galvin and Gagne 2009 Chapter 4: Threads Overview Multithreading Models Thread Libraries 4.2 Silberschatz, Galvin and Gagne 2009 Objectives To introduce the notion of

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

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

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

Operating System 4 THREADS, SMP AND MICROKERNELS

Operating System 4 THREADS, SMP AND MICROKERNELS Operating System 4 THREADS, SMP AND MICROKERNELS PROCESSES AND THREADS Process concept characteristics discussed so far Resource ownership Scheduling/execution These two characteristics are independent.

More information

OPERATING SYSTEMS. Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne

OPERATING SYSTEMS. Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne OPERATING SYSTEMS Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne OVERVIEW An operating system is a program that manages the

More information

EECS2301. Lab 1 Winter 2016

EECS2301. Lab 1 Winter 2016 EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 03 (version February 11, 2008) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.20.

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 8 Threads and Scheduling Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ How many threads

More information

Operating-System Structures

Operating-System Structures Operating-System Structures Chapter 2 Operating System Services One set provides functions that are helpful to the user: User interface Program execution I/O operations File-system manipulation Communications

More information

OS Structures. ICS332 Operating Systems

OS Structures. ICS332 Operating Systems OS Structures ICS332 Operating Systems OS Services and Features OS Services and Features Helpful to users Better efficiency/operation OS Services Load and run a program Allow a program to end in multiple

More information

Introduction to Shell Scripting

Introduction to Shell Scripting Introduction to Shell Scripting Evan Bollig and Geoffrey Womeldorff Presenter Yusong Liu Before we begin... Everyone please visit this page for example scripts and grab a crib sheet from the front http://www.scs.fsu.edu/~bollig/techseries

More information

OPERATING SYSTEMS & UTILITY PROGRAMS

OPERATING SYSTEMS & UTILITY PROGRAMS OPERATING SYSTEMS & UTILITY PROGRAMS System Software System software consists of the programs that control the operations of the computer and its devices. Functions that system software performs include:

More information

Operating Systems (ECS 150) Spring 2011

Operating Systems (ECS 150) Spring 2011 Operating Systems (ECS 150) Spring 2011 Raju Pandey Department of Computer Science University of California, Davis CA 95616 pandey@cs.ucdavis.edu http://www.cs.ucdavis.edu/~pandey Course Objectives After

More information

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled.

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled. Operating Systems: Internals and Design Principles Chapter 4 Threads Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The basic idea is that the several components

More information

Linux Operating System

Linux Operating System Linux Operating System IT250 Unit 1 Chapters 1, 2, and 3 An Introduction to Linux Linux Operating Systems Wednesday, 9:00 am 1:20 pm Attendance is Mandatory! Each class may begin with a quiz from previous

More information

Chapters 9 & 10: Memory Management and Virtual Memory

Chapters 9 & 10: Memory Management and Virtual Memory Chapters 9 & 10: Memory Management and Virtual Memory Important concepts (for final, projects, papers) addressing: physical/absolute, logical/relative/virtual overlays swapping and paging memory protection

More information

Multiprocessor scheduling

Multiprocessor scheduling Chapter 10 Multiprocessor scheduling When a computer system contains multiple processors, a few new issues arise. Multiprocessor systems can be categorized into the following: Loosely coupled or distributed.

More information

CS420: Operating Systems

CS420: Operating Systems Threads James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Threads A thread is a basic unit of processing

More information

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 Acknowledgement: This set of slides is partly based on the PPTs provided by the Wiley s companion website (including textbook images, when not explicitly

More information

operating system Spring 2017 Prof.Dr. Hasan Balik Student Name : Walid.W. Ramadan mansour Student ID :

operating system Spring 2017 Prof.Dr. Hasan Balik Student Name : Walid.W. Ramadan mansour Student ID : operating system Spring 2017 Prof.Dr. Hasan Balik Student Name : Walid.W. Ramadan mansour Student ID : 163110469 Email : wild.mansour526@gmail.com Unix SVR4 (OpenSolaris and illumos distributions) Process

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

Introduction to Linux

Introduction to Linux Introduction to Operating Systems All computers that we interact with run an operating system There are several popular operating systems Operating Systems OS consists of a suite of basic software Operating

More information

Hardware, Modularity, and Virtualization CS 111

Hardware, Modularity, and Virtualization CS 111 Hardware, Modularity, and Virtualization Operating System Principles Peter Reiher Page 1 Outline The relationship between hardware and operating systems Processors I/O devices Memory Organizing systems

More information

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala The UNIX Operating System HORT 59000 Lecture 2 Instructor: Kranthi Varala Operating Systems Image By Golftheman - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=4558519 Operating

More information

Virtual Machines WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO:

Virtual Machines WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: C H A P T E R 1 9 Virtual Machines WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Briefly describe the ideal program development environment. Distinguish between virtual and real. Briefly

More information

CMSC131. Hardware and Software. Hardware

CMSC131. Hardware and Software. Hardware CMSC131 Hardware and Software Hardware Hardware is what makes up the physical machine. Two of the same type of machines can have different brands of hardware used to build them. eg : Hayes Modem -vs- US

More information

How to Talk To Windows. What did it say?

How to Talk To Windows. What did it say? How to Talk To Windows What did it say? 1 DOS was essentially subservient. Your program was the master. When you wanted some service from DOS you called DOS it obeyed. You could even bypass DOS and communicate

More information

Chapter 8 Operating Systems and Utility Programs أ.أمل زهران

Chapter 8 Operating Systems and Utility Programs أ.أمل زهران Chapter 8 Operating Systems and Utility Programs Chapter 8 Objectives Identify the types of system software Summarize the startup process on a personal computer Summarize the features of several stand-alone

More information

Interrupt: (verb) the interruption of a CPU s normal processing...using a mechanism provided for this purpose.

Interrupt: (verb) the interruption of a CPU s normal processing...using a mechanism provided for this purpose. 15-1 Interrupts 15-1 Interrupt: (verb) the interruption of a CPU s normal processing......using a mechanism provided for this purpose. Interrupt: (noun)......(1)aneventthatcausesaninterrupt......(2) the

More information

Linux shell scripting intro/review

Linux shell scripting intro/review Linux shell scripting intro/review David Morgan You should already know how to log in run programs at the command line use pipelines and redirection ( < > ) put jobs in the background ( & ) create and

More information

CSE II-Sem)

CSE II-Sem) 1 2 a) Login to the system b) Use the appropriate command to determine your login shell c) Use the /etc/passwd file to verify the result of step b. d) Use the who command and redirect the result to a file

More information

CSC 2405: Computer Systems II

CSC 2405: Computer Systems II CSC 2405: Computer Systems II Dr. Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Spring 2016 Course Goals: Look under the hood Help you learn what happens under the hood of computer systems

More information

SysGauge SYSTEM MONITOR. User Manual. Version 4.7. Apr Flexense Ltd.

SysGauge SYSTEM MONITOR. User Manual. Version 4.7. Apr Flexense Ltd. SysGauge SYSTEM MONITOR User Manual Version 4.7 Apr 2018 www.sysgauge.com info@flexense.com 1 1 SysGauge Product Overview...3 2 SysGauge Product Versions...6 3 Product Installation...7 4 System Monitor

More information

EECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018

EECS 470 Lab 5. Linux Shell Scripting. Friday, 1 st February, 2018 EECS 470 Lab 5 Linux Shell Scripting Department of Electrical Engineering and Computer Science College of Engineering University of Michigan Friday, 1 st February, 2018 (University of Michigan) Lab 5:

More information

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2. [03] PROCESSES 1. 1 OUTLINE Process Concept Relationship to a Program What is a Process? Process Lifecycle Creation Termination Blocking Process Management Process Control Blocks Context Switching Threads

More information

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023 Operating Systems Autumn 2017-2018 Outline 1 2 3 Types of 2.4, SGG The OS Kernel The kernel is the central component of an OS It has complete control over everything that occurs in the system Kernel overview

More information

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS What is an operating system? A collection of software modules to assist programmers in enhancing system efficiency, flexibility, and robustness An Extended Machine

More information

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University CSC 4103 - Operating Systems Spring 2007 Lecture - XII Main Memory - II Tevfik Koşar Louisiana State University March 8 th, 2007 1 Roadmap Dynamic Loading & Linking Contiguous Memory Allocation Fragmentation

More information

Operating Systems CMPSC 473. Introduction January 15, Lecture 1 Instructor: Trent Jaeger

Operating Systems CMPSC 473. Introduction January 15, Lecture 1 Instructor: Trent Jaeger Operating Systems CMPSC 473 Introduction January 15, 2008 - Lecture 1 Instructor: Trent Jaeger About Me Trent Jaeger (PhD, University of Michigan) Associate Professor, CSE -- after 9 years at IBM Research

More information

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

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017 CS 471 Operating Systems Yue Cheng George Mason University Fall 2017 Introduction o Instructor of Section 002 Dr. Yue Cheng (web: cs.gmu.edu/~yuecheng) Email: yuecheng@gmu.edu Office: 5324 Engineering

More information

The Operating System. Chapter 6

The Operating System. Chapter 6 The Operating System Machine Level Chapter 6 1 Contemporary Multilevel Machines A six-level l computer. The support method for each level is indicated below it.2 Operating System Machine a) Operating System

More information

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13 I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of

More information

Operating System Security

Operating System Security Operating System Security Operating Systems Defined Hardware: I/o...Memory.CPU Operating Systems: Windows or Android, etc Applications run on operating system Operating Systems Makes it easier to use resources.

More information

Operating Systems: Internals and Design Principles. Chapter 4 Threads Seventh Edition By William Stallings

Operating Systems: Internals and Design Principles. Chapter 4 Threads Seventh Edition By William Stallings Operating Systems: Internals and Design Principles Chapter 4 Threads Seventh Edition By William Stallings Operating Systems: Internals and Design Principles The basic idea is that the several components

More information

Chapter 12: I/O Systems

Chapter 12: I/O Systems Chapter 12: I/O Systems Chapter 12: I/O Systems I/O Hardware! Application I/O Interface! Kernel I/O Subsystem! Transforming I/O Requests to Hardware Operations! STREAMS! Performance! Silberschatz, Galvin

More information

Chapter 13: I/O Systems

Chapter 13: I/O Systems Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance Silberschatz, Galvin and

More information

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition Chapter 12: I/O Systems Silberschatz, Galvin and Gagne 2011 Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS

More information

4. Concurrency via Threads

4. Concurrency via Threads CSC400 - Operating Systems 4. Concurrency via Threads J. Sumey Overview Multithreading Concept Background Implementations Thread States & Thread Switching Thread Operations Case Study: pthreads CSC400

More information

Process Characteristics. Threads Chapter 4. Process Characteristics. Multithreading vs. Single threading

Process Characteristics. Threads Chapter 4. Process Characteristics. Multithreading vs. Single threading Process Characteristics Threads Chapter 4 Reading: 4.1,4.4, 4.5 Unit of resource ownership - process is allocated: a virtual address space to hold the process image control of some resources (files, I/O

More information

Threads Chapter 5 1 Chapter 5

Threads Chapter 5 1 Chapter 5 Threads Chapter 5 1 Chapter 5 Process Characteristics Concept of Process has two facets. A Process is: A Unit of resource ownership: a virtual address space for the process image control of some resources

More information

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES OBJECTIVES Detailed description of various ways of organizing memory hardware Various memory-management techniques, including paging and segmentation To provide

More information

Exercise (could be a quiz) Solution. Concurrent Programming. Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - IV Threads

Exercise (could be a quiz) Solution. Concurrent Programming. Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - IV Threads Exercise (could be a quiz) 1 2 Solution CSE 421/521 - Operating Systems Fall 2013 Lecture - IV Threads Tevfik Koşar 3 University at Buffalo September 12 th, 2013 4 Roadmap Threads Why do we need them?

More information

Four Components of a Computer System

Four Components of a Computer System Four Components of a Computer System Operating System Concepts Essentials 2nd Edition 1.1 Silberschatz, Galvin and Gagne 2013 Operating System Definition OS is a resource allocator Manages all resources

More information

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapter 8: Main Memory. Operating System Concepts 9 th Edition Chapter 8: Main Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Segmentation Paging Structure of the Page Table Example: The Intel

More information

SMP T-Kernel Specification

SMP T-Kernel Specification SMP T-Kernel Specification Ver. 1.00.00 TEF021-S002-01.00.00/en February 2009 SMP T-Kernel Specification (Ver.1.00.00) TEF021-S002-01.00.00/en February 2009 Copyright 2006-2009 T-Engine Forum. All Rights

More information

Signals: Management and Implementation. Sanjiv K. Bhatia Univ. of Missouri St. Louis

Signals: Management and Implementation. Sanjiv K. Bhatia Univ. of Missouri St. Louis Signals: Management and Implementation Sanjiv K. Bhatia Univ. of Missouri St. Louis sanjiv@aryabhat.umsl.edu http://www.cs.umsl.edu/~sanjiv Signals Mechanism to notify processes of asynchronous events

More information

Chapter 5 Concurrency: Mutual Exclusion. and. Synchronization. Operating Systems: Internals. and. Design Principles

Chapter 5 Concurrency: Mutual Exclusion. and. Synchronization. Operating Systems: Internals. and. Design Principles Operating Systems: Internals and Design Principles Chapter 5 Concurrency: Mutual Exclusion and Synchronization Seventh Edition By William Stallings Designing correct routines for controlling concurrent

More information

Chapter 14 Operating Systems

Chapter 14 Operating Systems Chapter 14 Operating Systems Ref Page Slide 1/54 Learning Objectives In this chapter you will learn about: Definition and need for operating system Main functions of an operating system Commonly used mechanisms

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

Chapter 2: OS Structures

Chapter 2: OS Structures Chapter 2: OS Structures OS Structures 1 Operating System Services (1) One set of operating-system services provides functions that are helpful to the user (or user processes): User interface - almost

More information

GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III

GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATION SEMESTER: III Subject Name: Operating System (OS) Subject Code: 630004 Unit-1: Computer System Overview, Operating System Overview, Processes

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

Embedded Linux Architecture

Embedded Linux Architecture Embedded Linux Architecture Types of Operating Systems Real-Time Executive Monolithic Kernel Microkernel Real-Time Executive For MMU-less processors The entire address space is flat or linear with no memory

More information

Introduction To Operating System

Introduction To Operating System 1 Introduction To Operating System What is Operating System? An operating system is a program that controls the execution of application and acts as an interface between the user of a computer and the

More information

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure

More information

Embedded Systems. 6. Real-Time Operating Systems

Embedded Systems. 6. Real-Time Operating Systems Embedded Systems 6. Real-Time Operating Systems Lothar Thiele 6-1 Contents of Course 1. Embedded Systems Introduction 2. Software Introduction 7. System Components 10. Models 3. Real-Time Models 4. Periodic/Aperiodic

More information

Operating System Review

Operating System Review COP 4225 Advanced Unix Programming Operating System Review Chi Zhang czhang@cs.fiu.edu 1 About the Course Prerequisite: COP 4610 Concepts and Principles Programming System Calls Advanced Topics Internals,

More information

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

Chapter 6: An Introduction to System Software and Virtual Machines

Chapter 6: An Introduction to System Software and Virtual Machines Objectives Chapter 6: An Introduction to System Software and Virtual Machines Invitation to Computer Science, C++ Version, Third Edition In this chapter, you will learn about: System software Assemblers

More information

SNMP MIBs and Traps Supported

SNMP MIBs and Traps Supported This section describes the MIBs available on your system. When you access your MIB data you will expose additional MIBs not listed in this section. The additional MIBs you expose through the process are

More information

Typing Program For Mac Os X Adobe Flash

Typing Program For Mac Os X Adobe Flash Typing Program For Mac Os X 10.5 8 Adobe Flash Player Download, install or update Adobe Flash Player (Mac) - Plug-in plays 8. Thank you for your review. Free. Download Adobe Flash Player from Adobe Flash

More information

Comp 204: Computer Systems and Their Implementation. Lecture 18: Devices

Comp 204: Computer Systems and Their Implementation. Lecture 18: Devices Comp 204: Computer Systems and Their Implementation Lecture 18: Devices 1 Today Devices Introduction Handling I/O Device handling Buffering and caching 2 Operating System An Abstract View User Command

More information