Docsity

TCSS 422: Operating Systems - Review for Final Quiz, Exercises of Software Engineering

Toggle sidebar
bg1
TCSS 422 A – Spring 2021
School of Engineering and Technology
6/3/2021
L19.1
Slides by Wes J. Lloyd
June 3, 2021 TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
Be yon d Ph ysic al M emo ry,
Rev iew f or “ Fin al” Q uiz
Wes J. Ll oyd
Sch ool of Engi neer ing and Tech nolo gy
Uni vers ity of Wa shin gton - Tac oma
TCSS 422: OPERATING SYSTEMS
Thi s i s a “cl oud com puti ng” cou rse
Pre vio us y ear’ s co urs e:
ht tp: //f acu lty. was hin gto n.e du/w llo yd/ cou rse s/t css 562
Cou rse int rod uces ma jor clo ud c ompu tin g de liv ery mod els :
Inf ras tru ctur e-a s-a- Ser vic e (Ia aS) , Pl atfo rm (Pa aS), Fun ctio ns
(Fa aS) , Co nta iner (Ca aS) , So ftw are (Sa aS)
Cou rse fea tur es a so ftwa re deve lop ment pro jec t wh ere we
bui ld and eval uate so ftw are enti rel y fo r t he c lou d
Top ics: int rod uct ion to m ajo r cl oud ser vic es, deve lop ing
ser ver les s so ftw are (Fun ctio n-a s-a -Ser vic e), cont ain eriz ati on
FALL 2021 - TCSS 562
SOFTWARE EN G. FOR CLO UD COM PUTI NG
June 3, 2021
TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
L19.2
Cla ss d oes not have pr ereq uisi tes
TCS S 42 2 pr ovi des g ood foun dat ion – we use Linu x
If inte res ted i n en rol ling , co ntac t by ema il
Can ta ke 1 x 50 0-l evel clas s, c ount s a s 40 0-le vel e lec tive
SAVI NGS: ab le to take gr aduat e cour se and only p ay
und ergrad uate tu ition
DO UBL E-D IP !!
Cla ss take n in la st qu arter of un dergra d can b e used twice
Onc e as a unde rgradu ate el ectiv e towar ds gra duat ion
Onc e as a grad uate el ecti ve towa rds th e Mas ters i n
Com puter S cienc e & Sy stem s (MSC SS) de gree
June 3, 2021
TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
L19.3
TCS S 5 62 – CLOU D CO MPU TING - 2
Ind epe nden t s tudy in “cl oud com puti ng”
Wor k to co llab ora tive ly d raf t a pro pos al
and su bmi t to Dr. Nas cim ento , CS S Ch air F 2 021 for app rova l
Foc us on v arie ty o f t opi cs r elat ed t o c loud /di str ibut ed s yst ems
Var iabl e c redi ts from 1 t o 5
Inv olve s p arti cip ati on i n w eekl y re sea rch gro up m eeti ng
Spr ing 20 21: cu rrent ly Wed nesday at 12 :30p
Usu all y 1 or 2 on e-o n-o ne or sm all gro up m eeti ng duri ng week
Con tac t by ema il if inte rest ed
Ide nti fy p ref err ed qu art er( s)
Num ber of cre dits
Can ta ke u p to 10 cre dits TC SS 4 98/ 499 - CS S e lect ive cre dits
NEXT YEAR - TCSS 498/ 499 (AN Y QUARTER )
UN DERG RADUATE R EADI NG/ RESE ARCH I N CSS
June 3, 2021
TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
L19.4
Ple as e c omp let e t he cou rs e e val uat ion s urv ey at:
TCS S 4 22 A - C omp ute r Ope rat ing Sy ste ms:
htt ps :// uwt .ia syst em. org /su rve y/10 880 2
Ne w th is qua rte r i n T CSS 42 2:
Ass ign me nt 2 – n ew a ssi gnm ent , a djus ted sc ope fo r c ovid -19 , a nd
to foc us on pth rea ds, lock ing , an d b oun ded bu ffe r
No man dat ory gr aded in cl ass ac tiv iti es t hi s qu art er per UW req ues t
– w e h ad mul tip le s tud ent s r emo te i n d iff ere nt tim e z one s
in clud ing Ch ina (e nab les 10 0% asyn chr ono us par tic ipa tio n)
Ext ra cre dit fo r pa per les s d ail y f eed back su rve ys
Ass ign me nt 3 gr aded as a Qui z/Tu tor ial : Ke rne l M odul e
pro gra mmi ng
OB S St udi o s oft war e us ed aft er mid ter m to le ver age use of
“sc en es” tha t i nte gra te c ame ra, ch at, and di spl ays
Fin al Exa m c onv ert ed t o q uiz and ha nds -on tu tor ial on Fil e S yst ems
Sli de mod ifi cat ion s & ref act ori ng to i mpr ove on lin e de liv er y
June 3, 2021
TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
L19.5
CO URSE EVALU ATION: TCS S 422 A
SP RING 2021
Qu est ion s fr om 6/ 1
Tut ori al 2 – Pt hre ad, l ock s, co ndi tion s tu tori al – J une 4
As sig nme nt 3: ( Tuto ria l) In tro duc tio n to Li nux K ern el Mo dul es
Fin al ex am – al ter nat e for mat
Qui z 4 – Pa ge Tab les
Cha pte r 20 : Pag ing : Sma ller Tab les
Exa mple Q uesti on
Cha pte r 21/ 22: Beyo nd P hysi cal M emo ry
Swap ping M echan isms , Swapp ing Po licie s
Pra cti ce Q uest ions for “Fi nal” Qui z
5: 45 p m – L ife Aft er T CSS 422: CSS Car eer Pane l
w/ S oft E ng fr om UW T CSS Jugal and N avid ( eBay and T- Mobil e)
June 3, 2021
TCSS422: Operating Systems [Spring 2021]
School of Engineering and Technology, University of Washington - Tacoma
L19.6
OB JECTI VES – 6/3
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download TCSS 422: Operating Systems - Review for Final Quiz and more Exercises Software Engineering in PDF only on Docsity!

School of Engineering and Technology

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma

Beyond Physical Memory,

Review for “Final” Quiz

Wes J. Lloyd

School of Engineering and Technology

University of Washington - Tacoma

TCSS 422: OPERATING SYSTEMS  This is a “cloud computing” course  Previous year’s course: http://faculty.washington.edu/wlloyd/courses/tcss  Course introduces major cloud computing delivery models: Infrastructure-as-a-Service (IaaS), Platform (PaaS), Functions (FaaS), Container (CaaS), Software (SaaS)  Course features a software development project where we build and evaluate software entirely for the cloud  Topics: introduction to major cloud services, developing serverless software (Function-as-a-Service), containerization FALL 2021 - TCSS 562 SOFTWARE ENG. FOR CLOUD COMPUTING June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.

 Class does not have prerequisites
 TCSS 422 provides good foundation – we use Linux
 If interested in enrolling, contact by email
 Can take 1 x 500-level class, counts as 400-level elective
 SAVINGS: able to take graduate course and only pay
undergraduate tuition
 DOUBLE-DIP !!
 Class taken in last quarter of undergrad can be used twice

 Once as a undergraduate elective towards graduation  Once as a graduate elective towards the Masters in Computer Science & Systems (MSCSS) degree June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. TCSS 562 – CLOUD COMPUTING - 2  Independent study in “cloud computing”  Work to collaboratively draft a proposal and submit to Dr. Nascimento, CSS Chair F 2021 for approval  Focus on variety of topics related to cloud/distributed systems  Variable credits from 1 to 5  Involves participation in weekly research group meeting  Spring 2021: currently Wednesday at 12:30p  Usually 1 or 2 one-on-one or small group meeting during week  Contact by email if interested  Identify preferred quarter(s)  Number of credits  Can take up to 10 credits TCSS 498/499 - CSS elective credits NEXT YEAR - TCSS 498/499 (ANY QUARTER)

UNDERGRADUATE READING/RESEARCH IN CSS

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.  Please complete the course evaluation survey at:  TCSS 422 A - Computer Operating Systems:

 https://uwt.iasystem.org/survey/

 Ne w t h is q uarter i n T CSS 4 22:  Assignment 2– new assignment, adjusted scope for covid-19, and to focus on pthreads, locking, and bounded buffer  No mandatory graded in class activities this quarter per UW request

  • we had multiple students remote in different time zones including China (enables 100% asynchronous par ticipation)  Extra credit for paperless daily feedback surveys  Assignment 3 graded as a Quiz/Tutorial: Kernel Module programming  OBS Studio software used after midterm to leverage use of “scenes” that integrate camera, chat, and displays  Final Exam converted to quiz and hands-on tutorial on File Systems  Slide modifications & refactoring to improve online delivery June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. COURSE EVALUATION: TCSS 422 A SPRING 2021
 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3: (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/

School of Engineering and Technology

 Daily Feedback Quiz in Canvas – Available After Each Class  Extra credit available for completing surveys ON TI ME  Tuesday surveys: due by ~ Wed @ 11:59p  Thursday surveys: due ~ Mon @ 11:59p June 3, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. ONLINE DAILY FEEDBACK SURVEY June 3, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.  Please classify your perspective on material covered in today’s class (42 respondents):  1-mostly review, 5-equal new/review, 10-mostly new  Average – 6 .37 ( - previous 6 .02)  Please rate the pace of today’s class:  1-slow, 5-just right, 10-fast  Average – 5 .46 ( - previous 5 .52) June 3, 2021 TCSS422: Computer Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MATERIAL / PACE June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. FEEDBACK

 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3: (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/

 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3 : (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/

School of Engineering and Technology

 Consider a 16 MB computer which indexes memory using 4KB pages  (#1) For a single level page table, how many pages are required to index memory?  (#2) How many bits are required for the VPN?  (#3) Assuming each page table entry (PTE) can index any byte on a 4KB page, how many offset bits are required?  (#4) Assuming there are 8 status bits, how many bytes are required for each page table entry? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MULTI-LEVEL PAGE TABLE EXAMPLE  (#5) How many bytes (or KB) are required for a single level page table?  Let’s assume a simple HelloWorld.c program.  HelloWorld.c requires virtual address translation for 4 pages:  1 – code page 1 – stack page  1 – heap page 1 – data segment page  (#6) Assuming a two-level page table scheme, how many bits are required for the Page Directory Index (PDI)?  (#7) How many bits are required for the Page Table Index (PTI)? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MULTI LEVEL PAGE TABLE EXAMPLE - 2  Assume each page directory entry (PDE) and page table entry (PTE) requires 3 bytes:  6 bits for the Page Directory Index (PDI)  6 bits for the Page Table Index (PTI)  8 status bits  (#8) How much total memory is required to index the HelloWorld.c program using a two-level page table when we only need to translate 4 total pages?  HINT: we need to allocate one Page Directory and one Page Table…  HINT: how many entries are in the PD and PT June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MULTI LEVEL PAGE TABLE EXAMPLE - 3  (#9) Using a single page directory entry (PDE) pointing to a single page table (PT), if all of the slots of the page table (PT) are in use, what is the total amount of memory a two-level page table scheme can address?  (#10) And finally, for this example, as a percentage (%), how much memory does the 2-level page table scheme consume compared to the 1-level scheme?  HINT: two-level memory use / one-level memory use June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MULTI LEVEL PAGE TABLE EXAMPLE - 4  #1 – 4096 pages  #2 – 1 2 bits  #3 – 1 2 bits  #4 – 3 bytes (12 VPN bits, 8 status bits, offset not stored)  #5 – 4096 x 3 = 1 2,288 bytes (12KB)  #6 – 6 bits  #7 – 6 bits  #8 – 192 bytes for Page Directory (PD) (64 entries x 3 bytes) 192 bytes for Page Table (PT) TOTAL = 384 bytes  #9 – 64 entries, where each entry maps a 4,096 byte page With 1 2 offset bits, can address 262,144 bytes (256 KB)  #10- 384/12288 = .03125  3.1 25% June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. ANSWERS

 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3: (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/

School of Engineering and Technology

CHAPTER 21/22: BEYOND PHYSICAL MEMORY June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.

 Disks (HDD, SSD) provide another level of storage in the
memory hierarchy

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MEMORY HIERARCHY

 Provide the illusion of an address space larger than
physical RAM
 For a single process
 Convenience
 Ease of use
 For multiple processes
 Large virtual memory space supports running
many concurrent processes...

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. MOTIVATION FOR EXPANDING THE ADDRESS SPACE June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. LATENCY TIMES

 Design considerations:

 SSDs 4x the time of DRAM
 HDDs 80x the time of DRAM

 Latency number s ever y programmer should know  Fro m: https :/ /gis t.github.co m/ jbo ne r/ 28 41 83 2#f ile -late nc y -tx t

 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3: (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/

 Disk space for storing memory pages
 “Swap” them in and out of memory to disk as needed

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. SWAP SPACE

School of Engineering and Technology

REPLACEMENT POLICIES June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.3 7  Replacement policies apply to “any” cache  Goal is to minimize the number of misses  Average memory access time (AMAT) can be estimated:  Consider TM = 100 ns, TD = 10ms  Consider Phit = .9 (90%), Pmiss =.  Consider Phit = .999 (99.9%), Pmiss =. June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. CACHE MANAGEMENT 𝐴𝑀𝐴𝑇 = 𝑃ு௜௧ ∗ 𝑇ெ + (𝑃ெ௜௦௦ ∗ 𝑇஽ ) Argument Meaning 𝑇ெ The cost of accessing memory (time) 𝑇஽ The cost of accessing disk (time) 𝑃ு௜௧ The probability of finding the data item in the cache(a hit) 𝑃ெ௜௦௦ The probability of not finding the data in the cache(a miss)  What if:  We could predict the future (… with a magical oracle)  All future page accesses are known  Always replace the page in the cache used farthest in the future  Used for a comparison  Provides a “best case” replacement policy  Consider a 3-element empty cache with the following page accesses:

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OPTIMAL REPLACEMENT POLICY

What is the hit/miss ratio?
6 hits
 Queue based
 Always replace the oldest element at the back of cache
 Simple to implement
 Doesn’t consider importance… just arrival ordering
 Consider a 3-element empty cache with the following
page accesses:
 What is the hit/miss ratio?
 How is FIFO different than LRU?

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. FIFO REPLACEMENT

4 hits

LRU incorporates history  Pick a page at random to replace  Simple and fast implementation  Performance depends on luck of random choices

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. RANDOM REPLACEMENT

 LRU: Least recently used
 Always replace page with oldest access time (front)
 Always move end of cache when element is read again
 LRU requires constant reorganization of the cache
 Considers temporal locality (when pg was last accessed)
 LFU: Least frequently used
 Always replace page with the fewest # of accesses (front)
 Incorporates frequency of use - must track pg accesses
 Consider frequency of page accesses

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. HISTORY-BASED POLICIES

What is the hit/miss ratio?
6 hits
Hit/miss ratio is=6 hits

School of Engineering and Technology

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.4 3 June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.4 4  No-Locality (Random Access) Workload  Perform 10,000 random page accesses  Across set of 100 memory pages June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. WORKLOAD EXAMPLES: NO-LOCALITY When the cache is large enough to fit the entire workload, it doesn’t matter which policy you use.  80/20 Workload  Perform 10,000 page accesses, against set of 100 pages  80% of accesses are to 20% of pages (hot pages)  20% of accesses are to 80% of pages (cold pages) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. WORKLOAD EXAMPLES: 80/ LRU is more likely to hold onto hot pages (recalls history)  Looping sequential workload  Refer to 50 pages in sequence: 0, 1, …, 49  Repeat loop June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. WORKLOAD EXAMPLES: SEQUENTIAL Random performs better than FIFO and LRU for cache sizes < 50 Algorithms should provide “scan resistance” June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.4 8

School of Engineering and Technology

 Working sets

 Groups of related processes

 When thrashing: prevent one or more working

set(s) from running

 Temporarily reduces memory burden

 Allows some processes to run, reduces thrashing

June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OTHER SWAPPING POLICIES - 2 WE WILL RETURN AT 5:00PM June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19.

 Questions from 6/
 Tutorial 2 – Pthread, locks, conditions tutorial – June 4

 Assignment 3: (Tutorial) Introduction to Linux Kernel Modules

 Final exam – alternate format
 Quiz 4 – Page Tables
 Chapter 20: Paging: Smaller Tables

 Example Question

 Chapter 21/22: Beyond Physical Memory

 Swapping Mechanisms, Swapping Policies

 Practice Questions for “Final” Quiz
 5:45 pm – Life After TCSS 422: CSS Career Panel

 w/ Soft Eng from UWT CSS Jugal and Navid (eBay and T-Mobile) June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. OBJECTIVES – 6/  A computer system uses a simple base/bounds register pair to virtualize address spaces. For each traces fill in the missing values of virtual addresses, physical addresses, base, and/or bounds registers. In some cases, it is not possible to provide an exact value. If so, specify a range (e.g. greater than 100), or value that is not a single number. June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. QUESTION 1 – BASE AND BOUNDS June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. Q1 - 2  Consider a computer with 4 GB (2^32 ) of physical memory, where the page size is 4 KB (2^12 ). For simplicity assume than 1GB=1000MB, 1MB=1000KB, 1KB=1000 bytes  (a) How many pages must be tracked by a single-level page table if the computer has 4GB (2^32 ) of physical memory and the page table size is 4 KB (2^12 )?  (b) How many bits are required for the virtual page number (VPN) to address any page within this 4GB (2^32 ) memory space?  (c) Assuming that the smallest addressable unit of memory within a page is a byte (8-bits), how many bits are required for the offset to refer to any byte in the 4 KB page?  (d) Assuming each page table entry (PTE) requires 4 bytes of memory, how much memory is required to store the page table for one process (in MB)? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. QUESTION 2 – SINGLE-LEVEL PAGE TABLE

School of Engineering and Technology

 (e) Using this memory requirement, how many processes would fill the memory with page table data on a 4GB computer? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. Q2 - 2  Consider a computer with 1 GB (2^30 ) of physical memory, where the page size is 1024 bytes (1KB) (2^10 ). We would like to index memory pages using a two level page table consisting of a page directory which refers to page tables which are created on demand to index the entire memory space.  For simplicity assume than 1GB=1000MB, 1MB=1000KB, 1KB=1000 bytes  (a) For a two-level page table, divide the VPN in half. How many bits are required for the page directory index (PDI) in a two-level scheme?  (b) How many bits are required for the page table index (PTI)?  (c) How many bits are required for an offset to address any byte in the 1 KB page? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. QUESTION 3 - TWO-LEVEL PAGE TABLE  (d) Assuming each page table entry (PTE) requires 4 bytes of memory, how many extra bits are available for status bits?  (e) HelloWorld.c consists of 4 memory pages. One code page, one heap page, one data segment page, and one stack segment page. How large is the two-level page table in bytes with the structure described above that could index the all 4 memory pages of HelloWorld.c? Hint: There should be 2 tables, a page director y, and a page table.  (f) Assuming the same page table as for HelloWorld.c, using the exact same two-level page table, how large in bytes could the program grow to before needing to expand the page table? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. Q3 - 2  Consider a 3-element cache with the cache arrival sequences below.  Determine the number of cache hits and cache misses using each of the following cache replacement policies: June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. QUESTION 4 – CACHE TRACING June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. Q4 - 2  Free space management involves capturing a description of the computer’s free memory using a data structure, storing this data structure in memory, and OS support to rapidly use this structure to determine an appropriate location for new memory allocations. An efficient implementation is very important when scaling up the number of operations the OS is required to perform.  Consider the use of a linked list for a free space list where each node is represented by placing the following structure in the header of the memory chunk: typedef struct __node_t { int size; struct __node_t *next; } node_t; June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. QUESTION 5 – FREE SPACE MANAGEMENT

School of Engineering and Technology

  1. What are some of your responsibilities as a Software Engineer?
  2. How has your role evolved since you started at your present company?
  3. Wh at l anguages, frameworks, an d te chnologies d o yo u ac t ively use i n your jo b?
  4. Describe your company's general software process. Does it involve agile, scrum, or other common methodologies?
  5. Is your company actively hiring? If so, what types of positions or skills are sought?
  6. How has your work changed since the covid-19 pandemic?
  7. What aspects of remote work do you expect to potentially continue beyond the covid-19 pandemic?
  8. How did you identify your present employer? What was your search process like? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS 1. What are some of your responsibilities as a Software Engineer? 2. How has your role evolved since you started at your present company? 3. What languages, frameworks, and technologies do you actively use in your job? 4. De scribe yo ur c o mpany's ge neral sof tware pro cess. D oes it i nvolve agi le, sc rum, o r ot her c ommon m ethodologies? 5. Is your company actively hiring? If so, what types of positions or skills are sought? 6. How has your work changed since the covid-19 pandemic? 7. What aspects of remote work do you expect to potentially continue beyond the covid-19 pandemic? 8. How did you identify your present employer? What was your search process like? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS
  9. What are some of your responsibilities as a Software Engineer?
  10. How has your role evolved since you started at your present company?
  11. What languages, frameworks, and technologies do you actively use in your job?
  12. Describe your company's general software process. Does it involve agile, scrum, or other common methodologies?
  13. I s yo ur c o mpany ac t ively h iring? If so , w h at t y pes of po sitions o r ski lls are so ught?
  14. How has your work changed since the covid-19 pandemic?
  15. What aspects of remote work do you expect to potentially continue beyond the covid-19 pandemic?
  16. How did you identify your present employer? What was your search process like? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS 1. What are some of your responsibilities as a Software Engineer? 2. How has your role evolved since you started at your present company? 3. What languages, frameworks, and technologies do you actively use in your job? 4. Describe your company's general software process. Does it involve agile, scrum, or other common methodologies? 5. Is your company actively hiring? If so, what types of positions or skills are sought? 6. Ho w h as your w ork c h anged since t h e c ovid-19 pan demic? 7. What aspects of remote work do you expect to potentially continue beyond the covid-19 pandemic? 8. How did you identify your present employer? What was your search process like? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS
  17. What are some of your responsibilities as a Software Engineer?
  18. How has your role evolved since you started at your present company?
  19. What languages, frameworks, and technologies do you actively use in your job?
  20. Describe your company's general software process. Does it involve agile, scrum, or other common methodologies?
  21. Is your company actively hiring? If so, what types of positions or skills are sought?
  22. How has your work changed since the covid-19 pandemic?
  23. Wh at aspects of re mote wo rk do yo u ex pect to p otentially c o ntinue beyond t h e c ov id-19 pan demic?
  24. How did you identify your present employer? What was your search process like? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS 1. What are some of your responsibilities as a Software Engineer? 2. How has your role evolved since you started at your present company? 3. What languages, frameworks, and technologies do you actively use in your job? 4. Describe your company's general software process. Does it involve agile, scrum, or other common methodologies? 5. Is your company actively hiring? If so, what types of positions or skills are sought? 6. How has your work changed since the covid-19 pandemic? 7. What aspects of remote work do you expect to potentially continue beyond the covid-19 pandemic? 8. Ho w di d you identify your pre sent e m ployer? What was yo ur se arch process li ke? June 3, 2021 TCSS422: Operating Systems [Spring 2021] School of Engineering and Technology, University of Washington - Tacoma L19. PANEL QUESTIONS

School of Engineering and Technology

QUESTIONS