Thursday, May 20, 2010

Operating Systems Project

السلام عليكم و رحمة الله

Today -الحمد لله- we delivered the OS project. I don't consider it a real 'Project'. Maybe I can call it a task :D. Everything was already written for us -not everything literally, we also wrote some- but the main things were made and we just completed some missing parts. Anyway we learned a lot at the end.

It was also divided to 3 parts:
- Implement a fault handler
- Implement a dynamic allocation/free function to make runtime allocations and frees the heap.
- Free the Working Sets.

My part was the third one. Freeing the pages and tables working sets and the directory table. It was so easy task, though not interesting!

We passed all testing scenarios successfully الحمد لله. so we didn't get a modification task.

There was a challenging task which was to invent a table replacement algorithm using the normal clock that minimizes the number of table faults during testing. We didn't have time to make it but doctors extended its delivery time to be with the practical exam, so إن شاء الله we'll try to make it.

That's all!



Monday, May 10, 2010

Architecture Project

السلام عليكم و رحمة الله

Today - الحمد لله - we delivered our architecture project, after 2 sleepless nights and 3 awake-less days ..

The project was divided to 3 main parts:
- making an Assembler
- making an Emulator
- modifying the given computer design to support interrupts.

Since our group members are only 3, each one of us got a part. My part, which I enjoyed a lot, was the Assembler, it had 2 main tasks to achive:
- produce machine code for the given assembly code.
- handle some syntax/compile-time errors. (or we may call it "Assemble-Time" :D)

Assembler's design was as follows:
1. a 'Scanner' class to scan the editor's text box and parse its lines, returns object of type 'ParsedLine'.
2. this parsed line is sent to 'FirstPass' class that does the First Pass operations (generating Address Symbol Tables, code & data tables with offsets, detect some syntax errors, ...)
3. then 'SecondPass' operates on tables generated by 'FirstPass', translates to machine code, detects some instructions' errors, and returns 'MemoryEntry' objects.

The best part was parsing the code lines and producing line tokens. We used C# RegEx classes. Other parts were just applying what was mentioned in the book and project document . This was so boring.

For the errors to handle, I handled 9/10 basic errors:
Invalid Label, Invalid pseudo instruction, Undefined operand, Unknown instruction, Memory reference out of range, Invalid value, Invalid no. of operands, Operand-instruction mismatch, label double definition.
Plus 8 other additional errors, and we got 8 bonus marks for that :)

Testing levels were 3 for the emulator, we passed level 3 and 2 successfully, level 1 test cases were full of mistakes, so the doctor asked us to run level 1 of yesterday and we passed it successfully too الحمد لله. To test the assembler we had 1 input assembly-code file to produce 1 machine-code file that should match with the correct machine code, and they were identical الحمد لله .
Then we were asked to modify both Assembler & emulator to support additional memory reference instruction, it was easy and we made it successfully.

My overall rating for the project is 7/10. I don't know why I'm not completely satisfied of it, but next projects I'll try to do better ان شاء الله.

At the end, I came up with a conclusion: "I love Architecture" :D I wouldn't have done such an interesting project if I didn't study it!









Wednesday, June 17, 2009

The difference between GPL and BSD

السلام عليكم و رحمة الله

I heard this sentence a day ago and wondered what does it mean..
I already know about the GPL but what's BSD ? :D

See this

and this



Monday, May 4, 2009

[Book] Concepts of Programming Languages

السلام عليكم و رحمة الله


I know it's not the suitable time for this :D. we r now in the lovely exams time so reading other books now is an act of madness !
But this book is totally differenttttttt ..
Concepts of Programming Languages, by Robert Sebesta .. 15 chapters of amazing information.
I've just noticed that I have this book 2 days ago and i only had a quick look at it .. the last 2 chapters I liked the most: "Functional & Logic Programming Languages".
chapter 2 also has some interesting things. "Evolution of the major programming Languages"
so,
I'll get more inside it in the summer vacation inshaAllah .. anyone want to share the reading journey with me ? :)




Thursday, April 9, 2009

Finally, I captured it !

السلام عليكم و رحمة الله

Few days ago, I was trying to take a screen shot from an AVI video.
so ..
printScreen button, MS paint, Ctrl + v, some cropping and resizing, save as, ok
Now came the problem. When I opened the saved file I got only a black square instead of the image I captured from the video !
I first thought it was a player problem, so tried different players but still can't get the captured image.
then after some googleing I got this:

Video playing on Windows machine, no matter if it comes from a movie file, Internet, VCD or DVD, can not be captured by regular screen capture methods, because it is usually playing in a hardware overlay. The overlay it almost as if there was another, smaller screen in front of your regular Windows desktop screen. The desktop contains in that place only the so called "overlay key color" - a solid block of color, usually black, blue, magenta or pink, but it can be anything.

How to deal with this problem? There are three methods to capture image from video and game screen:

You can check the three methods here.

and I recommend method 3 if you use a player other than QuickTime, Real or Windows media player. but note that it may slow down your video playing.
Don't know if this works for re-recording other videos playing on the screen or not, haven't tried it, but i think it will.

Happy Screen Shotting! :D

Friday, March 20, 2009

?Developer, Engineer, or Architect

السلام عليكم و رحمة الله

Found this, and liked to share it with u ..

Developer, Engineer, or Architect?

Sunday, January 25, 2009

The programmable programming Language, Lisp

السلام عليكم و رحمة الله

I've found a good article about the Lisp programming Language. Actually, I've heard much about this language but never thought it has that power before :D .. read the article and u'll gonna like Lisp as I did.

I'll leave u with the article and go to study that I.S :@ .. don't know why don't they replace IS with the Lisp! :D

Article here ..

I wish I can learn it one day .. may be in this vacation inshaAllah :) , if u know any extra info about Lisp, I'd be thankful if u sent them here ..

Thanks,





Monday, November 17, 2008

cout<<"Hello World";

السلام عليكم و رحمة الله

Everybody starts a new blog says at the first post : This is just a test ..
so ..


THIS IS JUST A TEST ..
:D

------
I don't know whether this blog is gonna be useful or not .. but i hope so .. that is the main aim that I'll work on inshaAllah :) ..

Why "Root Three" ??
u'll know later :D .. but for now, u may know that I love that number too much :D .. and this is another story ..