systems architecture Flashcards
why was web assembly developed
web browsers displayed html pages which were static but people wanted more dynamic pages
what is the purpose of web assembly
an environment to run any program in a browser without having to use a specific programming language
like a virtual machine within a web page
separate form the web page
what does DOM stand for and what is it
document object module; the data structure you’d interact with to change the webpage (essentially the webpage)
what do you do instead of interacting with the webpage directly
you have to load in external modules that allow you to interface with the webpage (usually through the javascript runtime in the browser)
what is memory like in web assembly
a linear sequence of bytes
memory is for data not code/instructions
Harvard architecture; data and instructions separate
no self modifying code
what types of instructions does wasm have
all assembly instructions
structured instructions; loops if statements etc
data has types
.wat
textual format for wasm
.wasm
binary format for wasm
most common representation
wasi
web assembly system interface; developed so people could use wasm outside of web pages
enables wasm to be used as a systems language or running on servers as an embedded scripting language
what are some problems with imbedded system languages and how could you get around them
security; can filter your inputs but people can get around this
the embedded program can access everything the program can; can use a virtual machine as they’re secure and nothing can escape them unless you do it purposefully
containers
a delivery mechanism that freezes os libraries utility tools etc so you can ship them to someone else and everything needed to run the program is in it but its still accessible to you
interactive programs
pauses and waits for the user inputs
batch programs
dont need a user input as they just continuously running
what type of connections does a tv have
all analogue
how does interlaced video work
breaks the image up into two fields (odd and even rows) showing half the image at a time
what are some positive and negatives of interlacing video
- refreshing double the rows
+ refreshing each row half as often - each phosphor has to maintain its glow for half as long causing the image to flicker
what are monitors
display equipment without a built in rf receiver for tv signals
what are some benefits fo the lcd/flatscreen
fixed resolution
scaling
efficient
light
crt
cathode ray tube; heavy
variable resolution and refresh rate
built in smoothing
what is the dominant digital connector
hdmi
why do graphics card need to have high speed
graphics involve huge amounts of data just in the image and will also need recources to make the images uploaded to them
what is the purpose of direct memory access (dma)
allow a controller within the computer to give commands for the memory access instead of the cpu doing everything
what is a negative of dma
because only one thing can use a bus at a time the dma and cpu signals may over lap or shock itself out
what is bus mastering and what can it be used for
the cpu disconnects from buses and gives control to something else
I/o devices
rendering
the process of drawing 3d graphics
in which two ways can data be stored for 2d graphics
store all the 1 bits then all the 2 bits etc then the image is represented by all these bit planes being combined (none of the pixels ars actually stored together)
store all the bits of colour information for a pixel together then repeat for all pixels in the image
how do colour modes work
uses the pallete approach:
pallete numbers (basically an id number) are stored which maps to rgb values therefore the image data is smaller and to change one colour you only have to change one value
what is a negative of using colour modes
the more colours you have the longer the id number will be so it gets to a certain point where you may aswekk just use rgb values
what are 2 2d graphics operations
‘blit’ing
sprites
‘blit’ing
used when you want to move a rectangle of image data to another location using a blitter
why dont we use memcopy() instead of blitting
time consuming and awkward
wouldn’t work for overlapping as you would just lose data
why do we use sprites
when you want to move a character you would’ve had to draw it then repaint the background which would be time consuming and twice as long
what are sprites
hardware support for small graphics region that could be drawn on top of the main image without overwriting the data so you can move them without redrawing the background
the hardware is told the screen location of the sprite and automatically drawn it there when rendering
eg cursor and mouse
how was 3d rendering initially done and what was the solution to this method
perspective projection; convert the 3d coordinated into 2d in a way that shows depth using a 4 x 4 matrix
created 3d accelerators as 3d rendering requires a lot of math
what are some examples of accelerated features that have been added to graphics cards
texture acceleration
texture compression
cube mapping; quickly render reflections and skyboxes
video acceleration
hardware transformations and lighting
accelerated lighting
different cards supported different features
graphical apis
eg. open gl
means you dont have to rewrite code to support a new card
acta s a middleware between user application and hardware
why is important for graphics card physics to be good
when things done look right the human eye notices v easily as we know how things should behave
how do graphics card work with physics
game middleware libraries eg physX implement real time physics simulations to help accelerate physics calculations
what are some different aspects of physics that should be covered
motion gravity destrcution
water flames cloths
rigid and soft body physics skeleton joints etc