> HW10 > released: 04/21, 9:00 > due: 04/27, 23:59 > > Answer the following questions. > Submit your answers to Canvas assignments. There is an entry for this homework. > > > 1. Redo logging (4 points) > > Read notes Week14b about the five steps of redo logging. > fs was running one transaction, mkdir("/tmp/a", 0777), and then crashed. > > Questions: > > 1.a The crash happened when mkdir was doing step3 ("write to journal"). > Later, fs finishes a recovery. Does "/tmp/a" exist in fs? Why? > [answer: "/tmp/a" will not appear because according to redo recovery, fs ignores the uncommitted transaction (and mkdir haven't gone to step4 commit). ] > > 1.b The crash happened when mkdir was doing step5 ("checkpointing"). > Later, fs finishes a recovery. Does "/tmp/a" exist in fs? Why? > [answer: "/tmp/a" will appear because according to redo recovery, fs will rerun all the updates in the committed transaction. The "/tmp/a" will appear no matter what. ] > > > 2. Undo logging (4 points) > > Read notes Week14b about the four steps of undo logging. > > Questions: > > 2.a Does step2 have to wait for step1? Why? > [answer: yes. otherwise, fs might update some data blocks (in step2) before having the begin txn in journal (step1). This is a bummer because fs doesn't recognize this uncommitted transaction (no begin txn event) hence will not undo the data blocks. ] > > 2.b Does step4 have to wait for step3? Why? > [answer: yes. otherwise, when fs crashes after step4 without finishing step3, fs will not roll back the unfinished transaction, which leaves inconsistency in disk (because step3 is half-done). ] > > > 3. Authentication (1 point) > > Please write down an example of authentication in real-world non-CS scenarios. > > [answer: One example is entering some northeastern buildings: they need to verify you're a student of northeastern; and you need to show them your student id. ] > > > 4. Feedback (1 point) > > This is to gather feedback. Any answer, except a blank one, will get the piont. > > 3.a Please state the topic or topics in this class that have been least clear to you. > > 3.b Please state the topic or topics in this class that have been most clear to you. >