cs-3424: add quiz 6

This commit is contained in:
Price Hiller 2024-08-04 23:36:19 -05:00
parent d0e99452eb
commit 13a67dc9a3
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -0,0 +1,84 @@
#set text(font: "FreeSans")
#set page(margin: 1cm)
#show link: item => [
#text(blue)[#item]
]
#show raw: set text(font: "Fira Code")
#show raw.where(): item => {
set par(leading: .5em, justify: false)
align(center)[
#block(
outset: 0pt,
stroke: luma(40%) + .5pt,
fill: luma(97%),
radius: 3pt,
)[
#align(left)[#rect(
radius: (
top-left: 3pt,
bottom-right: 3pt,
),
inset: .3em,
stroke: (
bottom: luma(40%) + .5pt,
right: luma(40%) + .5pt,
),
fill: blue.transparentize(95%),
)[#text(fill: blue)[#item.lang]]]
#v(-1em)
#box(inset: 4pt)[#item]
]]
}
#let answer(ans) = {
set text(size: 1.2em, style: "italic")
block(
inset: 4pt,
stroke: blue + .5pt,
fill: rgb(0, 149, 255, 5%),
radius: 3pt,
)[#for child in ans.fields().children {
child
// if child.func() == raw {
// text(fill: black)[#child]
// } else {
// }
}
]
}
#align(center)[#text(size: 1.3em)[= CS 3424 Quiz - Week 11]]
#align(center)[
#("Price Hiller", "zfp106", "Quiz 6", "CS 3424").join(" ⋄ ")
#v(-.5em)
#text(size: 0.8em)[#block(
inset: 4pt,
radius: 1pt,
stroke: luma(40%) + .2pt,
width: 40%,
fill: luma(97%),
)[#par(leading: .4em)[If you are interested in viewing the source code of this document, you can do so
by clicking
#link(
"https://git.orion-technologies.io/Price/college/src/branch/Development/Summer-2024/CS-3424/Quizzes/Quiz-6/Assignment.typ",
"here.",
)]]]
#v(-.5em)
#line(length: 100%, stroke: (dash: "densely-dotted"))
#v(-.5em)
]
1. Given:
- 4 byte pointers and 4096 byte blocks
- Max data by just the 12 direct pointers in data node: 49,152 data bytes
- Max data by the single indirect plus the 12 direct pointers: 4,243,456 data bytes (slightly more than 4 MB)
- Max data by the double indirect and the previous 4,299,210,752 bytes (slightly more than 4 GB)
- Anything larger would require using the triple indirect.
How many physical reads (as a worst case) would it take to access any particular data block in an 8MB file? Assume you will have to read the inode.
#align(center)[#answer[The worst case for phyiscal reads would be $4$ reads.]]