- 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,

Slides:



Advertisements
Similar presentations
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
Advertisements

©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
Operating Systems Lecture 3
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.
Processes Part I Processes & Threads* *Referred to slides by Dr. Sanjeev Setia at George Mason University Chapter 3.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 1: Introduction.
Operating system Structure and Operation by Dr. Amin Danial Asham.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 OS 1.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
SMP Basics KeyStone Training Multicore Applications Literature Number: SPRPxxx 1.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Chapter 2 Operating System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Chapter 4 – Thread Concepts
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Processes and threads.
Process Management Process Concept Why only the global variables?
Operating Systems : Overview
Sarah Diesburg Operating Systems COP 4610
Sujata Ray Dey Maheshtala College Computer Science Department
OPERATING SYSTEMS CS3502 Fall 2017
Lecture Topics: 11/1 Processes Process Management
Chapter 4 – Thread Concepts
Chapter 4 Threads.
IS310 Hardware & Network Infrastructure Ronny L
KERNEL ARCHITECTURE.
Operating Systems CPU Scheduling.
Operating Systems : Overview
Chapter 15, Exploring the Digital Domain
Operating Systems Bina Ramamurthy CSE421 11/27/2018 B.Ramamurthy.
Chapter 26 Concurrency and Thread
Operating Systems.
Multithreading.
Operating Systems : Overview
Process Description and Control
Lecture 2 Part 2 Process Synchronization
Operating Systems : Overview
Threads Chapter 4.
Operating Systems : Overview
Operating Systems : Overview
Dr. Mustafa Cem Kasapbaşı
Operating Systems : Overview
Sujata Ray Dey Maheshtala College Computer Science Department
Process Description and Control
Multithreaded Programming
Concurrency: Mutual Exclusion and Process Synchronization
Process Description and Control
Operating Systems : Overview
Process Description and Control
Process Description and Control
Operating Systems : Overview
Operating Systems : Overview
Process Description and Control
Operating System Introduction.
Operating Systems : Overview
Operating Systems : Overview
CS510 Operating System Foundations
CS333 Intro to Operating Systems
Chapter 6: Synchronization Tools
Chapter 2 Operating System Overview
Chapter 3: Processes Process Concept Process Scheduling
Operating System Overview
Chapter 3: Process Management
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

- 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, and multithreading. - In a modern computing system, there are usually several concurrent application processes which compete for (few) resources like, for instance, the CPU. The Operating System (OS), is responsible for the effective and efficient allocation of those resources. - Generally speaking, the OS module which handles resource allocation is called scheduler. On the basis of the type of OS to be realized, different scheduling policies may be implemented.

Multiprogramming The main idea of multiprogramming is to maximize the use of CPU time. Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be accomplished). Then, the OS may interrupt that process and give the control to one of the other in-main-memory programs that are ready to execute (i.e. process context switching). In this way, no CPU time is wasted by the system waiting for the I/O task to be completed, and a running process keeps executing until either it voluntarily releases the CPU or when it blocks for an I/O operation. Therefore, the ultimate goal of multiprogramming is to keep the CPU busy as long as there are processes ready to execute.

Multiprogramming In order for such a system to function properly, the OS must be able to load multiple programs into separate areas of the main memory and provide the required protection to avoid the chance of one process being modified by another one. Another issue that needs to be handled as well is that large programs may not fit at once in memory which can be solved by using pagination and virtual memory. Finally, note that if there are N ready processes and all of those are highly CPU-bound (i.e., they mostly execute CPU tasks and none or very few I/O operations), in the very worst case one program might wait all the other N-1 ones to complete before executing .

Multiprocessing Multiprocessing refers to the hardware (i.e., the CPU units) rather than the software (i.e., running processes). If the underlying hardware provides more than one processor then that is multiprocessing. A system can be both multiprogrammed by having multiple programs running at the same time and multiprocessing by having more than one physical processor.

Multitasking A task in a multitasking operating system is not a whole application program , as in multiprogramming, but it refers to a “thread of execution” when one process is divided into sub-tasks. Both multiprogramming and multitasking operating systems are (CPU) time sharing systems. However, while in multiprogramming (older OSs) one program as a whole keeps running until it blocks, in multitasking (modern OSs) time sharing is best manifested because each running process takes only a fair quantum of the CPU time.

Multithreading Multithreading is an execution model that allows a single process to have multiple code segments (i.e., threads) run concurrently within the “context” of that process. You can think of threads as child processes that share the parent process resources but execute independently. When two or more threads try to access and modify a shared resource (race conditions), the programmer must be sure this will not leave the system in an inconsistent or deadlock state. Typically, this thread synchronization is solved using OS primitives, such as mutexes and semaphores.