



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
▫Final exam Monday June 4th. ▫ 71 days from now… TCSS 422. SPRING. 2018. March 26, 2018. TCSS422: Operating Systems [Spring 2018].
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma
TCSS 422: OPERATING SYSTEMS
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
20% reduction of carbon footprint
Online lectures: Monday April 16, Wednesday April 18 No class: Monday April 9, Monday May 28
Less fuel expenses Easier to achieve perfect attendance
71 days from now…
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
Programs - please start early: March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
From Virginia Tech Department of Computer Science - 2011 Better than 50% chance of A/B Less than 50% chance of A/B
Programs - please start early Work as if deadline is several days earlier Allows for a “buffer” for running into unexpected problems
This quarter: 5% bonus for submitting on the original posted due date
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
Maximize your educational investment
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
Responsible for: Making it easy to run programs Allowing programs to share memory Enabling programs to interact with devices March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
OS is in charge of making sure the system operates correctly and efficiently. The OS is a resource manager Manages CPU, disk, network I/O Enables many programs to Share the CPU Share the underlying physical memory (RAM) Share physical devices
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
Operating systems present physical resources as virtual representations to the programs sharing them
The virtual form is “abstract” The OS presents an illusion that each user program runs in isolation on its own hardware This virtual form is general, powerful, and easy-to-use March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
What form of abstraction does the OS provide? CPU
Memory
Disk
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
Allow applications to reuse common facilities Make different devices look the same Easier to write common code to use devices Linux/Unix Block Devices Provide higher level abstractions More useful functionality March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
What level of abstraction? How much of the underlying hardware should be exposed? What if too much? What if too little? What are the correct abstractions? Security concerns March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
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
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
prompt> gcc prompt> ./cpu "A" -o cpu cpu.c -Wall A A A ˆC prompt> March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
prompt> ./cpu A [1] 7353 & ; ./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 of programs seem to be running at the same time!
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
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) != NULL address); of p: %08x\n", 12 getpid(), (unsigned) address p); (^) of the// 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 ;
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
1617 intmain(int argc, char *argv[]) 1819 { if (argc != 2 ) { 2021 fprintf(stderr,exit( 1 ); "usage: threads
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.
prompt> prompt> gcc./thread 1000 -o thread thread.c -Wall -pthread Initial Final value value : : 2000 0 prompt> Initial ./thread 100000value : 0 Final value prompt> ./thread 100000 : 143012 // huh?? Initial Final value value : : 137298 (^0) // what the??
March 26, 2018 TCSS422: Operating Systems [Spring 2018] Institute of Technology, University of Washington - Tacoma L1.