supplementary_lecture_3

supplementary_lecture_3 - Supplementary lecture 3 Zhiyuan...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
cs4411 – Operating Systems Practicum October 14, 2011 Zhiyuan Teo Supplementary lecture 3
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Administrative Information Machine endianness Today’s lecture Network header generation General implementation hints Discussion
Image of page 2
Project 3 updated on Sunday, 9 October. Administrative Information - Please re-download if you used the initial version we released. - Project 3 slides and the instructions have been amended. Groups may be reshuffled. Test cases for project 2 are in the project 3 bundle. - Test your implementation to make sure preemption and alarms work. - We will not be grading you on preemption and alarms, but it will be used later on.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Memory is organized as an array of bytes. Machine endianness - Actual ordering of bytes in memory does not change the value stored. - Ordering of bytes does not change final result of arithmetic shift operations. Machine endianness refers to the physical ordering of bytes within the memory for the multibyte data item. Multibyte data items such as integers and shorts take up more than 1 byte of storage. - 4 bytes for an integer. - 2 bytes for a short.
Image of page 4
Machine endianness 12 34 56 78 Big-endian (SPARC, DLX, etc): 32 bitvalue: 0x12345678 de ad 16 bitvalue: 0xdead 78 56 34 12 32 bitvalue: 0x12345678 ad de 16 bitvalue: 0xdead Little-endian (Intel, VAX, etc): Humans write in big-endian form; it feels more natural to read.
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Short answer: nobody knows. Which endianness is better? - Simpler processor hardware implementation: first byte is 256 0 , second byte is 256 1 , third byte is 256 2 and so on. - Addition of two little-endian values is faster. Advantages of little-endian representation: Advantages of big-endian representation: - Faster when determining an approximation to the stored value.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern