250 likes | 404 Views
NFC-IET-2011. System Programming. Instructor : Somia Razzaq Lecture-01 Introduction Dated: March 07, 2011 Note: The lecture slides are taken from VU with slight modifications wherever it is needed. Course Grading. Quizzes(Surprise/Announced): 5% Assignments: 5% Final Project: 5%
E N D
NFC-IET-2011 System Programming Instructor: Somia Razzaq Lecture-01 Introduction Dated: March 07, 2011 Note: The lecture slides are taken from VU with slight modifications wherever it is needed.
Course Grading • Quizzes(Surprise/Announced): 5% • Assignments: 5% • Final Project: 5% • Class Participation, Attendance etc.: 5% • Mid. Exam: 30% • Final Exam. : 50% “Interaction is necessary, please ask question”
What is System Programming? Application Programming System Programming InputOutput Process
Three Layer Model • Accessing PC Hardware Application DOS BIOS H/W
I/O Main Memory CPU Register DMA Means of Input/Output Programmed input/output Interrupt driven Direct Memory Access (DMA)
Controllers • I/O control signals • Buffering • Error Correction and Detection I/O device I/O controller CPU
I/O Controllers • DMA controller • Interrupt controller • Programmable Peripheral Interface (PPI) • Interval Timer • Universal Asynchronous Receiver Transmitter
I/O Controller(Contd..)DMA Controller INPUT OUTPUT Main Memory DMA
I/O Controller(Contd..) Interrupt Controller • Handles the Priorities among hardware interrupt
File Management • Basics • Disk Structure • Disk Formatting • Sector and Clusters
Data Structure in File Management • File Allocation Table(FAT12, FAT16, FAT32) • Directory Structure • BPB(BIOS Parameter Block) • DPB( Drive Parameter Block) • FCBs(File Control Block)
Memory Management • Real Mode: processor can access only first one MB of memory to control the memory (in DOS) • Protected Mode: all of the memory interfaced with the processor can be accessed
Real Mode • Data Structures used for memory management are • Memory Control Block (MCB) • Program Segment Prefix (PSP) • Determining • Allocated memory • Free memory
Protected Mode • Data Structures used for memory management are • Local Descriptor Table (LDT) • Global Descriptor Table (GDT) • Interrupt Descriptor Table • Determine • Address Translation (Logical to Physical) • Exception Handling • Shifting from Real to Protected Mode
Virus Definition and States • Types of Viruses • Executable file • Partition table / Boot Sector Virus • Detection • Removal • Prevention
Device Drivers • It contains the routines which perform I/O operations on the device • Device Drivers for DOS • Device Drivers for Windows • Device Driver Development Kit (DDK)
Input D0 D0 D7 D7 Busy DR Strobe I/O Controller CPU Programmed input / output Output CPU
Interrupt Driven input / output Output Input D0 D0 D7 D7 Strobe INT Busy INT IBF ACK I/O Controller CPU CPU I/O Controller
DMA Driven I/O CPU I/O Main Memory Register DMA
Hardware InterruptsSoftware Interrupts What are Interrupts?
Program Flow 1 Steps 2 3 ISR Performing An I/O
Other Processing Computation for I./O I/O Time Interrupt Driven I/O
Other Processing Computation for I./O I/O Time Programmed I/O