So after the summer's through (or at least it's supposed to be as we're still waiting for the rain from where I am,) I'm back in school. I had enrolled in IS201 and IS214 last April then had gotten the course materials from the learning center last weekend already. While I have yet to get my grade for 2 of the 3 subjects I took up last semester, I have to start with the real thing now.
IS201 is on Computer Ethics while IS214 is on Programming Languages. The two subjects are actually similar to some major subjects I took when I was still an undergrad at UP Diliman. Those would be CS207 (Special Topics) and CS150 (Programming Languages.) While intuitively that should work to my advantage, I'm not letting my guard down. Not when I got to take a look at the course requirements.
Requirements for IS214 are much like IS215: 20% on FMAs and 80% on a make-or-break multiple choice final exams. While I'm giving myself a heads up on the IS215 serving of that examination, I know I could've done better. That's why I'm preparing for the exam a lot earlier this time.
As for the IS201, I think they're a lot like the requirements in ENRM221: participation in online discussions, a submitted paper which in this case is called an Ethics Portfolio and a final exams. While the Ethics Portfolio is not that formal, it has to be written gradually so as to present something substantially noteworthy. Hence a lot of the meat I'll be including there will appear here just as gradually. Since I was dissatisfied with how my ENRM221 concept paper I wrote for a number of weeks came out, I'm putting in more time to come up with something which will end up something satisfactory.
Now if only I can organize everything I have in mind.
Tuesday, June 3, 2008
Sunday, March 2, 2008
ENRM 221 Finals
The elective I took up this semester is a subject on the socio-cultural perspectives on the environment. A course requirement for the subject would be a final examination so in the same vein as in the previous post, I'm posting the exam reviewer I used.
Again, apologies for typos in the answers to the guide questions.
Again, apologies for typos in the answers to the guide questions.
IS215 - Finals
To anyone who'll be taking IS 215 in the future and fortunate enough to find this post will eventually have to face the final examinations. So I'm leaving the two-part reviewer I made for myself which turned out to be helpful after all. The first part covers the Single Processors topic while the second spans the topics on Networks up to the Internet.
Pardon me for the occasional typo errors though. I had been so much in a hurry that correcting those stuff went beyond me already. Also the Parallel Systems and the Internet can still be made more comprehensive. Blame it all on the rush again. :D
Pardon me for the occasional typo errors though. I had been so much in a hurry that correcting those stuff went beyond me already. Also the Parallel Systems and the Internet can still be made more comprehensive. Blame it all on the rush again. :D
IS 226 - Project 1 - Part 2

It was just a shame my first sem at school again after more than half a decade took away the little time I could afford to update this blog. Anyway I'm adding this link to the product of my full attention set at web development. And by web development I mean everything from web design to web technology codes.
Which is the reason why I chose to include projects 2 and 3. The next projects are essentially refinements to the preschool home page requirement for the first project so it definitely makes sense to lump them all here together.

Project 3 on the other hand, required JavaScript codes to validate user inputs during login, depending on the type of user signing in. For the particular project, that would either be student, teacher or parent. Though I wouldn't really implement such validation that way for a production website in real life, I had no trouble finding my way in JavaScript. Prior to this course I was more of a back-end programmer so much of what I actually got from it was more on the web design end. That is, I found project 2 of the course more time consuming though not essentially more difficult.
Without further ado here's the home page. The 2nd (Kids' Play) and 3rd (Black and White) screenshots not shown in this post can be found here and here btw.
Saturday, December 1, 2007
IS 226 - Project 1 - Part 1
Since reality's been keeping me so busy elsewhere, I thought I'd stick these links for the first IS 226 project. I thought it would be easier and less time-consuming for me to write an entry and get here from time to time rather than to organize my bookmarks which is close to a hodgepodge of ideas in an anything-goes forum.
Anyway here are the said links.
And now for the homepage...
Anyway here are the said links.
And now for the homepage...
Sunday, November 25, 2007
IS215 - Concurrent Processes Exercises - 2
11. Write a monitor solution to the readers and writers problem given in (8).
12. Outline a method of handling (detecting and recovering from) lost messages in a message passing system.
13. What issues are true for message passing implemented in distributed systems and that are not issues when message passing is implemented in single processor systems.
14. Trace the execution of the program for reading and writing to a buffer. Try to illustrate all possible executions of this program.
read()
{
while (TRUE) {
read(&item)
/* wait for empty buffer */
RECEIVE(write@uplb,&m);
construct_message(&m,item);
SEND(write@uplb,&m);
}
}
write()
{
while (TRUE) {
RECEIVE(read@upd,&m);
extract_item(&m,&item);
write(item);
SEND(read@upd,&m);
}
}
15. Compare and contrast the merits of semaphores over message passing and vice versa.
16. Show that semaphores, monitors and message passing solutions to the concurrency problem are equivalent.
17. Write a solution to the Dining Philosophers problem that contains
a) starvation problem
b) mutual exclusion violated
18. Write a correct solution to the Dining Philosophers problem that is different from the one given in book.
19. Show the correctness of the following solution to the Dining Philosophers problem:
int fork[5];
philosopher(i)
{
for( ; ; ) {
think;
while does not have both forks {
wait(fork[i]);
if (fork[(i+1) mod 5)] is free
wait(fork[(i+1) mod 5]);
else
signal(fork[i]);
}
eat;
signal(fork[i]);
signal(fork[(i+1) mod 5]);
}
}
20. Two brothers are seated opposite each other on a table with a plate of Palabok and fork. The action of each brother consists of alternate periods of picking food and chewing. The action starts by taking control of the fork, if successful starts to pick the food, then put the fork back on the table and starts to chew. After this, the cycle is repeated. A possible solution to this problem is the following:
jollibee()
{
/* execute in parallel */
brother(1) || brother(2);
}
brother(i)
{
while (TRUE) {
pick_fork();
pick_palabok();
put-Down_fork();
chew();
}
}
a) What are the possible problems that will be encountered by this solution?
b) When do the problems you identified occur? Give one instance for each problem.
c) Improve the solution using semaphores.
12. Outline a method of handling (detecting and recovering from) lost messages in a message passing system.
13. What issues are true for message passing implemented in distributed systems and that are not issues when message passing is implemented in single processor systems.
14. Trace the execution of the program for reading and writing to a buffer. Try to illustrate all possible executions of this program.
read()
{
while (TRUE) {
read(&item)
/* wait for empty buffer */
RECEIVE(write@uplb,&m);
construct_message(&m,item);
SEND(write@uplb,&m);
}
}
write()
{
while (TRUE) {
RECEIVE(read@upd,&m);
extract_item(&m,&item);
write(item);
SEND(read@upd,&m);
}
}
15. Compare and contrast the merits of semaphores over message passing and vice versa.
16. Show that semaphores, monitors and message passing solutions to the concurrency problem are equivalent.
17. Write a solution to the Dining Philosophers problem that contains
a) starvation problem
b) mutual exclusion violated
18. Write a correct solution to the Dining Philosophers problem that is different from the one given in book.
19. Show the correctness of the following solution to the Dining Philosophers problem:
int fork[5];
philosopher(i)
{
for( ; ; ) {
think;
while does not have both forks {
wait(fork[i]);
if (fork[(i+1) mod 5)] is free
wait(fork[(i+1) mod 5]);
else
signal(fork[i]);
}
eat;
signal(fork[i]);
signal(fork[(i+1) mod 5]);
}
}
20. Two brothers are seated opposite each other on a table with a plate of Palabok and fork. The action of each brother consists of alternate periods of picking food and chewing. The action starts by taking control of the fork, if successful starts to pick the food, then put the fork back on the table and starts to chew. After this, the cycle is repeated. A possible solution to this problem is the following:
jollibee()
{
/* execute in parallel */
brother(1) || brother(2);
}
brother(i)
{
while (TRUE) {
pick_fork();
pick_palabok();
put-Down_fork();
chew();
}
}
a) What are the possible problems that will be encountered by this solution?
b) When do the problems you identified occur? Give one instance for each problem.
c) Improve the solution using semaphores.
IS215 - Concurrent Processes Exercises - 1
1. Give two examples of competing processes in an actual system. Do the same for cooperating processes.
2. Write a procedure (different from what was given in this book earlier) use_resource() illustrating the following mutual exclusion problems:
a) starvation
b) mutual exclusion violated
c) deadlock
3. What is a monitor as used for regulating concurrent access to shared resources? Give examples of problems that may be eliminated by the use of a monitor.
4. Describe an approach to process synchronization. Illustrate your answer by outlining an algorithm for a cyclic buffering system; show how your algorithm works by considering the progress of a consumer and a producer processes as they advance through critical regions, get delayed on queues, etc.
5. When, and why, do processes need to synchronize their activities. Describe an approach to process synchronization based upon semaphores. Show how these may be used to solve two typical synchronization problems.
6. Illustrate or argue the correctness of the Dekker's algorithm? Do the same for the Paterson's algorithm and the engineering solution.
7. In order for the engineering solution to execute correctly, the test&set() function must be executed in one CPU cycle. Why is this so? What happens if this is not executed in one CPU cycle?
8. The readers and writers problem models access to a database. Consider a big database with many competing processes wishing to read and write into it. It is acceptable to have multiple processes reading the database at the same time, but if one process is writing, no other process may have access to the database, not even readers. Write a program employing semaphores that ensure correct execution of this.
9. What does the initial value of the semaphore s stands for?
10. Show that counting semaphores can be implemented using binary semaphores.
2. Write a procedure (different from what was given in this book earlier) use_resource() illustrating the following mutual exclusion problems:
a) starvation
b) mutual exclusion violated
c) deadlock
3. What is a monitor as used for regulating concurrent access to shared resources? Give examples of problems that may be eliminated by the use of a monitor.
4. Describe an approach to process synchronization. Illustrate your answer by outlining an algorithm for a cyclic buffering system; show how your algorithm works by considering the progress of a consumer and a producer processes as they advance through critical regions, get delayed on queues, etc.
5. When, and why, do processes need to synchronize their activities. Describe an approach to process synchronization based upon semaphores. Show how these may be used to solve two typical synchronization problems.
6. Illustrate or argue the correctness of the Dekker's algorithm? Do the same for the Paterson's algorithm and the engineering solution.
7. In order for the engineering solution to execute correctly, the test&set() function must be executed in one CPU cycle. Why is this so? What happens if this is not executed in one CPU cycle?
8. The readers and writers problem models access to a database. Consider a big database with many competing processes wishing to read and write into it. It is acceptable to have multiple processes reading the database at the same time, but if one process is writing, no other process may have access to the database, not even readers. Write a program employing semaphores that ensure correct execution of this.
9. What does the initial value of the semaphore s stands for?
10. Show that counting semaphores can be implemented using binary semaphores.
Subscribe to:
Posts (Atom)