Copyright © 2005 - Curt Hill More on Operating Systems Continuation of Introduction.

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

Chapter 3 Process Description and Control
Process Description and Control Chapter 3. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
CSCE 351: Operating System Kernels
OS Spring’03 Introduction Operating Systems Spring 2003.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Chapter 11 Operating Systems
Computer Organization and Architecture
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Process Description and Control A process is sometimes called a task, it is a program in execution.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Phones OFF Please Processes Parminder Singh Kang Home:
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Chapter 3 Process Description and Control
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
What is an Operating System? The OS is a program – Permit easy access, control hardware, communicate between user and software, user and hardware, software.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Operating Systems Process Management.
6 Memory Management and Processor Management Management of Resources Measure of Effectiveness – On most modern computers, the operating system serves.
Computer Studies (AL) Operating System Process Management - Process.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
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 Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
CS 390 Unix Programming Environment
Copyright © Curt Hill Operating Systems An Introductory Overview.
Copyright © Curt Hill The Evolution of Operating Systems Pre-OS to Modern.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Copyright © 2007 by Curt Hill Interrupts How the system responds.
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
Processes 2 Introduction to Operating Systems: Module 4.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Process Control Management Prepared by: Dhason Operating Systems.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Processes and threads.
Process Management Process Concept Why only the global variables?
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
William Stallings Computer Organization and Architecture
Intro to Processes CSSE 332 Operating Systems
Process management Information maintained by OS for process management
Process & its States Lecture 5.
Operating Systems.
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Process Description and Control
CPU SCHEDULING.
CPU scheduling decisions may take place when a process:
Threads Chapter 4.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Presentation transcript:

Copyright © Curt Hill More on Operating Systems Continuation of Introduction

Copyright © Curt Hill Multiprocessing Using multiple hardware processors to increase executable speed Most mainframe and minicomputers have multiple processors –Usually have one CPU –One or more I/O processors –Usually we think of multiple independent CPUs though in this context The main sticking point here is processor communication Suppose that I have two CPUs that share memory –Somehow we need to guarantee no concurrency errors

Copyright © Curt Hill Resource Allocation Single process OS The machine is divided between the application and the system When the system is running it knows that the application is suspended waiting for it to finish Very easy - if it wants it and we have it, it gets it

Copyright © Curt Hill Resource Allocation Multiple process - much more complicated, but gives greater abilities to the designer and user The strategy is then to give a process to each thing that needs management The process would be given control, check if action needs to be taken, if not go back to sleep, if so do it and then go to sleep The sleep command is basically just put yourself back on the dispatchers list

Copyright © Curt Hill Processor management and Process control Every program becomes a process but not every process is a program Every process has some characteristics A status: running, ready, blocked –Blocked Some event must occur to allow continuation Typical things include waiting for I/O or other service to be satisfied

Copyright © Curt Hill Other process characteristics: Memory that it can access, both code and data –One program may have several processes, which share the programs code and data Files and devices of the process –This allocation may be to either the program or the process Accounting information –The process and the program are initiated by some account –Various chargeable resources are consumed by it Priority and privileges

Copyright © Curt Hill Scheduling Three types Non pre-emptive Permissive Pre-emptive

Copyright © Curt Hill Non Pre-emptive Scheduling The process gives up the CPU when it has no further use for it –Done –Waiting for a event to occur Any interrupts that occur always return to the current process This is the form most versions of DOS used

Copyright © Curt Hill Permissive Scheduling Allow the process to keep the CPU until one of two things occur: They are done or waiting for an event –Similar to non pre-emptive They make any system call There is the notion of any interrupt not necessarily returning to the active process This is the form used by Window 3 and previous

Copyright © Curt Hill Pre-emptive Scheduling A time slice (clock timer interrupt) occurs –The process is put on the ready queue and another started –There is no dependence on the process being well behaved This is used by most higher level OSs such as UNIX, Windows 95, Window NT and OS/2

Copyright © Curt Hill Dispatching Suppose a process terminates or moves from running to blocked state A very important part of the OS is the dispatcher This finds the new task to run or resume Which process gets CPU next? There are a number of algorithms to determine who gets the next shot First come first served Shortest time remaining

Copyright © Curt Hill Task selection criteria Priority –Some processes are more important so we give them more shots How did the process give up the CPU? –It may be better to favor those processes that were blocked by service requests over those that were time sliced A process that does a function call to the supervisor allows something else to be scheduled –Every service request allows other processes to continue, but there is one specifically for allowing other tasks, that does no service except run the dispatcher

Copyright © Curt Hill Memory management The goals of memory management include: Utilize the CPU well by allowing as many processes as possible to be active Allow flexibility of memory usage by programs Protect processes from each other, so that no process can examine or alter another process’s memory

Copyright © Curt Hill Memory map Starting at low memory, the usual memory map has Nucleus or kernel –Resident routines –The service layer may be here or in transients depending on its need Application Free space Transients (if needed)

Copyright © Curt Hill Memory utilization Once the nucleus size is established All that is needed is to load applications at the right address –By a relocating loader The command interpreter could load at the same place as the applications

Copyright © Curt Hill Partitions The next step is to partition the application area and free space into fixed size pieces, called partitions –It is possible to collapse two adjacent partitions into one if the program requires –Fragmentation occurs here because programs are not the exact sizes that the partitions have The next step is to make the partitions variable sized –This can allow memory to be fragmented, but the fragmentation is short lived since when the thing above finishes the two free spaces become one To get much better requires virtual memory

Copyright © Curt Hill Protection There has to be some mechanism in a multitasking system that each program can only access its own memory and not the memory of others

Copyright © Curt Hill System 360 Protection The 360 had a protection key Each user got a key 0-15 You couldn’t change your key, nor did you even know it before hand The PSW had the key in it The system used key 0, which gave it the ability to access any memory Each 1K (or so) block of memory had its own key Any access or change of a block of memory by a PSW with any key but the right one or zero caused a protection fault and the program was aborted –These were usually caused by invalid instructions, wild subscipts, bad pointers and the like

Copyright © Curt Hill An aside about queues Operating systems have a plethora of queues, some of which should be considered Virtually every resource has a queue of demands on that resource The resource producer gets the request, removing the item from the queue –They usually put it back on another queue The processing of the request is usually not instantaneous, but rather taking time, so it may be in a holding state during process

Copyright © Curt Hill Queues present Print queue –Based upon form, kind of printer, location of printer etc Processes –Ready to run but waiting for a processor - ready status –There also exists a group of processes that are waiting for some service or communication - blocked status –There also exists a group of processes that are currently running - running status –The latter two are not strictly speaking queues, since it is not usually the first one in line that exits first

Copyright © Curt Hill More queues Disk drive requests –Each read and write becomes a separate request for a particular drive and or channel –In a single processing system this is not needed since we never generate a second until the first is done, but in multitasking we may generate many such requests –Each device that can be shared has a similar queue to that of the above Jobs waiting to run –This queue may be partitioned according to classes of resources needed There are others as well