









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
Material Type: Exam; Class: Operating Systems; Subject: Engineering Computer Science; University: University of California - Davis; Term: Fall 2007;
Typology: Exams
1 / 17
This page cannot be seen from the preview
Don't miss anything!










ecs150 fall 2007, FINAL exam
ecs150 fall 2007, FINAL exam
(Soft Update, 4%)
In each of the following diagrams, we have TWO directory blocks and TWO I-Node blocks. The first
(one block write in each step). Also, you MUST draw the dependency arrows in each step (only on the memory side).synchronize the memory/disk step-by-step via completing/marking the diagrams. Hint: we will need FIVE disk writesrow shows the initial values of memory and disk BEFORE the synchronization. Please use the rules of “Soft Update” to
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)(empty)
(empty)(empty)(empty)
(empty) iN(D2)
(empty) iN(D1)
(empty)(empty)(empty) iN(D8)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
memory
disk
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty) (empty) (empty)
iN(D5)
(empty)(empty) iN(D1)
Solution #1/
ecs150 fall 2007, FINAL exam
(Soft Update, 4%)
In each of the following diagrams, we have TWO directory blocks and TWO I-Node blocks. The first
(one block write in each step). Also, you MUST draw the dependency arrows in each step (only on the memory side).synchronize the memory/disk step-by-step via completing/marking the diagrams. Hint: we will need FIVE disk writesrow shows the initial values of memory and disk BEFORE the synchronization. Please use the rules of “Soft Update” to
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)(empty)
(empty)(empty)(empty)
(empty) iN(D2)
(empty) iN(D1)
(empty)(empty)(empty) iN(D8)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty) (empty)(empty) (empty)
memory
disk
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
Solution #2/
(empty)(empty) iN(D3)
(empty)
ecs150 fall 2007, FINAL exam
memory
disk
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
iN(D5)
(empty)(empty) iN(D1)
ecs150 fall 2007, FINAL exam
memory
disk
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty) (empty)(empty) iN(D3)
(empty)
(empty)
(empty)
ecs150 fall 2007, FINAL exam
(Soft Update, 4%)
In each of the following diagrams, we have TWO directory blocks and TWO I-Node blocks. The first
(one block write in each step). Also, you MUST draw the dependency arrows in each step (only on the memory side).synchronize the memory/disk step-by-step via completing/marking the diagrams. Hint: we will need FIVE disk writesrow shows the initial values of memory and disk BEFORE the synchronization. Please use the rules of “Soft Update” to
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
(empty)(empty)
(empty)(empty)(empty)
(empty) iN(D2)
(empty) iN(D1)
(empty)(empty)(empty) iN(D8)
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
memory
disk
(empty)
(empty)
(empty)(empty)(empty)
iN(D5)
(empty)(empty) iN(D1)
(empty)(empty) iN(D3)
(empty)
Solution #4/
(empty)(empty) iN(D8) iN(D3)
(empty)
(empty)
ecs150 fall 2007, FINAL exam
(Buddy System, 2%)
After the following operations: allocate(256), allocate(128), allocate(64), allocate(128), release(C,
bitmap array.Please use the next page to draw/represent your answer. Don’t forget -- free list pointers, block labels and sizes, and128), our buddy memory system looks like the following diagram. What will the system look like AFTER release(F, 128)?
Bitmap (32-Bytes chunks)
0
1023
32
64
128
256
512
Free list
B
C
D
D’
F
E’
F’
1 1 1 1 1 1 1 1 0 0
0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0
ecs150 fall 2007, FINAL exam
Bitmap (32-Bytes chunks)
0
1023
32
64
128
256
512
Free list
B
C
D
D’
A’
1 1 1 1 1 1 1 1 0 0
0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0
ecs150 fall 2007, FINAL exam
(Priority Ceiling & Lottery Ticket Sharing, 2%)
Please compare the priority ceiling protocol and the lottery
Priority ceiling guarantees “deadlock-free”, while lottery sharing does not.sharing. Please justify your answer.ticket sharing, and describe ONE CRITICAL PROPERTY supported by priority ceiling but NOT lottery ticket
ecs150 fall 2007, FINAL exam
(Lottery Scheduling in FreeBSD 5.4, 4%)
In homework assignment #2, we have observed that lottery mode #
integrity of the kernel operations.as a “payback”. This will still maintain the advantage of lottery scheduling and yet protect theprocess will inherit the amount of tickets from the preempting kernel process for a period of timeprocess wins the lottery but must let another kernel process to run, then in the next round, this userNot all, but some kernel processes MUST run regardless the results of lottery. However, if a userOne approach is to define dependency relationship between certain kernel processes and others.kernel activities, and vice versa.)kernel instability. (Hint: please consider in WHAT situations the user time-share processes should preempt thelottery scheduling implementation for FreeBSD kernel (i.e., neither mode 1 nor 2) to avoid any possibility forthe kernel due to incorrect/imperfect interleaving between kernel and user activities. Please describe a different(allowing the Time Share processes to compete with the kernel activities) potentially slows down or even crashes
ecs150 fall 2007, FINAL exam
(Jouranling, Soft Update, NFS, and AFS, 6%)
You are a software project lead for a major software company,
paradigm of soft update or journaling for the project source filedifferent time zones). You, as the lead, are going to make a couple decisions: (1). Whether you should use thedifferent countries. In other words, all 30 members need to access all the source codes from time to time (maybe inand your team is working on a large software project involving 30 programmers physically distributed in four
dependency
synchronization, assuming you are
ecs150 fall 2007, FINAL exam
(Kernel Loadable Modules, 6%)
Kernel loadable module is a very useful facility to flexibly change the