Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Secure Operating Systems Lesson 2: OS Fundamentals.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6 Implementing Processes, Threads, and Resources.
© 2004, D. J. Foreman 1 O/S Organization. © 2004, D. J. Foreman 2 Topics  Basic functions of an OS ■ Dev mgmt ■ Process & resource mgmt ■ Memory mgmt.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Process Management. External View of the OS Hardware fork() CreateProcess() CreateThread() close() CloseHandle() sleep() semctl() signal() SetWaitableTimer()
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
1 Chapter 4 Threads Threads: Resource ownership and execution.
Chapter 6 Implementing Processes, Threads, and Resources.
OS Organization. OS Requirements Provide resource abstractions –Process abstraction of CPU/memory use Address space Concurrency Thread abstraction of.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Computer Organization
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Threads, Thread management & Resource Management.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
Chapter 1: Introduction and History  Where does the operating system fit in a computing system?  What does the operating system achieve?  What are the.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Operating System Organization Chapter 3 Michelle Grieco.
COP 4610 Introduction to Operating Systems. Chapter 1 - Introduction OS - Layer between the hardware and user programs (Figure 1.1) OS - The ultimate.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Threads, Thread management & Resource Management.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
2 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager.
What is a Process ? A program in execution.
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Introduction to Operating Systems Concepts
Virtualization.
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
Operating System Structure
OPERATING SYSTEMS CS3502 Fall 2017
Operating Systems: A Modern Perspective, Chapter 6
Operating System Structure
Introduction to Operating System (OS)
KERNEL ARCHITECTURE.
Recap OS manages and arbitrates resources
System Calls.
Chapter 15, Exploring the Digital Domain
Chapter 2: System Structures
Mid Term review CSC345.
Chapter 1 Introduction to Operating System Part 5
Lecture Topics: 11/1 General Operating System Concepts Processes
Threads Chapter 4.
Operating Systems: A Modern Perspective, Chapter 3
- When you approach operating system concepts there might be several confusing terms that may look similar but in fact refer to different concepts:  multiprogramming, multiprocessing, multitasking,
Implementing Processes, Threads, and Resources
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Outline Operating System Organization Operating System Examples
Outline Process Management Process manager Hardware process
Implementing Processes, Threads, and Resources
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05

What’s Covered Different Process and Thread Types Hardware Processes The Abstract Machine Interface Process Abstraction Thread Abstraction State Diagrams Resource Managers

What’s Covered Different Process and Thread Types Hardware Processes The Abstract Machine Interface

Processes Two Definitions of Process Classic Process: a program in execution in a von Neumann computer Modern Process: an OS abstraction that defines the execution environment for a thread or set of threads

Thread Definition: unit of computation with the minimal internal state and resources Threads keep track of code execution in a given process Modern operating systems are built with modern processes and threads in mind

The Abstract Machine The modern OS uses multiprogramming, the illusion that applications each reside inside of there own computer The OS manages the virtual machines, via services Services are invoked by calling API Functions

APIs API stands for Application Programming Interface API functions are implemented by different parts of the OS: Device Manager Process Manager Memory Manager File Manager

Adding Threads In a classic system, only one thread can be running per processor, the base thread In a modern OS, additional threads can share the host process’ resources When an abstract machine is given it’s own multiprogrammed OS, then it is a user space thread implementation the OS implements classic processes, and the user space thread library runs on top to simulate multiprocessing

Adding Threads Other modern OSs are built for threads, i.e. Windows, and support kernel threads When kernel threads are supported, the notions of threads and processes are completely separate by managing both as separate entities

Resources A resource is anything that a process can request If not available, the process is blocked A request for a resource is made via an API call Allocation results in the resource being configured for the abstract machine Each resource has a unique system-wide resource identifier

Process Address Space The process address space is the collection of addresses that a thread can reference Addresses link to memory locations or other abstract machine elements Memory-mapped resources - those resources bound to a collection of addresses in the address space The address space provides a uniform access method for getting memory-mapped resources

Processes Address Space Each resource manager must bind (associate, or link) addresses to resources The OS uses the address space system to control what processes have access to resources Modern OSs usually have 2 32 address (about 4GB worth,) with some supporting (or planning to support) 2 64 addresses

OS Families The abstract interface is determined by the host’s hardware and set of functions released by the OS The definition of an OS is important, both for how it works on the technical side and what software is available on the business side

Process Manager Responsibilities Process Creation and Termination Thread Creation and Termination Process/Thread Synchronization Resource Allocation Resource Protection Cooperation w/ Device Manager on IO Address Space Implementation

Final Process Composition Address Space Program Data Resources Process Identifier

Final Thread Composition Host Process Environment Thread Specific Data Thread Identifier

The Hardware Process When a system boots up, there are no distinctions like processes and threads On booting, all the computer knows is its basic hardware start up instructions, known as a bootstrap This single thread of execution is known as the hardware process

Bootstrap & Loader The bootstrap must execute first Executing the bootstrap leads to the loader, which starts loading the OS After loading, the OS can initialize, polling and initializing hardware and data structures Only after this can threads and processes be handled, by way of launching thread and process managers

Initial Structures When the OS loads, before normal execution can take place, an initial process and thread are created It acts as a placeholder for all of the other threads and processes, it actually does nothing This is also the idle thread (or idle process,) as this process is executed when no other processes are running

The Abstract Machine Interface In an OS, there are two types of instructions: user mode instructions and OS (supervisor mode) instructions This protects from a program being able to access resources completely unchecked When a certain resource is needed, or a system call is necessary, then a call must be made to the OS, which directs the call into the supervisor mode via a trap instruction

Comparing System Call Interfaces Linux Kernel version has 166 system functions Kernel version 2.4 has over 200 Win32 has over 2,000 The number of system calls increases the functionality of the OS, along with the overhead needed to run it

Source Nutt, Gary. Operating Systems. Boston: Pearson Education, 2004.