Kernel Services. System Processes in Traditional Unix. Kernel Processes in FreeBSD 5.x CIS 657. swapper. Three processes created at startup time init
|
|
- Bertram Golden
- 6 years ago
- Views:
Transcription
1 Kernel ervices CI 657 ystem Processes in Traditional Unix Three processes created at startup time init process 1 user-mode administrative tasks (keeps getty running; shutdown) ancestor of all of your processes till in FreeBD swapper process 0 kernel process moves entire processes between main memory and secondary storage pagedaemon process 2 kernel process moves parts of processes in and out Kernel Processes in FreeBD 5.x idle uns when there are no other ready procs swapper Moves processes from secondary storage -> main memory vmdaemon Moves processes from main memory -> secondary storage pagedaemon Writes portions of a process s s address space to storage pagezero upplies zero-filled pages bufdaemon upplies clean buffers (by writing out dirty buffers) 1
2 Kernel Processes in FreeBD 5.x (II) syncer Ensures dirty file data written within 30 seconds ktrace Logs system call trace records to a log file vnlru Maintains supply of free vnodes (LU) random eeds kernel random numbers and /dev/random g_event Handles dynamic devices g_up Data from device drivers -> processes g_down Data from processes -> device drivers Note on Init and Logging In init keeps a getty process running on each terminal port (tty( tty) getty initializes the port and waits for a login name (the login: login: prompt) getty reads a string and execs login login prompts for the password, performs one- way encryption, and compares values if successful, login sets the user id and execs a shell Top Half un-time Organization per-process stack library of shared code maintains process structure (always resident) maintains user structure (can be swapped out) division between process/user dependent on memory never preempted for another process (but can yield the processor) can block interrupts by setting processor priority level (see discussion on bottom half) 2
3 un-time Organization II Bottom Half handles hardware interrupts asynchronous activities (wrt( Top Half) special kernel stack (might not be a process running) Top and bottom half coordinate around work queues using mutexes top half starts I/O requests, waits for bottom half to finish Entry Into the Kernel Hardware interrupt I/O device (disks, network cards, etc.) clock (used for scheduling, time of day) Hardware trap divide by 0, illegal memory reference oftware-initiated trap system call Entry Into the Kernel II First, kernel must save machine state Why? Example sequence hardware switches to kernel mode hardware pushes onto per-process kernel stack the PC, PW, trap info additional asm routine saves all other state that the hardware doesn t kernel calls a C routine--the handler. 3
4 Entry Into the Kernel III Handlers for each kind of entry: syscall() for a system call trap() for hardware traps interrupt handlers for devices Each kind of handler takes specific parameters (e.g., syscall number, exception frame; or the unit number for an interrupt). eturn From Kernel asm routine restores registers and user stack pointer (it undoes what the companion asm routine did) hardware restores the stored PC, PW, etc. (undoes what it did on the way in) execution returns at the next instruction in the user process oftware Interrupts Used as low-priority processing mechanism in the kernel Hardware interrupts have high priority Can put work in work queues (cf. network) When high-priority work is done, low-priority software interrupt does the rest might be real interrupt, might be flag checked in kernel (architecture-dependent) can be preempted by another hardware interrupt 4
5 Priority Levels in FreeBD 5.2 High-priority hardware interrupt creates work for lower-priority software interrupt Work queues oftware interrupt routines lower priority than device drivers; higher than user processes Hardware interrupt > software interrupt > user Example: Network Packets Device driver (hardware interrupt) takes packets from network, puts them in a work queue; controller re-enabled oftware interrupt handler moves packets from work queues to destination processes Thus, delivery to processes doesn t block packets coming in from the network What FreeBD 4.4 Did for x86 The cpl variable holds the current priority level Various macros are defined to set the cpl to a new level (e.g. spl0(), splx(), spltty()) Interrupts at lower levels are masked (but not really--a pending bit is set and the majority of the work handling the interrupt is deferred) ee /usr/src/sys/i386/isa/ipl_funcs.c Homework: find out (and submit) what FreeBD does (you may work with your lab partner). 5
6 Clock Interrupts The system clock interrupts, or ticks, at regular intervals (usually 100 Hz). Interrupt handler calls the hardclock() routine, which must run quickly running for more than one tick will miss the next interrupt, causing the time-of-day clock to skew lower-priority devices (network devices, disk controllers) cannot be serviced while hardclock() is running. Non-critical clock functions handled by softclock() The Four Clocks Hardclock: hardware timer, 100 Hz. oftclock: : handles non-critical timing work Profclock: profiling clock (collect process performance information), 1024 Hz. tatclock: collects system statistics, 128 Hz. Clock Interrupts: What hardclock() does check for an interval timer on the currently running process increment the time of day do the job of profclock() if there is no spparate profiling clock do the job of statclock() if there is no separate clock for statistics gathering call softclock() directly if the cpl is low (saves overhead of a software interrupt that would just do that when hardclock() returns) 6
7 tatistics Historically, hardclock() collected resource utilization statistics, and forced context switches Problems (see McCanne & Torek) potential for inaccurate measurement of CPU utilization inaccurate profiling Use semi-randomized sampling with a second clock (the stat clock, see statclock()) charge the current process with a tick; if it has four, recalculate priority record what the system was doing at time of tick oftclock() Handles events in the callout queue, such as: timeouts (real-time timer) retransmits dropped network packets monitors some peripherals that require polling process scheduling cheduler would/should be called every second in a perfect world; uses interval timer to run 1 second after it last finished Discussion: why not do scheduling in hardclock()? Callout Queue A circular list of n queues; sorted by time of event (in ticks) Each queue sorted in time order (soonest first) Pointer to current queue (now( now) ) moves around circular list hardclock() advances pointer, and softclock runs when the lead item in the new queue has time 0. 7
8 Example Callout Queue (200 queues in example) now +199 now now + 1 now now+200 now f(x) g(y) f(z) now + 2 now + 3. now + 2 h(x) Question: does f(z) happen this cycle, or next? Memory Management Two kinds of executable files in BD Unix interpreted compiled (directly executed) First 16 bits in a file contain a magic number telling what kind of file it is. #! indicates an interpreted file; interpreter must be directly executable (#!/bin/sh is the most common) Other magic numbers indicate whether the file can be paged and whether the text is sharable. 0xfff x FreeBD Process Layout pecial stuff... User stack shared libs heap bss initialized data text 0-filled bss,, stack most of process is demand paged into memory (Ch. 5) ymbol table Initialized data text elf header elf magic number 8
9 What Was That pecial tuff? Per-process kernel stack ed zone User area Ps_strings struct ignal code Env strings argv strings Env pointers argc argv pointers Argv, argc, envp contain arguments and environment signal code used by kernel to deliver signals ps_strings used by ps to located argv of process Timing ervices eal Time: gettimeofday() returns the time since 1 Jan 1970 in UTC (the Epoch) adjtime() allows one to tweak the clock keeps multiple machines close enough response to normal clock skew give a delta argument; speed up or slow down the counted microseconds per clock tick by 10% until delta is reached Time is reported in microseconds Interval Timers Each process gets three interval timers real: decrements in real time; IGALM; run from timeout queue maintained by softclock() profiling: decrements only when process runs, but tracks both user and kernel-mode execution; IGPOF; checked by profclock() process virtual: decrements only when the process is running; IGVTALM; checked by profclock() 9
10 User, Group, Other Identifiers User ID (uid( uid): 32-bit identifier for all processes of each user, set by administrator Group ID (gid( gid): 32-bit identifier. Many users in one group; many groups for each user oot: uid 0, gid 0. These bits are checked on file access Permission Checks Checked in order If the UID F == UID P use owner permission bits If UID F!= UID P, but GID F GID P then use group permission bits If UID F!= UID P, and GID F GID P then use the other permission bits ecall discussion last time of how uid, gid set on login Can I own a file that I can t t read? ights Amplification Users may need temporary write access on files (e.g. passwd) setuid() does this changes effective user id real user id stays the same effective uid also saved seteuid() changes only the effective user id setgid() used to work like setuid() now just put effective gid into 0th element of array 10
11 Effects of yscalls on UIDs Action eal Effective aved Exec-normal Exec-setuid eteuid() eteuid() eteuid() Exec-normal = eal UID, = pecial-privilege UID 11
Kernel Services CIS 657
Kernel Services CIS 657 System Processes in Traditional Unix Three processes created at startup time init process 1 user-mode administrative tasks (keeps getty running; shutdown) ancestor of all of your
More informationPROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)
MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications
More informationCS 104 Computer Organization and Design
CS 104 Computer Organization and Design Exceptions and Interrupts CS104: Exceptions and Interrupts 1 Exceptions and Interrupts App App App System software Mem CPU I/O Interrupts: Notification of external
More informationProcesses and Non-Preemptive Scheduling. Otto J. Anshus
Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency
More informationCPS221 Lecture: Operating System Protection
Objectives CPS221 Lecture: Operating System Protection last revised 9/5/12 1. To explain the use of two CPU modes as the basis for protecting privileged instructions and memory 2. To introduce basic protection
More informationCS 111. Operating Systems Peter Reiher
Operating System Principles: Processes, Execution, and State Operating Systems Peter Reiher Page 1 Outline What are processes? How does an operating system handle processes? How do we manage the state
More informationProcess Scheduling Queues
Process Control Process Scheduling Queues Job queue set of all processes in the system. Ready queue set of all processes residing in main memory, ready and waiting to execute. Device queues set of processes
More informationOS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed
Process Management CS 537 Lecture 3: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units
More informationOperating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1
ITS 225: Operating Systems Operating Systems Lecture 1 Introduction & Overview Jan 15, 2004 Dr. Matthew Dailey Information Technology Program Sirindhorn International Institute of Technology Thammasat
More informationCS 111. Operating Systems Peter Reiher
Operating System Principles: Processes, Execution, and State Operating Systems Peter Reiher Page 1 Outline What are processes? How does an operating system handle processes? How do we manage the state
More informationwww nfsd emacs lpr Process Management CS 537 Lecture 4: Processes Example OS in operation Why Processes? Simplicity + Speed
Process Management CS 537 Lecture 4: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units
More informationPROCESS STATES AND TRANSITIONS:
The kernel contains a process table with an entry that describes the state of every active process in the system. The u area contains additional information that controls the operation of a process. The
More informationProcess Description and Control. Chapter 3
Process Description and Control 1 Chapter 3 2 Processes Working definition: An instance of a program Processes are among the most important abstractions in an OS all the running software on a computer,
More informationWhat is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?
What is an Operating System? A Whirlwind Tour of Operating Systems Trusted software interposed between the hardware and application/utilities to improve efficiency and usability Most computing systems
More informationNoorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions
Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions 1. What are the different parts of UNIX system? i. Programs
More informationThe Kernel Abstraction. Chapter 2 OSPP Part I
The Kernel Abstraction Chapter 2 OSPP Part I Kernel The software component that controls the hardware directly, and implements the core privileged OS functions. Modern hardware has features that allow
More informationMidterm Exam CPS 210: Operating Systems Spring 2013
Your name: Sign for your honor: Midterm Exam CPS 210: Operating Systems Spring 2013 The last page of this exam is a list of terms used in this class, and whose meanings you should know. You may detach
More informationChapter 9: Virtual Memory
Chapter 9: Virtual Memory Silberschatz, Galvin and Gagne 2013 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
More informationLinux System Administration
System Processes Objective At the conclusion of this module, the student will be able to: Describe and define a process Identify a process ID, the parent process and the child process Learn the PID for
More informationELEC 377 Operating Systems. Week 12 Class 2
ELEC 377 Operating Systems Week 12 Class 2 Admin Lab 4/5 Will be marked shortly Quiz #3 returning today Today Unix History What is a Root Kit? Root Kit is software to hide the evidence of system modification
More informationChapter 8: Virtual Memory. Operating System Concepts Essentials 2 nd Edition
Chapter 8: Virtual Memory Silberschatz, Galvin and Gagne 2013 Chapter 8: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
More informationHardware OS & OS- Application interface
CS 4410 Operating Systems Hardware OS & OS- Application interface Summer 2013 Cornell University 1 Today How my device becomes useful for the user? HW-OS interface Device controller Device driver Interrupts
More informationProcess management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)
Process management CSE 451: Operating Systems Spring 2012 Module 4 Processes Ed Lazowska lazowska@cs.washington.edu Allen Center 570 This module begins a series of topics on processes, threads, and synchronization
More informationProcesses. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?
Processes Process Management Chapter 3 1 A process is a program in a state of execution (created but not terminated) Program is a passive entity one on your disk (survivor.class, kelly.out, ) Process is
More informationIT 540 Operating Systems ECE519 Advanced Operating Systems
IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (3 rd Week) (Advanced) Operating Systems 3. Process Description and Control 3. Outline What Is a Process? Process
More informationOS lpr. www. nfsd gcc emacs ls 9/18/11. Process Management. CS 537 Lecture 4: Processes. The Process. Why Processes? Simplicity + Speed
Process Management CS 537 Lecture 4: Processes Today: processes and process management what are the OS units of execution? how are they represented inside the OS? how is the CPU scheduled across processes?
More informationUNIX Memory Management Interview Questions and Answers
UNIX Memory Management Interview Questions and Answers 1. What is the difference between Swapping and Paging? Swapping: Whole process is moved from the swap device to the main memory for execution. Process
More informationOperating System Review
COP 4225 Advanced Unix Programming Operating System Review Chi Zhang czhang@cs.fiu.edu 1 About the Course Prerequisite: COP 4610 Concepts and Principles Programming System Calls Advanced Topics Internals,
More informationCS 537 Lecture 2 - Processes
CS 537 Lecture 2 - Processes Michael Swift 1 Basic Structure Kernel is a big program that starts when you boot your program Has full access to physical hardware. User programs, utilities, services see
More informationTHE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7
THE PROCESS ABSTRACTION CS124 Operating Systems Winter 2015-2016, Lecture 7 2 The Process Abstraction Most modern OSes include the notion of a process Term is short for a sequential process Frequently
More informationCSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476
CSE 451: Operating Systems Winter 2015 Module 4 Processes Mark Zbikowski mzbik@cs.washington.edu Allen Center 476 2013 Gribble, Lazowska, Levy, Zahorjan Process management This module begins a series of
More information19: I/O Devices: Clocks, Power Management
19: I/O Devices: Clocks, Power Management Mark Handley Clock Hardware: A Programmable Clock Pulses Counter, decremented on each pulse Crystal Oscillator On zero, generate interrupt and reload from holding
More informationUNIX 2 OPERATING SYSTEM
UNIX 2 OPERATING SYSTEM hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: Process management in Solaris. omponents of the operating system. Flow of control within the operating
More informationChapter 9: Virtual-Memory
Chapter 9: Virtual-Memory Management Chapter 9: Virtual-Memory Management Background Demand Paging Page Replacement Allocation of Frames Thrashing Other Considerations Silberschatz, Galvin and Gagne 2013
More informationProcess Concept. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.
Process Concept Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered Process Concept Definition, states, PCB Process Scheduling Scheduling queues,
More informationCommon Computer-System and OS Structures
Common Computer-System and OS Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture Oct-03 1 Computer-System Architecture
More informationProcesses. Dr. Yingwu Zhu
Processes Dr. Yingwu Zhu Process Growing Memory Stack expands automatically Data area (heap) can grow via a system call that requests more memory - malloc() in c/c++ Entering the kernel (mode) Hardware
More informationProcesses and Threads. Processes and Threads. Processes (2) Processes (1)
Processes and Threads (Topic 2-1) 2 홍성수 Processes and Threads Question: What is a process and why is it useful? Why? With many things happening at once in a system, need some way of separating them all
More informationCS 355 Operating Systems. Keeping Track of Processes. When are processes created? Process States 1/26/18. Processes, Unix Processes and System Calls
CS 355 Operating Systems Processes, Unix Processes and System Calls Process User types command like run foo at keyboard I/O device driver for keyboard and screen Command is parsed by command shell Executable
More informationLecture 4: Mechanism of process execution. Mythili Vutukuru IIT Bombay
Lecture 4: Mechanism of process execution Mythili Vutukuru IIT Bombay Low-level mechanisms How does the OS run a process? How does it handle a system call? How does it context switch from one process to
More informationby I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS
by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests
More informationDesign Overview of the FreeBSD Kernel CIS 657
Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler (2%
More informationDesign Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?
Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler
More informationInstruction Cycle. Computer-System Architecture. Computer-System Operation. Common Functions of Interrupts. Chapter 2: Computer-System Structures
Summary Operating Systems evolved through stages Resident monitors Multiprogrammed batch systems Time-shared multiuser systems Desktop systems Specialized operating systems (real-time, handheld, parallel
More informationRequirements, Partitioning, paging, and segmentation
Requirements, Partitioning, paging, and segmentation Main Memory: The Big Picture kernel memory proc struct kernel stack/u area Stack kernel stack/u area Stack kernel stack/u area Stack Data Text (shared)
More informationfork, exec and the shell (1) Classic Processes (CSE 422S) waitpid fork, exec and the shell (2) Ken Wong Washington University
Classic Processes (CSE 422S) Ken Wong Washington University kenw@wustl.edu www.arl.wustl.edu/~kenw fork, exec and the shell (1) Example: Interactive Commands Your interactive shell (tcsh, bash) interprets
More informationOPERATING SYSTEM OVERVIEW
OPERATING SYSTEM OVERVIEW Contents Basic hardware elements Interrupts Most I/O devices are much slower than the processor Active waiting cycle (polling) Interrupt request signal Interrupt mechanism An
More informationProcesses Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.
Processes Prof. James L. Frankel Harvard University Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. Process Model Each process consists of a sequential program
More informationComputer System Architecture. CMPT 300 Operating Systems I. Summer Segment 3: Computer System Architecture. Melissa O Neill
CMPT 300 Operating Systems I Computer System Architecture Summer 1999 disk disk printer tape drives on-line Segment 3: Computer System Architecture CPU disk controller printer controller tape-drive controller
More informationCSE 153 Design of Operating Systems
CSE 153 Design of Operating Systems Winter 19 Lecture 3: OS model and Architectural Support Last time/today Historic evolution of Operating Systems (and computing!) Today: We start our journey in exploring
More informationChap 4, 5: Process. Dongkun Shin, SKKU
Chap 4, 5: Process 1 Process Concept Job A bundle of program and data to be executed An entity before submission for execution Process (= running program) An entity that is registered to kernel for execution
More informationReview: Hardware user/kernel boundary
Review: Hardware user/kernel boundary applic. applic. applic. user lib lib lib kernel syscall pg fault syscall FS VM sockets disk disk NIC context switch TCP retransmits,... device interrupts Processor
More informationMost of the work is done in the context of the process rather than handled separately by the kernel
Process Control Process Abstraction for a running program Manages program s use of memory, cpu time, and i/o resources Most of the work is done in the context of the process rather than handled separately
More informationDefinition: An operating system is the software that manages resources
13-1 Operating Systems 13-1 Definition: An operating system is the software that manages resources in a computer. Resources A resource is (usually) hardware that needs to be accessed. There are rules for
More informationPROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R
PROCESS CONTROL: This will describe the use and implementation of the system calls that control the process context. The fork system call creates a new process, the exit call terminates process execution,
More informationComputer-System Architecture
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture 2.1 Computer-System Architecture 2.2 1
More informationComputer-System Architecture. Common Functions of Interrupts. Computer-System Operation. Interrupt Handling. Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures Computer-System Architecture Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture 2.1 2.2 Computer-System
More informationEE458 - Embedded Systems Exceptions and Interrupts
EE458 - Embedded Systems Exceptions and Interrupts Outline Exceptions Interrupts References RTC: Chapters 10 CUG: Chapters 8, 21, 23 1 Introduction An exception is any event that disrupts the normal execution
More informationProcess Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey
CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process
More informationSistemi in Tempo Reale
Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It
More informationTCSS 422: OPERATING SYSTEMS
TCSS 422: OPERATING SYSTEMS fork() Process API, Limited Direct Execution Wes J. Lloyd Institute of Technology University of Washington - Tacoma Creates a new process - think of a fork in the road Parent
More informationRequirements, Partitioning, paging, and segmentation
Requirements, Partitioning, paging, and segmentation Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as many processes into memory
More information-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)
Devices -Host -CPU -Device -Controller device) +memory +OS -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, Communication -Registers -Control
More informationCS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20
CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 20 LAST TIME: UNIX PROCESS MODEL Began covering the UNIX process model and API Information associated with each process: A PID (process ID) to
More informationCSCE Introduction to Computer Systems Spring 2019
CSCE 313-200 Introduction to Computer Systems Spring 2019 Processes Dmitri Loguinov Texas A&M University January 24, 2019 1 Chapter 3: Roadmap 3.1 What is a process? 3.2 Process states 3.3 Process description
More informationI/O Systems (3): Clocks and Timers. CSE 2431: Introduction to Operating Systems
I/O Systems (3): Clocks and Timers CSE 2431: Introduction to Operating Systems 1 Outline Clock Hardware Clock Software Soft Timers 2 Two Types of Clocks Simple clock: tied to the 110- or 220-volt power
More information5/8/2012. Controlling User Processes Chapter 10
Controlling User Processes Chapter 10 To describe the concept of a process, and execution of multiple processes on a computer system with a single CPU To explain how a shell executes commands To discuss
More informationComputer Systems II. First Two Major Computer System Evolution Steps
Computer Systems II Introduction to Processes 1 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent processes) 2 1 At First (1945 1955) In the beginning,
More informationThe different Unix contexts
The different Unix contexts User-level Kernel top half - System call, page fault handler, kernel-only process, etc. Software interrupt Device interrupt Timer interrupt (hardclock) Context switch code Transitions
More informationReserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.
Introduction & Ch1 Two Roles of an Operating System Extended Machine or virtual machine Device drivers, Processes, File systems, Networking protocols. Resource Manager Allocates and enforces Memory, Disk
More information5 Lecture: Intro. to Concurrency
5 Lecture: Intro. to Concurrency Outline: Announcements Onwards The Process Model: a little deeper Pseudoparallelism and nondeterminism Possible process states Scheduling What about IPC? Operating System
More informationProcesses, Execution and State. Process Operations: fork. Variations on Process Creation. Windows Process Creation.
Processes, Execution, and State 3C. Process Operations 3D. Implementing Processes 3E. Asynchronous Exceptions and Events 3U. User-Mode Programs and Exceptions 3F. Execution State Model Process Operations:
More informationProcesses. CS439: Principles of Computer Systems January 30, 2019
Processes CS439: Principles of Computer Systems January 30, 2019 What We Know Operating system complexity increased over time in response to economic and technological changes The three roles did not show
More informationECE 598 Advanced Operating Systems Lecture 10
ECE 598 Advanced Operating Systems Lecture 10 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 22 February 2018 Announcements Homework #5 will be posted 1 Blocking vs Nonblocking
More informationIntroduction Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication
UNIX Introduction Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication 30 Process Management How to represent a process for Process
More informationProcesses. CS 475, Spring 2018 Concurrent & Distributed Systems
Processes CS 475, Spring 2018 Concurrent & Distributed Systems Review: Abstractions 2 Review: Concurrency & Parallelism 4 different things: T1 T2 T3 T4 Concurrency: (1 processor) Time T1 T2 T3 T4 T1 T1
More informationThe Kernel Abstraction
The Kernel Abstraction Debugging as Engineering Much of your time in this course will be spent debugging In industry, 50% of software dev is debugging Even more for kernel development How do you reduce
More informationComputer architecture. A simplified model
Computer architecture A simplified model Computers architecture One (or several) CPU(s) Main memory A set of devices (peripherals) Interrupts Direct memory access Computers architecture Memory Keyboard
More informationOPERATING SYSTEM PROJECT: SOS
OPERATING SYSTEM PROJECT: SOS I. Description 1. This project simulates a noninteractive (batch) monolithic operating system. Your program, OS, is a set of functions invoked by SOS (Student Operating System),
More informationCOMP 3430 Robert Guderian
Operating Systems COMP 3430 Robert Guderian file:///users/robg/dropbox/teaching/3430-2018/slides/03_processes/index.html?print-pdf#/ 1/53 1 Processes file:///users/robg/dropbox/teaching/3430-2018/slides/03_processes/index.html?print-pdf#/
More informationCPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu
CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It
More informationELEC 377 Operating Systems. Week 1 Class 2
Operating Systems Week 1 Class 2 Labs vs. Assignments The only work to turn in are the labs. In some of the handouts I refer to the labs as assignments. There are no assignments separate from the labs.
More informationChapter 8: Virtual Memory. Operating System Concepts
Chapter 8: Virtual Memory Silberschatz, Galvin and Gagne 2009 Chapter 8: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationOPERATING SYSTEM. Chapter 9: Virtual Memory
OPERATING SYSTEM Chapter 9: Virtual Memory Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory
More informationAnnouncement. Exercise #2 will be out today. Due date is next Monday
Announcement Exercise #2 will be out today Due date is next Monday Major OS Developments 2 Evolution of Operating Systems Generations include: Serial Processing Simple Batch Systems Multiprogrammed Batch
More informationProcess Context & Interrupts. New process can mess up information in old process. (i.e. what if they both use the same register?)
1 Process Context 1.1 What is context? A process is sometimes called a task, subroutine or program. Process context is all the information that the process needs to keep track of its state. Registers Temporary
More information操作系统概念 13. I/O Systems
OPERATING SYSTEM CONCEPTS 操作系统概念 13. I/O Systems 东南大学计算机学院 Baili Zhang/ Southeast 1 Objectives 13. I/O Systems Explore the structure of an operating system s I/O subsystem Discuss the principles of I/O
More information1.Define signal? NOV DEC 2011 MAY JUNE 2011
SEM/ YEAR : VI / III CS2028 UNIX INTERNALS UNIT IV THE STRUCTURE OF PROCESSES PART A 1.Define signal? NOV DEC 2011 MAY JUNE 2011 A signal is an asynchronous event which is delivered to a process. 2. Define
More informationECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017
ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)
More information13-2 EE 4770 Lecture Transparency. Formatted 8:18, 13 March 1998 from lsli
13-1 13-1 Operating Systems Definition: An operating system is the software that manages resources in a computer. Resources A resource is (usually) hardware that needs to be accessed. There are rules for
More informationOperating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski
Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying
More informationVirtual Memory COMPSCI 386
Virtual Memory COMPSCI 386 Motivation An instruction to be executed must be in physical memory, but there may not be enough space for all ready processes. Typically the entire program is not needed. Exception
More informationECE 598 Advanced Operating Systems Lecture 11
ECE 598 Advanced Operating Systems Lecture 11 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 23 February 2016 Announcements Homework #5 Posted Some notes, discovered the hard
More informationIntroduction. CS3026 Operating Systems Lecture 01
Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program
More informationCSE 153 Design of Operating Systems Fall 18
CSE 153 Design of Operating Systems Fall 18 Lecture 2: OS model and Architectural Support Last time/today l Historic evolution of Operating Systems (and computing!) l Today: We start our journey in exploring
More informationOperating Systems. Overview Virtual memory part 2. Page replacement algorithms. Lecture 7 Memory management 3: Virtual memory
Operating Systems Lecture 7 Memory management : Virtual memory Overview Virtual memory part Page replacement algorithms Frame allocation Thrashing Other considerations Memory over-allocation Efficient
More informationVirtual Memory Outline
Virtual Memory Outline Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel Memory Other Considerations Operating-System Examples
More informationProcesses. CS439: Principles of Computer Systems January 24, 2018
Processes CS439: Principles of Computer Systems January 24, 2018 Last Time History Lesson Hardware expensive, humans cheap Hardware cheap, humans expensive Hardware very cheap, humans very expensive Dual-mode
More informationEach terminal window has a process group associated with it this defines the current foreground process group. Keyboard-generated signals are sent to
Each terminal window has a process group associated with it this defines the current foreground process group. Keyboard-generated signals are sent to all processes in the current window s process group.
More information