13+14 Flashcards
What is RAM and ROM?
ROM(Read only memory) is a special type of RAM which keeps its contents on power off.
Where to we store the value of the reset vector(and the location it branches too? Why? How?
In the ROM. This is done to ensure the value is there at power on. To do this we divide up the address space into ROM and RAM and then place the value in the ROM
What happens at Power-On:
interrupt vector in ROM set to branch somewhere else in ROM. Program does a power on self test, starts operating system(run program loaded from disk). Often the ROM will contain the BIOS (basic input output system). Remainder of address space is dedicated to RAM.
What is memory mapped IO?
Map the peripheral device to memory and then use it via the memory.
What is isolated I/O?
Use a seperate control line to control IO devices, using special IN and OUT instructions and writing contents of registers to I/O “ports”. This requires special hardware and instructions in the CPU, but saves memory space.
What is polled IO?
Check status register of each peripheral device, if data request bit set then read byte, check status register to see if finished. If busy bit is set then the device is finished, if not, read more bytes. This wastes a lot of CPU time.
What is a better solution than polling?
Interrupts, CPU is running a program, at end of each instruction it checks IRQ line. If signaled then: stop program, save state of CPU on stack, load value from ROM, jump to program (typically) in ROM, run that program. Restore the state of the CPU, continue with previous task.
How do we deal with multiple interrupts? How many interrupt vectors does the CPU need?
We could use multiple interrupt lines depending on urgency. The CPU only really needs one interrupt vector if it is connected to a device that multiplexes interrupts.
A software poll involves the CPU checking each status register bit. A Daisy chain involves the CPU sending an interrupt acknowledgement which propagates through each device until signalling device is reached, the device then places its interrupt handlers address on the data bus.
What is a non maskable interrupt?
A very important one, can’t be interrupted.
What is direct memory access?
DMA controller is told by CPU where to read from, where to write and how many bytes, then DMA controller does transfer, allowing CPU to only be involved at beginning and end, saving time
What is an operating system?
A program which acts as an intermediary between the hardware and user. It controls all the system’s resources, deciding how they are allocated.
What is the OS kernel?
The code running with the highest privilege in the machine, directly accesses hardware and handles service requests.
What is kernel and user space?
Kernel space is protected space where software can access any hardware. User space is non-privileged space meaning it must be permitted to use hardware by OS kernel.
The CPU can tell if software is run in kernel or user space via a bit in its status word (set on for interrupt or system call, set off if switched to non privileged software).
What is a process?
A program in execution.
What does storage cover? What is a file system?
primary storage(main memory), secondary storage(hard disk), tertiary storage(floppy disks, tapes, CDs) etc. The file system is the mechanism by which the user accesses/manipulates stored data in secondary storage.