Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Spring 2023 Total Marks: 20

CS609: System Programming


Due Date: July 10, 2023
Assignment No. 02
Instructions:

Please read the following instructions carefully before submitting an assignment. It should be
clear that your assignment will not get any credit if:

▪ The submitted assignment does not open or the file is corrupt.


▪ You have not followed all steps described in all tasks of question.
▪ Assignment is copied (partial or full) from any source (websites, forums, students, etc.)
strict action will be taken in this regard.
NOTE:
You must upload only a SINGLE Word document (.doc or .docx). There is NO need to
attach a screenshot. If you provide screenshots, it will not carry any additional marks.

Objectives:

The objective of this assignment is to provide hands-on experience of System Programming


concepts including:
● Creating job object
● Defining limits for job objects
● Assigning process to job objects
● Basic understanding of Windows APIs used for job objects
Question 1: (20 marks)
Write C/C++ code for each task.
Suppose we have a handle ‘hProcess’ to a process named “MyProcess”.
Task1.
Create a Job object using Windows API by specifying its security descriptor as default and a particular
name for the job object.
Task 2.
After creating a named job object, use the SetInformationJobObject() Windows API and set limits for
your created job object as:
1. Set the value of JobObjectInformationClass as “JobObjectBasicUIRestrictions”
2. Define the instance of JOBOBJECT_BASIC_UI_RESTRICTIONS structure and assign its
specific value to its member UIRestrictionsClass to prevent the process associated with the job
object from reading data from the clipboard.
Task 3.
If the limits are successfully set, then assign the process to Job Object.

NOTE:
● Final output screenshots are NOT required in the question.
● Your solution should be a single Microsoft Word file (doc or docx) containing answers of both
questions. File in any other format will be awarded zero marks.

---BEST OF LUCK---

You might also like