Create an USB based GDB kernel
: You need a Linux System with "root" permission for the same.
Download this zipped file from
, unzip it and read the "README" file to create the usb disk.
Boot a raw mother board with the USB disk as formatted above. Connect the raw mother board to a linux host through a serial cable.
Follow the steps as listed in this
to see the exercise 1 running.
Matrix Multiplication in Protected Mode : For the assembly program - Click Here.
The objective of this assignment is to
help you understand the basics of segmentation, and the working issues in compilation related to function calls.Write an assembly code that takes in two matrices A10*20 and B
20*30 in row-major form from the data segments DS and ES respectively, and multiplies them, storing the resultant matrix C10*30 in data segment GS, also in row-major
form. The matrices A and B are generated randomly by a C-program, which also multiplies these two matrices to produce the matrix C, which is eventually stored in data segment FS. The
assembly code also compares the matrices stored in data segments FS and GS to find out whether multiplication has been done correctly or not.
The multiplication should be done in protected
mode. Segments DS, ES, FS, GS and SS need to be precisely described in the GDT, with tight limits. The multiplication of two 32-bit integers must be done through a procedure call.
Task Switching in Protected Mode: Four tasks, Task 0, Task 1, Task 2 and Task 3 are created. The Task 0 is the default task. The code segment for each
task is of privilege level 0, 1, 2 and 3 respectively. Each task has its own data and stack segments, and a TSS descriptor, for its TSS. The program should do the following:
Click for the code here.
- Swith from Task 0 to Task 1 to Task 2 to Task 3 using jump statements directly trough TSS Descriptors.
- Call as procedure, some code belonging to code segment of Task 1 using a call gate.
- Return (far) from that procedure back to Task 3's code segment.
- Switch back from Task 3 to Task 2 to Task 1 to Task 0 using jump statements through task gates.
- Before doing (4) above, a General Protection Fault is generated in Task 3, while trying to access a data segment of Task 2.
- A separate exception task (of PL 0) is created which handles the above exception. A task gate to this exception task is entered in the interrupt descriptor table.
Paging in Protected Mode: To implement paging in protected mode by setting up
the page directory and page tables. The six pages from a000 to ffff must be identically mapped. All other pages in virtual memory can be mapped to either of the two pages starting b000
to cfff alternatively and one far page must also be mapped to the page starting a000 to afff. The following need to be done:
Click for the code here.
- Access (both read and write) a far page in virtual memory and see that you are actually accessing a page from b000 to cfff.
- Jump to a far page (mapped to the code page) so that you actually jump to the next line in the code. Return back.
- Create a page fault by trying to acess a page whose 'present' bit is 0, in the page table. Handle this exception appropriately.
GPU Computing with CUDA
Deadline for Lab Assignments
- Matrix Multiplication with funtion call + Segmentation - (15th February)
- Task Switching - (5th March)
- Paging + Page Fault - (15th March)
- GPU + Open MP - (1st April)
- Simics - (15th April)