- Type
- Highlighted handout
- Course
- CS609 System Programming
- Size
- PDF 2.4 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 2, 3, 4 of 336. Download the file for all 336 pages.
CS609-System Programming VU
Table of Contents
01 - Introduction, Means of I/O ........................................................................................... 3 02 - Interrupt Mechanism................................................................................................... 11 03 - Use of ISRs for C Library Functions .......................................................................... 19 04 - TSR programs and Interrupts ..................................................................................... 26 05 - TSR programs and Interrupts (Keyboard interrupt) ................................................... 33 06 - TSR programs and Interrupts (Disk interrupt, Keyboard hook) ................................. 40 07 - Hardware Interrupts .................................................................................................... 46 08 - Hardware Interrupts and TSR programs ..................................................................... 54 09 - The interval Timer ...................................................................................................... 68 10 - Peripheral Programmable Interface (PPI)................................................................... 76 11 - Peripheral Programmable Interface (PPI) II ............................................................... 83 12 - Parallel Port Programming ......................................................................................... 95 13 - Serial Communication .............................................................................................. 103 14 - Serial Communication (Universal Asynchronous Receiver Transmitter) ................ 110 15 - COM Ports ................................................................................................................ 117 16 - COM Ports II ............................................................................................................ 125 17 - Real Time Clock (RTC) ........................................................................................... 133 18 - Real Time Clock (RTC) II ........................................................................................ 146 19 - Real Time Clock (RTC) III ...................................................................................... 155 20 - Determining system information .............................................................................. 163 21 - Keyboard Interface ................................................................................................... 172 22 - Keyboard Interface, DMA Controller ...................................................................... 180 23 - Direct Memory Access (DMA) ................................................................................ 186 24 - Direct Memory Access (DMA) II ............................................................................ 192 25 - File Systems .............................................................................................................. 199 26 - Hard Disk .................................................................................................................. 207 27 - Hard Disk, Partition Table ........................................................................................ 216 28 - Partition Table II ....................................................................................................... 223 29 - Reading Extended Partition ...................................................................................... 229 30 - File System Data Structures (LSN, BPB) ................................................................. 236 31 - File System Data Structures II (Boot block) ............................................................ 244 32 - File System Data Structures III (DPB) ..................................................................... 249 33 - Root Directory, FAT12 File System......................................................................... 256 34 - FAT12 File System II, FAT16 File System ............................................................. 262 35 - FAT12 File System (Selecting a 12-bit entry within FAT12 System) ..................... 267 36 - File Organization ...................................................................................................... 274 37 - FAT32 File System ................................................................................................... 283 38 - FAT32 File System II ............................................................................................... 291 39 - New Technology File System (NTFS) ..................................................................... 301 40 - Disassembling the NTFS based file .......................................................................... 306 41 - Disk Utilities ............................................................................................................. 312
43 - Non-Contiguous memory allocation ........................................................................ 324 44 - Address translation in Protected mode ..................................................................... 329 45 - Viruses ...................................................................................................................... 332
What is Systems Programming?
Computer programming can be categorized into two categories .i.e.
While designing software the programmer may determine the required inputs for that program, the wanted outputs and the processing the software would perform in order to give those wanted outputs. The implementation of the processing part is associated with application programming. Application programming facilitates the implementation of the required processing that software is supposed to perform; everything that is left now is facilitated by system programming.
Systems programming is the study of techniques that facilitate the acquisition of data from input devices, these techniques also facilitates the output of data which may be the result of processing performed by an application.
Three Layered Approach
A system programmer may use a three layered approach for systems programming. As you can see in the figure the user may directly access the programmable hardware in order to perform I/O operations. The user may use the trivial BIOS (Basic Input Output System) routines in order to perform I/O in which case the programmer need not know the internal working of the hardware and need only the knowledge BIOS routines and their parameters.
In this case the BIOS programs the hardware for required I/O operation which is hidden to the user. In the third case the programmer may invoke operating systems (DOS or whatever) routines in order to perform I/O operations. The operating system in turn will use BIOS routines or may program the hardware directly in order to perform the operation. Methods of I/O
In the three layered approach if we are following the first approach we need to program the hardware. The hardware can be programmed to perform I/O in three ways i.e.
• Direct Memory Access
In case of programmed I/O the CPU continuously checks the I/O device if the I/O operation can be performed or not. If the I/O operations can be performed the CPU performs the computations required to complete the I/O operation and then again starts waiting for the I/O device to be able to perform next I/O operation. In this way the CPU remains tied up and is not doing anything else besides waiting for the I/O device to be idle and performing computations only for the slower I/O device.
In case of interrupt driven the flaws of programmed driven I/O are rectified. The processor does not check the I/O device for the capability of performing I/O operation rather the I/O device informs the CPU that it’s idle and it can perform I/O operation, as a result the execution of CPU is interrupted and an Interrupt Service Routine (ISR) is invoked which performs the computations required for I/O operation. After the execution of ISR the CPU continues with whatever it was doing before the interruption for I/O operation. In this way the CPU does not remain tied up and can perform computations for other processes while the I/O devices are busy performing I/O and hence is more optimal.
Usually it takes two bus cycles to transfer data from some I/O port to memory or vice versa if this is done via some processor register. This transfer time can be reduced bypassing the CPU as ports and memory device are also interconnected by system bus. This is done with the support of DMA controller. The DMA (direct memory access) controller can controller the buses and hence the CPU can be bypassed data item can be transferred from memory to ports or vice versa in a single bus cycle.
Related CS609 files
All CS609 files →- CS609 Midterm File 3 Midterm PDF 4.7 MB
- CS609 Quiz 1 Topics 1-57 by Lucky Quiz PDF 4.2 MB
- CS609 Handouts Set 2 Handout PDF 2.1 MB
- CS609 Highlighted Handouts by VU Topper RM Highlighted PDF 2.5 MB
- CS609 Handouts by VUBuddy Handout PDF 2.6 MB
- CS609 Highlighted Handouts Set 2 by VU Topper RM Highlighted PDF 3.2 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.