University of Cincinnati
20-ECES-427 OS Lab - Winter 2003
[ Home | Resume | News | Syllabus | Projects ]
Last updated: 3 Feb 2003

Operating System Lab Session

Course Projects

(subject to change, return often!)

[ Overview - Project 1 2 3 4 5 6 7 8 9 ]

Overview The Organization of Windows NT
Printable Lecture Slides in PPT format



Week 2 : Project 1 Managing Multiple Tasks
  • Processes and threads
  • the Task Manager
  • the Process Viewer
  • the Performance Monitor
  • in this project, you are to observe the behavior of Windows NT processes and threads. Every Windows NT installation has many different processes and threads in execution at one time. In this exercise, you will use various tools to observe the status and activity of these processes, threads and various other objects.
    Printable Lecture Slides in PPT format
    Resources
  • cpuload.exe
  • diskload.exe
  • pview.exe
  • pstat.exe
  • WORKSHEET



    Week 3 : Project 2 Writing Multithreaded Software
  • Invoking Windows NT services
  • Using object handles
  • Deteminriing the system time
  • Detail of the CreatProcess and the CreateThread functions.
  • In this exercise, you will write software that creates and uses multiple processes and multiple threads. It contains a lot of detailed information, so it has been partitioned into two parts. In part A you write code to create cultiple processes and in part B, you create multiple threads within a process
    Function Descriptions CreateProcess and CreateThread
    Sample Program
  • Creating a Process
  • Creating a Thread
  • Program Assignment Part A and Part B



    Week 4 : Project 3 Manipulating Kernel Objects
  • Kernel Objects and handles
  • The model for managing objects
  • How to use Waitable timers
  • This exercise focuses on kernel objects, including those used to synchronize multiple processes. You used kernel objects in previous project, but in this project you will look more closely at various facets of the objects.
    Function Descriptions WaitableTimer and TeminriateProcess
    Sample Program
  • Using WatiableTimer Object
  • Teminriate a Process
  • Program Assignment Program Requirement



    Week 5 : Project 4 Thread Synchronization
  • Windows NT synchronization principles
  • Critical sections
  • Synchronization mechanisms
  • Multithreaded operation- within or accross process address spaces - denpends on the ability of a constituent thread to coordinate its activity with the activity of another constituent thread. This exercise concentrates on general thread synchronization within a single process address space.
    Downloadable Course Slides
    Function Descriptions WaitForSingleObject and Mutex and Event and Semaphore
    Sample Programs - sources
  • Concurrent Execution
  • Critical Section Using Mutexes
  • Events
  • Thread Sychronization Using Semaphores
  • Sample Programs - binaries
  • Two threads competing the stdout
  • Two threads competing the stdout , once a thread controls the stdout, it prints all 30 numbers without being interrupted (critical Section).
  • After one control thread finishes its job, two threads compete for the stdout
  • Two threads prints 30 numbers in turn
  • Program Assignment The Producer-Consumer Problem



    Week 6 : Project 5 Interprocess Communication
  • The high-level File I/O model
  • More about using pipes
  • More about using the ReadFile and WriteFile functions
  • In this exercise, you explore Windows NT's facilities to support communication among threads that are implemented with different processes
    Downloadable Course Slides
    Function Descriptions CreateFile and ReadFile and WriteFile
    Sample Program
  • Sender and Getter
  • Main Process
  • Program Assignment Page 1 and Page 2



    Week 7 : Project 6 Virtual Memory
  • The organization of Windows NT virtual memory system
  • How to control your virtual memory space
  • How to write a monitoring and reporting tool
  • The details of VirtualAlloc, VirtualFree, VirtualLock, VirtualUnlock, VirtualQuery, GetSystemInfo and GlobalMemoryStatus
  • In this exercise, you will experiment with various aspects of Windows 2000's virtual memory mechanisms Unlike most other operating systems, 2000 provides an explicit API for manipulating certain aspects of the virtual memory. Usually, virtual memory is completely transparent to the application programmer.
    The Virtual-Memory Manager in Windows NT
    Memory Management Functions
  • Memory Query Functions:
    GetSystemInfo and GlobalMemoryStatus and VirtualQuery
  • Memory Manipulating Functions:
    VirtualAlloc and VirtualFree and VirtualLock and VirtualUnlock



  • Week 8: Project 7 Memory-Mapped Files
  • How to construct an application using memory-mapped files for IPC
  • Memory-mapped file design
  • The details of CreateFileMapping and MapViewOfFile
  • Memory Mapped files are the primary internal OS mechanism used to implement sharing across address spaces. This exercise introduces you to the memory-mapped files.
    Memory Mapped Files
    MM File Functions CreateFileMapping and MapViewOfFile and OpenFileMapping
    Sample Program
  • Using MMfiles (MSDN sample)
  • Two processes share a memory region using mmfile operations parent process and child process
  • Process synchronization parent process and child process
  • Program Assignment Write two processes. They share a memory region ( using mmfile functions ). One process modifies the memory, the other one should be able to observe the modification



    Week 9 : Project 8 Fast File I/O
  • The details of using CreateFile flags
  • The details of using asynchronous file I/O
  • Windows NT has two specific mechanisms, in addition to the normal approach, for increasing file I/O performance: the file caching and asynchronous I/O.
    Assignment Code
    Assignment Fatest File Filter



    Week 10: Project 9 Using TCP/IP
  • Microsoft Winsock socket
  • How to use the TCP/IP network protocols
  • Writing software with multiple input source
  • In this project, you experiment with Windows NT's facilities for IPC across a network, including the internet.
    Sample Server and Sample Client
    Assignment A proxy program. It gets the data from the client, send it to the server, get the reply from the server and forward the reply to the client.
    The basic routin
  • Creating a Socket Server Application
  • Creating a Socket Client Application
  • A list of Winsock API functions