Operating Systems 2026F Lecture 3: Difference between revisions

From Soma-notes
Created page with "==Video== Video from the lectures given on September 17th, 2026 [https://homeostasis.scs.carleton.ca/~soma/os-2026f/lectures/comp3000-2026f-lec03a-20260917.mp4 is now available]. There was no lecture on September 18th. ==Notes== <pre> Lecture 3A ---------- Processes - informally it is a running program On computers today, memory is byte addressible - byte is 8 bits, so a value between 0 and 255 (256 values) - memory is just an array of bytes Machine code (bina..."
 
No edit summary
 
Line 31: Line 31:
When you program in assembly, there are no data structures. There is no difference between code and data.
When you program in assembly, there are no data structures. There is no difference between code and data.
</pre>
</pre>
==Code==
<syntaxhighlight lang="c" line>
#include <stdio.h>
int main(int argc, char *argv[])
{
        printf("Hello %s how are you?\n", argv[1]);
        return 0;
}
</syntaxhighlight>

Latest revision as of 16:04, 18 September 2026

Video

Video from the lectures given on September 17th, 2026 is now available.

There was no lecture on September 18th.

Notes

Lecture 3A
----------

Processes
 - informally it is a running program

On computers today, memory is byte addressible
 - byte is 8 bits, so a value between 0 and 255 (256 values)
 - memory is just an array of bytes


Machine code (binary code) vs assembly code?
 - assembly code is a human readable form of machine code
 - note it is processor specific
   - x86-64
   - arm64
   - and many others

Assemblers convert text to machine code
Disassemblers covert machine code to text

When you program in assembly, there are no data structures. There is no difference between code and data.

Code

#include <stdio.h>

int main(int argc, char *argv[])
{
        printf("Hello %s how are you?\n", argv[1]);

        return 0;
}