ICS Principles of Operating Systems

Slides:



Advertisements
Similar presentations
CSC 360- Instructor: K. Wu Overview of Operating Systems.
Advertisements

Chapter 3 Process Description and Control
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
Processes CSCI 444/544 Operating Systems Fall 2008.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Phones OFF Please Processes Parminder Singh Kang Home:
ThreadsThreads operating systems. ThreadsThreads A Thread, or thread of execution, is the sequence of instructions being executed. A process may have.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication in Client-Server.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Process by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
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.
1  process  process creation/termination  context  process control block (PCB)  context switch  5-state process model  process scheduling short/medium/long.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
CS 162 Discussion Section Week 2. Who am I? Prashanth Mohan Office Hours: 11-12pm Tu W at.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
lecture 5: CPU Scheduling
Processes and threads.
Advanced Operating Systems CIS 720
Process Management Process Concept Why only the global variables?
Chapter 3: Process Concept
Topic 3 (Textbook - Chapter 3) Processes
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
CS 6560: Operating Systems Design
Operating Systems (CS 340 D)
OPERATING SYSTEMS CS3502 Fall 2017
Networks and Operating Systems: Exercise Session 2
Lecture Topics: 11/1 Processes Process Management
CS399 New Beginnings Jonathan Walpole.
Chapter 4: Multithreaded Programming
Process Management Presented By Aditya Gupta Assistant Professor
Processes Overview: Process Concept Process Scheduling
Chapter 3: Process Concept
Intro to Processes CSSE 332 Operating Systems
Operating Systems (CS 340 D)
CPU Scheduling.
Process management Information maintained by OS for process management
Chapter 3 Process Management.
ICS 143 Principles of Operating Systems
Lecture 2: Processes Part 1
ICS 143 Principles of Operating Systems
CGS 3763 Operating Systems Concepts Spring 2013
Introduction What is an operating system bootstrap
CS 143A Quiz 1 Solution.
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Process & its States Lecture 5.
Mid Term review CSC345.
Chapter 3: Processes.
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 10 Operating Systems.
Processes and Process Management
Chapter 3: Processes.
CSE 451: Operating Systems Winter 2003 Lecture 4 Processes
CS510 Operating System Foundations
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Chapter 3: Processes Process Concept Process Scheduling
Chapter 3: Process Concept
CSE 153 Design of Operating Systems Winter 2019
Presentation transcript:

ICS 143 - Principles of Operating Systems Discussion 3 - HW1 review & CPU Scheduling Joe Nash jmnash@uci.edu

Outline Homework 1 Solutions - will be posted Lecture 6 - CPU Scheduling Review

General Strategies Ctrl-f lecture notes Google question Piazza

Don’t do this

Homework 1 Q1 Polling/Interrupt definition - Lecture 1 page 66 How many machine instructions can be executed in the time it takes a character to be typed? Arithmetic Interrupts are Asynchronous Traps are software generated interrupts. Lecture 1 page 89

Homework 1 Q2 Multiprogramming vs timesharing - Definition Lecture 1 page 67/68 Distributed computing systems Resources distributed over multiple machines Cloud computation, distributed databases, sensor nets

Homework 1 Q2 continued C. Discussion 1 page 20 Hard real-time = deadline missed -> failure Soft real-time = deadline missed -> performance lost Non-Real time = deadline missed -> nothing lost Spotify = soft Android UI = soft Cruise control = hard HF trading = hard

Homework 1 Q3 For each of the brief description about the following system calls used in Unix, write the name of the system call and its parameters. (Hint: Use the man pages.) Read from a file descriptor --- ssize_t read(int fd, void *buf, size_t count); Wait for process termination --- pid_t wait(int *status); Create a child process (fork) --- pid_t fork(void); Suppose you want to write a program that opens the file passed to it on the command line (argv[1]) and writes another file back out (with the same contents). List 3 system calls that will be used in this program. Any three of the following would be fine: open, read, write, close For each of the following operations, indicate whether they should be privileged or not by checking ☒ the appropriate boxes. Yes No Searching a string for a particular sequence X Generate an interrupt Process hardware interrupt Check list of currently running processes Access network card buffer

Homework 1 Q4 Lecture ¾ page 14-15 Lecture ¾ page 7 PCB Yes No CPU registers X Number of processes Program counter Process id File permissions

Homework 1 Q5 Why is that threads are faster to create than processes? Create process -> allocate memory for the process and create a process control block. Create thread -> create a much smaller thread control block. Suggests one application that benefit from the use of threads Multiple tasks at once Web crawler, FTP, matrix multiplication Distinguish between user-level threads and kernel-level threads in terms of cost of switching. Which of these is more expensive to switch? Switching between user-level threads is cheaper because there is no context switch. Indicate which of these resources are shared among the threads Shared Private Memory (Heap) X Program counter Execution stack Global variables

Interprocess Communication Message passing Send/Receive Shared memory Producer/Consumer Buffer

CPU Scheduling First Come First Serve Round Robin Shortest Job First (SJF) preemptive & non-preemptive When do they perform well? Run them from inputs

When do the scheduler algos perform badly? First Come First Serve Badly - long jobs first Round Robin Badly - many jobs same length Shortest Job First (SJF) Badly - many short jobs, runtime unpredictable Not exhaustive

Running the Schedulers Given Create

Finished Questions?