Operating Systems and Systems Programming CS162 Teaching Staff.

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 management Information maintained by OS for process management  process context  process control block OS virtualization of CPU for each process.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
Operating Systems CS451 Brian Bershad
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Operating Systems and Systems Programming CS162 Teaching Staff.
Computer Science 162 Discussion Section Week 2. Agenda Recap “What is an OS?” and Why? Process vs. Thread “THE” System.
Computer Science 162 Section 1 CS162 Teaching Staff.
OS Spring’03 Introduction Operating Systems Spring 2003.
1 Chapter 4 Threads Threads: Resource ownership and execution.
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
OS Spring’04 Introduction Operating Systems Spring 2004.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
9/13/20151 Threads ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original slides.
CS 162 Discussion Section Week 1 (9/9 – 9/13) 1. Who am I? Kevin Klues Office Hours:
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Threads and Processes.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
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.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
CS 162 Discussion Section Week 2. Who am I? Haoyuan (HY) Li Office Hours: 1pm-3pm
CS 162 Discussion Section Week 2. Who am I? Wesley Chow Office Hours: 12pm-2pm 411 Soda Does Monday 1-3 work for everyone?
CS 162 Discussion Section Week 2 (9/16 – 9/20). Who am I? Kevin Klues Office Hours:
Introduction to Operating Systems and Concurrency.
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Department of Computer Science and Software Engineering
Lecture on Central Process Unit (CPU)
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.
12/2/091 What is an Operating System Andy Konwinski CS61CL Dec 2, 2009 Lecture 13 UCB CS61CL F09 Lec 13.
Threads. Readings r Silberschatz et al : Chapter 4.
Goals for Today How do we provide multiprogramming? What are Processes? How are they related to Threads and Address Spaces? Note: Some slides and/or pictures.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Threads by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Embedded Real-Time Systems
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
CS 162 Discussion Section Week 2. Who am I? Prashanth Mohan Office Hours: 11-12pm Tu W at.
Introduction to Operating Systems Concepts
Introduction to threads
Processes and threads.
CSCI 511 Operating Systems Chapter 3,4 (Part A) Processes and Threads
Chapter 1: A Tour of Computer Systems
Andy Wang COP 5611 Advanced Operating Systems
Process Management Presented By Aditya Gupta Assistant Professor
CS490 Windows Internals Quiz 2 09/27/2013.
Intro to Processes CSSE 332 Operating Systems
Java programming lecture one
Threads & multithreading
Chapter 4: Threads.
Operating System Concepts
COP 4600 Operating Systems Fall 2010
Operating Systems and Systems Programming
OPERATING SYSTEMS.
CSCI 511 Operating Systems Chapter 3,4 (Part A) Processes and Threads
Chapter 4: Threads.
Lecture Topics: 11/1 General Operating System Concepts Processes
Threads and Concurrency
Threads Chapter 4.
CSE 451: Operating Systems Winter 2003 Lecture 1 Course Introduction
Prof. Leonardo Mostarda University of Camerino
Operating Systems: A Modern Perspective, Chapter 6
CSE 153 Design of Operating Systems Winter 2019
CSE 451: Operating Systems Autumn 2003 Lecture 1 Course Introduction
Presentation transcript:

Operating Systems and Systems Programming CS162 Teaching Staff

Who am I? Wesley Chow Office Hours This and Next Week: SODA After that: Monday, TBD

Administrivia… No electronics in section please! Register on Piazza! Start getting to know Nachos and setting up your environment Group Signup by 1/31 11:59 PM Finalize preference of discussion sections (give at least 3 choices) All project members MUST attend same discussion section!!

Project Goals Learn to work in teams Use good engineering practices – Version control, collaboration – Requirements specification – Design Document – Implementation – Testing – [Performance, reliability,...] analysis Understand lecture concepts at the implementation level

Good Project Lifetime Day 0: Project released on course webpage Day 1 ‐ 13: Team meets, discusses and breaks up work on design and necessary prototyping Day 14: Initial design document due – Team reviews the document with TA Day 15: Implementation begins Day 20: Implementation is finished. Team switches to writing test cases. Design doc has been updated to reflect the implementation. Day 21: Iteration and performance analysis. Day 23: Team puts finishing touches on write up and gets to bed early.

A Note on Version Control Course provided SVN Private Github/Assembla/BitBucket account Inst Git Use what you prefer!

A computer boot sequence Hardware Operating System Memory Mgmt File Systems Scheduler …. BIOS Boot Loader Networks Application T1 T2 T3 T4

Project 1: Thread Programming

Project 2: Multiprogramming

Project 3: Key Value Store Key Value Store API Application Key 1 Value 1 Key 2 Value 2 Key 3 Value 3 Key 4 Value 4

Project 4: Distributed KV Store Key Value Store API Application Key 1 Value 1 Key 1 Value 1 Key 1 Value 1

What is an OS and What does it do?

Why do you want an OS? Isolation – Fault: “if my program crashes yours shouldn’t” – Performance: “if my program starts to do some massive computation, it shouldn’t starve yours from running” Mediation (multiplexing/sharing + protection) – Manage the sharing of hardware resources (CPU, NIC, RAM, disk, keyboard, sound card, etc) Abstractions and Primitives – Set of constructs and well‐defined interfaces to simplify application development: “all the code you didn’t write” in order to implement your application Because hardware changes faster than applications! Because some concepts are useful across applications

Why bother with an OS? User benefits – Efficiency (cost and performance) Share one computer across many users Concurrent execution of multiple programs – Safety OS protects programs from each other OS fairly multiplexes resources across programs Application benefits – Simplicity Sockets instead of ethernet cards – Portability Device independence: tiCOM card or Intel card?

Why is concurrency hard? What do you need to get concurrency working?

Concurrency Concurrency means multiple threads of computation can make progress, but possibly by sharing the same processor – Like doing homework while chatting on IM Why Concurrency? – Consider a web server: while it’s waiting for a response from one client, it could read a request for another client – Consider a browser: while it’s waiting for a response from a web server, it wants to react to mouse or keyboard input Concurrency increases/enables responsiveness

Different levels of abstraction Threads Processes Symmetric multithreading Distributed systems (Single system image)

What is a thread? A thread of execution is the smallest unit of processing that can be scheduled by an operating system. – Wikipedia circa Jan ‘12 What resources does a thread have?

Single and Multi Threading

What is the difference between a Thread and a Process?

What is a Process? Process Control Block

Process Address Space Program Address Space What is an address space? What does this mean in terms of hardware?

Operating System Memory Management Prog 1 Virtual Address Space 1 Prog 2 Virtual Address Space 2 Code Data Heap Stack Code Data Heap Stack Data 2 Stack 1 Heap 1 OS heap & Stacks Code 1 Stack 2 Data 1 Heap 2 Code 2 OS code OS data Translation Map 1Translation Map 2 Physical Address Space

When and how do you switch between processes?

Scheduling states

Context Switching

Fetch Exec R0 … R31 F0 … F30 PC … Data1 Data0 Inst237 Inst236 … Inst5 Inst4 Inst3 Inst2 Inst1 Inst0 Addr 0 Addr Recall (61C): What happens during execution? Execution sequence: –Fetch Instruction at PC –Decode –Execute (possibly using registers) –Write results to registers/mem –PC = Next Instruction(PC) –Repeat PC

Questions about the course…

Form Groups