Last Week Introduced operating systems Discussed the Kernel

Slides:



Advertisements
Similar presentations
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
Advertisements

More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Previously… Processes –Process States –Context Switching –Process Queues Threads –Thread Mappings Scheduling –FCFS –SJF –Priority scheduling –Round Robin.
Chapter 6 Process Synchronization Bernard Chen Spring 2007.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores.
Mutual Exclusion.
CH7 discussion-review Mahmoud Alhabbash. Q1 What is a Race Condition? How could we prevent that? – Race condition is the situation where several processes.
CY2003 Computer Systems Lecture 05 Semaphores - Theory.
Operating Systems CMPSC 473 Mutual Exclusion Lecture 13: October 12, 2010 Instructor: Bhuvan Urgaonkar.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
1 CS318 Project #3 Preemptive Kernel. 2 Continuing from Project 2 Project 2 involved: Context Switch Stack Manipulation Saving State Moving between threads,
Concurrent Processes Lecture 5. Introduction Modern operating systems can handle more than one process at a time System scheduler manages processes and.
6/16/2015 Chapter Eight Process Synchronisation. Index Objectives Concurrent processes and Asynchronous concurrent processes Process synchronisation Mutual.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Chapter 11 Operating Systems
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
1 Race Conditions/Mutual Exclusion Segment of code of a process where a shared resource is accessed (changing global variables, writing files etc) is called.
QNX – A real-time operating system PRANSHU GUPTA CS550.
Object Oriented Analysis & Design SDL Threads. Contents 2  Processes  Thread Concepts  Creating threads  Critical sections  Synchronizing threads.
Threads in Java. History  Process is a program in execution  Has stack/heap memory  Has a program counter  Multiuser operating systems since the sixties.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Mutual Exclusion.
1 Announcements The fixing the bug part of Lab 4’s assignment 2 is now considered extra credit. Comments for the code should be on the parts you wrote.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 4.
CY2003 Computer Systems Lecture 04 Interprocess Communication.
15.1 Threads and Multi- threading Understanding threads and multi-threading In general, modern computers perform one task at a time It is often.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Ernest Cachia University of Malta “Designing Concurrency” Slide No. 1 - Title Slide Ernest Cachia CSA404 Designing Concurrency Software Engineering issues.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Operating Systems CMPSC 473 Signals, Introduction to mutual exclusion September 28, Lecture 9 Instructor: Bhuvan Urgaonkar.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
CE Operating Systems Lecture 8 Process Scheduling continued and an introduction to process synchronisation.
Real-time Software Design
Interprocess Communication Race Conditions
Multithreading / Concurrency
Resource Management IB Computer Science.
Topics Covered What is Real Time Operating System (RTOS)
Background on the need for Synchronization
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Operating Systems (CS 340 D)
Uniprocessor Scheduling
Concurrency.
IS310 Hardware & Network Infrastructure Ronny L
Day 25 Uniprocessor scheduling
Real-time Software Design
Operating Systems (CS 340 D)
Multithreading Chapter 23.
An Embedded Software Primer
COT 5611 Operating Systems Design Principles Spring 2014
Chapter 2: The Linux System Part 3
Midterm review: closed book multiple choice chapters 1 to 9
Threading And Parallel Programming Constructs
Lecture 2 Part 2 Process Synchronization
Grades.
Lesson Objectives Aims Key Words
Concurrency: Mutual Exclusion and Process Synchronization
Computer Science & Engineering Electrical Engineering
Chapter 10 Multiprocessor and Real-Time Scheduling
CSE 153 Design of Operating Systems Winter 19
CS333 Intro to Operating Systems
Chapter 6: Synchronization Tools
Linux Process State Scheduling information Identifiers
Process State Model -Compiled by Sheetal for CSIT
Chapter 3: Processes Process Concept Process Scheduling
Chapter 3: Process Management
Presentation transcript:

Last Week Introduced operating systems Discussed the Kernel Discussed the Shell Discussed single and multi-tasking systems

Processes Introduce the idea of processes Process states Communication between processes Process scheduling

Just for two minutes-apart from the program code what other information do you think you need to carry out the operation a program in a multitasking operating system?

A process consists usually of: an executable program, the data associated with the program, execution context. The execution context includes the processor context (see last weeks notes), but also information such as the process identifier, priority level, and a process state

Process is in one of three states Running Ready Blocked

If a timer interrupt occurs (Time-out on previous slide), When a process is in the running state, the processor is executing the program code. If a timer interrupt occurs (Time-out on previous slide), the running process is moved into ready state another process from the list of processes in the ready state is moved into the running state.

If a process in the running state requests an operating system service and it must wait for it, then the process is moved into the blocked state.

A process will remain in the blocked state until the event required has taken place, the process can then be moved back into the ready state. If a process is blocked the operating system is free to schedule another process.

Process Scheduling A simple approach is the Round robin Each process is forced to release control when its time is up. Sometimes called pre-emptive scheduling.

Interprocess communication A process sometimes needs to communicate with one or more other processes For example, when competing for shared resources or co-operating on joint tasks. The aim for a process to get sole control of a resource (mutual exclusion) when it needs it.

Mutual Exclusion Operating systems manages resources. A resource is pre-emptable if ownership of the resources can be taken away from one process, and pass to another. In other words if taking ownership is not critical to the process

Mutual Exclusion If this is not true, resource is critical. Mutual exclusion is concerned with ensuring that at any time, there is not more than one process in its critical section of its program code. Signalling between competing processes is needed.

Synchronisation Two processes needing co-ordinating their actions. For example, if two processes share a buffer in which one puts information in and the other removes data. Steps must taken to prevent a process removing data when the buffer is empty, or putting data into a buffer when it is full

One approach is to use flags indicating when a resources is available. A process checks the flag for a resource, if flag is not set, process sets the flag and uses the resource. A second process sees the flag is set and is in effect ‘locked-out’ until the flag is set. When the first process finishes with the resource the flag is reset.

What are the key-points Name at least four points, that you feel summarise the material in this session. Can you summarises some of these points in the form of diagrams?