Writing Proxy Lab for CSAPP
In contrast with previous malloc lab, proxy lab is not that hard in CSAPP. But proxy lab could be more complicated if you intend to make it robust. I met many weird problems when writing this lab. As a rookie to network programming, I cannot explain everything well, but I am able to offer some measures to solve problems. Generally, writing a proxy at proxy lab level is relatively simple in algorithm. You proxy should act as a server when connecting to a client and act as a client when connecting to remote web servers. You may get some inspiration by reading source code of Tiny Proxy, which is included in proxy lab handout. Like my previous articles about CSAPP, I will talk about some gists only.
Read full article →Debugging Malloc Lab for CSAPP
These days I’m working on malloc lab for course csapp. No doubt that it’s the hardest lab in this course. Everyone feels desprate when facing endless segmentfault. Typically, you just added a few lines and then your malloc became full of segment faults. I spent over 40 hours on this lab and 70% of my time is on debugging. I also implemented many optimizations to improve my malloc’s performance. But finally my score is stuck at 97. Only 1 guy in this class got 100. I have no idea how he made this. It is said that he removed header and footer of block. If you don&8217;t want to spend too much time on this lab, writing a malloc with explicit list is enough to get 90+ score. This is definitely possible and has been proved by my friend and TA.
Read full article →Writing Shell Lab for CSAPP
Shell Lab is the 1st lab after midterm exam of 15213/18213 (Introduction to computer system), and it's more complicated than previous labs. The most annoying part about this lab must be race condition. I spent over two days on debugging a concealed race condition. It's such a disgusting bug that TA and me checked code line by line whole night to fix it. So here are some points should take care. Avoid Race Condition Several things you should do to avoid race condition.
Read full article →Hello world!
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Read full article →