CS609 : System Programming

I like this Course

Course Info

Course Category

Computer Science/Information Technology

Course Level

Undergraduate

Credit Hours

3

Pre-requisites

CS201

Instructor

Prof. Dr. Yasir Daanial Khan
PhD
Abdul Wali Khan University, Pakistan

Course Contents

Windows Operating System Windows Evolution Windows Market Role Windows, Standards, and Open Systems Windows Principles 32-bit and 64-bit Source Code Portability When to use Standard C Library for File Operations A simple File Copy Program using Standard C Library A simple File Copy Program using Windows API File Copy Program using Windows Convenience Function Windows File System File Naming Conventions Creating and Opening Files Reading Writing a File Closing File Unicode and Generic Characters Generic Functions Unicode Strategies Reporting Errors Example: Reporting Errors Standard IO Devices Copying Multiple Files using Windows API Encrypting Files Windows File Management Windows Directory Management Console I/O Printing and Prompting on Console Printing Current Directory 64-bit File System File Pointer Arithmetic for File Specifying File Pointer Position using Overlapped Structure Getting File Size Random Record Updates using File Pointer File Attributes and Directory Processing More on File and Directory Attributes Temporary File Names Listing File Attributes Setting File Times File Processing Strategies File Locking Releasing File Locks Lock Logic Consequences The Registry Registry Keys Key Management Listing Registry Keys Exception and their Handlers Try and Except Blocks Filter Expressions Exceptions Codes Exception handling sequence Floating point exceptions Errors and Exceptions Treating errors as Exceptions Termination Handlers Better Programs with Termination Handlers Filter Functions Console Control Handlers Console Control Handler Example Vectored Exception Handling Memory Management Windows Memory Management Overview Introduction to Heaps Creating Heaps Managing Heap Memory Heap size and Serialization Using Heaps Working with Heaps A binary search tree using Heaps Memory Mapped Files File Mapping Objects Open Existing File Mapping Objects Mapping Objects to Process address space More about file Mapping Sequential File Access using File Mapping Sorting a memory mapped file Using Based Pointers Based Pointers: Example Dynamic Link Libraries (DLLs) Implicit Linking Exporting and Importing Interfaces Explicit Linking Explicit Linking a File Conversion Function The DLL Entry Point DLL Version Management Windows Processes and Threads Process Creation IDs and Handles Specifying the Executable Image and the Command Line Inheritable Handles Passing Inheritable Handles Process Identities Duplicating Handles Exiting and Terminating a Process Waiting for a Process Introduction to Environment Block (EB) A Pattern Searching Example Working in Multiprocessor Environment Process Execution Times Example of Process Execution Times Generating Console Events Simple Job Management shell Get a Job Number Listing Background Jobs Finding a Process Id Job Objects Using Job Objects Thread Overview Thread issues Thread Basics Thread Management Exiting Thread Thread Identity More on Thread Management Waiting for Threads C Library in Threads Multithreaded Pattern Searching Boss-Worker and Other Thread Models MergeSort: Exploiting Multiple Processors MergeSort: Threading Example Introduction to Program Parallelism Thread Local Storage Processes and Thread Priority Thread States Mistakes While Using Threads Timed Waits Fibers Fiber APIs Using Fibers Need for Thread Synchronization A Simple Solution to Critical Section Problem Volatile Storage Memory Architecture and Memory Barriers Interlocked Functions Local and Global Storage How to Write Thread Safe Code Thread Synchronization Objects CRITICAL_SECTION Objects CRITICAL_SECTION for Protecting Shared Variables Protect a Variable With a Single Synchronization Object Producer-Consumer Problem Sample Program for Producer-Consumer Problem Mutexes Mutexes, CRITICAL_SECTIONs and Deadlocks Mutexes vs CRITICAL_SECTIONs Semaphores Using Semaphores Semaphore Limitation Events Event Usage Models Producer-Consumer Solution Using Events Windows Synchronization Objects Programming Guideline using Mutexes and CSs More on Interlocked Functions Memory Management Performance Synchronization Performance Impact Gauging Performance Impact of Synchronization Performance Analysis of NS, IN, CS, and MX False Sharing Contention Tuning the Performance with CS Spin Counts Setting the Spin Count Slim Read/Write Locks (SRWs) APIs for SRWs Improved Locking through SRWs Reducing Thread Contention Semaphore Throttles Thread Pools Thread Pools APIs Using Thread Pools Alternate Methods for Submitting Callbacks Process Thread Pool Other Threadpool Callback Types Locking Performance Extended Parallelism Parallel programming Alternatives Parallelism Framework Challenges in Parallelism Programming Processor Affinity Affinity Masks Interprocess Communication Anonymous Pipes I/O Redirection using Anonymous Pipes Named Pipes Using Named Pipes Creating Named Pipes Named Pipe Client Connections Named Pipe Status Functions Named Pipe Connection Functions Client-Server Named Pipe Connection