







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information related to the TCSS 422 course on Operating Systems at the University of Washington - Tacoma. It includes objectives, surveys, and feedback on the course material and pace. The document also covers topics such as virtualization/abstraction, CPU, memory, I/O, concurrency, and operating system design goals. The surveys include C Review Survey, Student Background Survey, and Virtual Machine Survey. useful for students studying Operating Systems and related topics.
Typology: Lecture notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma
Wes J. Lloyd
TCSS 422: OPERATING SYSTEMS
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. ONLINE DAILY FEEDBACK SURVEY April 1, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2.
April 1, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. MATERIAL / PACE April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. FEEDBACK
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/ C REVIEW SURVEY April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2.
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. STUDENT BACKGROUND SURVEY
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUAL MACHINE SURVEY
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING THE CPU - 2 12 #include#include <stdio.h><stdlib.h> 34 #include#include <sys/time.h><assert.h> 56 #include "common.h" 78 intmain(int argc, char *argv[]) 910 { if (argc != 2 ) { 1112 fprintf(stderr,exit( 1 ); "usage: cpu
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING THE CPU - 3 prompt> prompt> gcc./cpu "A" -o cpu cpu.c -Wall A A A ˆC prompt> April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZATION THE CPU - 4 prompt> [1] 7353 ./cpu A & ; ./cpu B & ; ./cpu C & ; ./cpu D & [2] 7354 [3] 7355 [4] 7356 A B D C A B D C A C B D ... Even though we have only one processor, all four instances of our program seem to be running at the same time!
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. MANAGING PROCESSES FROM THE CLI
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING MEMORY
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING MEMORY - 2 12 #include#include <unistd.h><stdio.h> 34 #include#include <stdlib.h>"common.h" (^56) int 78 main({ int argc, char *argv[]) 9 int *p = malloc(sizeof(int)); memory // a1: allocate some 1011 assert(pprintf("(%d) != NULLaddress); of p: %08x\n", 12 getpid(), (unsigned) address of the p); // a2: memmoryprint out the 1314 p =while 0 ;( (^1) )// a3: { put zero into the first slot of the memory 1516 Spin(p = *p 1 ); + 1 ; (^1718) } printf("(%d) p: %d\n", getpid(), *p); // a (^1920) } return 0 ;
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING MEMORY - 3 prompt> (2134) memory address./mem of p: 00200000 (2134) (2134) p:p: (^12) (2134) (2134) p:p: (^34) (2134) ˆC p: 5
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUALIZING MEMORY - 4 prompt> [1] 24113 ./mem &; ./mem & [2] 24114 (24113) memory address of p: 00200000 (24114) (24113) memoryp: 1 address of p: 00200000 (24114) (24114) p: 1p: 2 (24113) (24113) p: 2p: 3 (24114) ... p: 3
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. VIRTUAL MEMORY
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. PERSISTENCE
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. CONCURRENCY - 2 12 #include#include <stdio.h><stdlib.h> 34 #include "common.h" 56 volatile intint loops; counter = 0 ; (^78) void *worker(void *arg) { 910 intfor i;(i = 0 ; i < loops; i++) { (^1112) } counter++; (^1314) } return NULL; 15 ...
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. CONCURRENCY - 3 1617 intmain(int argc, char *argv[]) 1819 { if (argc != 2 ) { 2021 fprintf(stderr,exit( 1 ); "usage: threads
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. CONCURRENCY - 4
prompt> gcc prompt> ./thread 1000 -o thread thread.c -Wall -pthread Initial value : Final value : 2000 0 prompt> ./thread 100000 Initial value : 0 Final value prompt> ./thread 100000 : 143012 // huh?? Initial value : Final value : 137298 (^0) // what the??
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. CONCURRENCY - 5 April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2.
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. PARALLEL PROGRAMMING
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. SUMMARY: OPERATING SYSTEM DESIGN GOALS
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. SUMMARY: OPERATING SYSTEM DESIGN GOALS - 2 WE WILL RETURN AT 5:00PM April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2.
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. static data^ code heap stack Process Memory static data^ code heap Program
CPU
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. PROCESS STATES April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. PROCESS STATE TRANSITIONS Running Ready Blocked Descheduled Scheduled I/O: initiate I/O: done
April 2, 2020 TCSS422: Operating Systems [Spring 2020] School of Engineering and Technology, University of Washington - Tacoma L2. OBSERVING PROCESS META-DATA
April 2, 2020 TCSS422: Operating Systems [Spring 2020] School of Engineering and Technology, University of Washington - Tacoma L2. CONTEXT SWITCH
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2.
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. QUESTION: WHEN TO CONTEXT SWITCH
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. OBJECTIVES – 4/
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. PROCESS DATA STRUCTURES
April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. XV6 KERNEL DATA STRUCTURES // // theto stopregisters and subsequently restart xv6 will save and restore a process struct int context { eip; // Index pointer register int int esp;ebx; //// Stack pointerCalled the base register register int int ecx;edx; //// Called the counterCalled the data register register int int esi;edi; //// Source indexDestination index register register };^ int^ ebp;^ //^ Stack base pointer^ register // enum the proc_state different { UNUSED,states a processEMBRYO, SLEEPING, can be in RUNNABLE, RUNNING, ZOMBIE }; April 1, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L2. XV6 KERNEL DATA STRUCTURES - 2 // the information xv6 tracks about each process // including its struct proc { register context and state char uint *mem;sz; // Start of// Size of processprocess memory memory char *kstack; // Bottom of // for this processkernel stack enum int pid;proc_state state; // Process// Process stateID struct void *chan; proc *parent; // Parent process// If non-zero, sleeping on chan int struct killed; file (^) *ofile[NOFILE];// If // Open files non-zero, have been killed struct inode *cwd; // Current directory struct struct context context;trapframe *tf; // Switch here to run// Trap frame for the process };^ // current^ interrupt
OFFICE HOURS HAVE STEPPED OUT WILL RETURN SHORTLY