Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Overview of Computers (OC) : DR - Raja Vara Prasad

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

Overview of Computers(OC)

Dr.RAJA VARA PRASAD

IIIT Sri City, Chittoor

September 19, 2019

1/1
Device Controller
Communication between the CPU and
the I/O devices

Computer

Device Controller

Input/Output Device
Device Controller
AT Keyboard Status Register
Bit 7: Parity error
0: OK. 1: Parity error with last byte.
Bit 6: Timeout
0: OK. 1: Timeout on transmission from keyboard to keyboard controller.
Bit 5: Auxiliary output buffer full
0: OK. 1: Timeout on transmission from keyboard controller to keyboard.
This indicates that no keyboard is present.
Bit 4: Keyboard lock
0: Locked. 1: Not locked.
Bit 3: Command/Data
0: Last write to input buffer was data. 1: Last write to input buffer was a
command.
Bit 2: System flag
Set to 0 after power on reset. Set to 1 after successful completion of the
keyboard controller self-test.
Bit 1: Input buffer status
0: Input buffer empty, can be written. 1: Input buffer full, don't write yet.
Bit 0: Output buffer status
0: Output buffer empty, don't read yet. 1: Output buffer full, can be read.
Source: https://www.win.tue.nl/~aeb/linux/kbd/scancodes-11.html
I/O Processor

CPU I/O processor

System bus

Bridge

I/O bus

Shared
Memory
Controller Controller Controller
Device Driver
Device Driver
An Example
Command Controller Action
pan(±ɵ) Pan the camera view by ±ɵ
tilt(±ɵ) Tilt camera position by ±ɵ
zoom(±z) Zoom camera focus by ±z
Start Start camera
Stop Stop camera
memory Set memory buffer address for data
buffer(M) transfer to M
number of Set number of frames to be captured
frames (N) and transferred to memory to N
enable interrupt Enable interrupt from the device
disable Disable interrupt from the device
interrupt
start DMA Start DMA data transfer from
camera
An Example
// device driver: camera
// The device driver performs several functions:
// control_camera_position;
// convey_DMA_parameters;
// start/stop data transfer;
// interrupt_handler;
// error handling and reporting;

// Control camera position


camera_position_control
(angle pan_angle; angle tilt_angle; int z) {
pan(pan_angle);
tilt(tilt_angle);
zoom(z);
}

// Set up DMA parameters for data transfer


camera_DMA_parameters(address mem_buffer;int num_frames) {
memory_buffer(mem_buffer);
capture_frames(num_frames);
}
An Example
// Start DMA transfer
camera_start_data_transfer() {
start_camera();
start_DMA();
}

// Stop DMA transfer


camera_stop_data_transfer() {
// automatically aborts data transfer
// if camera is stopped;
stop_camera();
}

// Enable interrupts from the device


camera_enable_interrupt() {
enable_interrupt();
}

// Disable interrupts from the device


camera_disable_interrupt() {
disable_interrupt();
}
An Example
// Device interrupt handler
camera_interrupt_handler() {
// The upshot of interrupt handling may
// to deliver “events” to the upper layers
// of the system software
// which may be one of the following:
// - normal I/O request completion
// - device errors for the I/O request
//
// code will perform the interrupt handling
}
Peripheral Devices
Device Input/output Human in Data rate (by 2008) PIO DMA
the loop
Keyboard Input Yes 5-10 bytes/sec X
Mouse Input Yes 80-200 bytes/sec X
Graphics display Output No 200-350 MB/sec X
Disk (hard drive) Input/Output No 100-200 MB/sec X

Network (LAN) Input/Output No 1 Gbit/sec X

Modem Input/Output No 1-8 Mbit/sec X

Inkjet printer Output No 20-40 KB/sec X X


Laser printer Output No 200-400 KB/sec X
Voice Input/Output Yes 10 bytes/sec X
(microphone/speaker)
Audio (music) Output No 4-500 KB/sec X
Flash memory Input/Output No 10-50 MB/sec X

CD-RW Input/Output No 10-20 MB/sec X

DVD-R Input No 10-20 MB/sec X

PIO: Programmed Input/Output, DMA: Direct Memory Access


Dynamic Loading of Device Drivers
• Device drivers can be Plug and Play
• New device is connected, generates interrupt
• OS looks through its list of device drivers and
finds correct one*
• Dynamically Loads and links driver into
memory

*If no driver found has to request user supply driver


Servers
Servers
• a server is a computer program or a device
– that provides functionality for other programs or
devices, called "clients"
Servers
• a server is a computer program or a device
– that provides functionality for other programs or
devices, called "clients“

• This architecture is called the client–server


model
– a single overall computation is distributed across
multiple processes or devices
Servers
• Servers can provide various functionalities,
often called "services“
– such as sharing data or resources among multiple
clients, or performing computation for a client
Servers
• Servers can provide various functionalities,
often called "services“
– such as sharing data or resources among multiple
clients, or performing computation for a client

• Typical servers are


• database servers, file servers,
• mail servers, print servers,
• web servers, game servers,
• computing servers, etc.
IIITS GPU Server
• IIITS GPU Server
Software ?
Software
• Software, in its most general sense, is a set of
instructions or programs instructing a
computer to do specific tasks.

• Software is a generic term used to describe


computer programs.

• Scripts, applications, programs and a set of


instructions are all terms often used to
describe software.
Layers of Software
Users
Application software
System software

Hardware
Layers of Software
Users
Application software
System software

Hardware What is Hardware?


Layers of Software
Users
Application software
System software

Hardware What is Users?


Layers of Software
Users
Application software
System software

Hardware What is Users?

Operating
Application and
software systems
software
Users
Hardware
Layers of Software
Users
Application software
System software

Hardware What is Application SW?


Layers of Software
Users
Application software
System software

Hardware

Application Software
Programming languages
Assembly language
Banking software
Office, etc.
Layers of Software
Users
Application software
* The Big Picture *
System software
Application software
It is the reason that one wants
Hardware to buy a computer:
• printout out paychecks
• play Mortal Kombat
• keep track of a stamp collection
• do your taxes
• generate a fancy newsletter
Application Software
• guide robots
Programming languages
Assembly language • keep a budget
Banking software • draw a flowchart
Office, etc. • browse the Web
• design a car
Layers of Software
Users
Application software
System software

Hardware What is System SW?


Layers of Software
Users System Software
Application software
• Is an interface or buffer
System software between application
software and hardware
Hardware
• Controls the computer
hardware and acts as an
interface with applications
programs
Layers of Software
Users System Software
Application software Operating Systems
An operating system is the
System software software that bridges the gap
between the system and the
Hardware user.
Layers of Software
Users System Software
Application software Operating Systems
An operating system is the
System software software that bridges the gap
between the system and the
Hardware user.
Utility Programs
Utility software performs actions
essential for protecting, guiding,
securing, and storing
information or data
appropriately in the system.
Layers of Software
Users System Software
Application software Operating Systems
An operating system is the
System software software that bridges the gap
between the system and the
Hardware user.
Utility Programs
Utility software performs actions
essential for protecting, guiding,
securing, and storing
information or data
appropriately in the system.
Language Translators
Interpreters
Compilers
Layers of Software
Users System Software
Application software Operating Systems
An operating system is the
System software software that bridges the gap
between the system and the
Hardware user.
Utility Programs
Utility software performs actions
essential for protecting, guiding,
securing, and storing
information or data
appropriately in the system.
Language Translators
Interpreters
Compilers
Device Drivers
Software for handling the
peripheral devices
Operating System Functions
 Perform common computer hardware functions
 Provide an user interface
 Provide a degree of hardware independence
 Manage system memory
 Manage processing tasks
 Provide networking capability
 Control access to system resources
 Manage files
Utility Software
• Utility software (a type
of system software) is
designed to help you
monitor and configure
settings for your
computer system
equipment, the
operating system, or
application software.

Chapter 3: Computer Software 4


Language Translators
 Systems software that converts a programmer’s
source code into its equivalent in machine language
 Compilers
 Interpreters
Language Translators
 Systems software that converts a programmer’s
source code into its equivalent in machine language
 Compilers
 Interpreters

Source code
High-level program code written by the programmer
Object code
Another name for machine language code
Compilers
A language translator that converts a complete
program into machine language to produce a
program that the computer can process in its
entirety
Compilers
Step 1: Translate program

Machine
Computer
Compiler language
program
program

Step 2: Execute program

Machine
language
program
Interpreters
A language translator that translates one
program statement at a time into machine code

Machine
Program
Interpreter language
statement
statement

Statement
execution
Linker
Linker
Linker
Linker
Loader

Loader -
• loads the executable code into memory
• creates the program and data stack
• initializes the registers
• starts the code running
Device Drivers
• A device driver is software that helps a peripheral
device establish communication with a computer.

Chapter 3: Computer Software 15


BIOS

Chapter 3: Computer Software 16

You might also like