Module 8: Input/Output and Operating Systems Flashcards

1
Q

I/O Controller

A

acts as a translator between digital (CPU) and analog (device); consists of three basic parts:

  1. electronics (convert device’s inputs into digital data the CPU can understand)
  2. status register
  3. data register(s)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Status Register

A

hardware register containing information about the state of the I/O device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data Register

A

stores the data being transferred to and from the I/O device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Isolation

A

in terms of the OS and I/O discussion, the OS isolates user programs from one another. a given user program should “feel” it owns the hardware but the OS actually owns it. all programs “believe” they own hardware but they are really using it in a time-sharing mode controlled by the OS.

  • -makes programs much easier to write
  • -makes the whole system more stable and secure
  • ***A can’t mess with B if it doesn’t even know B exists
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Polling

A

one of two techniques for working with I/O devices. Polling refers to requesting status from the I/O devices until there is status to be given. Sort of like “Mom/Dad, are we there yet? How about now? How about now?” model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Interrupts

A

second technique for working with I/O devices. The I/O sends a signal to the OS (called an “interrupt request”) to give its status. When the OS is ready, it deals with the interrupt (usually by invoking something like a TRAP).

–think of how you set up email on your smartphone: you can have the server send it to you (like the interrupt mode) or you can constantly check it (poll the server)!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Video display

A
  • entire display is memory-mapped
  • one memory location per pixel
  • memory region xC000 - xFDFF
  • —xC000 - xC07F is first row
  • —xC080-xC0FF is second row
  • to set pixel color, write to memory location
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Addressing a pixel

A

pixel at vmem[2][5] stored at: xC000 + (2 * 128) + 5
in general vmem[y][x] stored at: xC000 + (y * 128) + x
note indexing from upper-left corner of the display

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

TRAP

A

the TRAP instruction is very similar to JSR but it also elevates the privilege level of the CPU from 0 to 1

the purpose of the TRAP instruction is to allow a program to run in USER program memory

Because of TRAP’s limitation, the user can only jump into the first 256 rows of the OS. we shouldn’t install our TRAPS starting at x8000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

RTI

A

the RTI instruction is very similar to RET:

  • -it restores the PC back to the value saved in R7 (just like RET)
  • -but it also lowers the privilege level of the CPU from 1 to 0

purpose of the RTI instruction:
–allow a subroutine running in the OS program memory to return back to a caller in the USER program memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly