CSCI 4630
Spring 2000
Programming assignment 3

Due: April 10, 5:00pm. Programs are usually broken up into one or more text segments, which contain the program itself and possibly some constants, and one or more data segments, which contain variables, arrays, etc.

Normally, a program does not modify the contents of the text segment. Some operating systems mark text segments as read-only, both for improved error checking and to allow more than one process to share page frames in the text segment. For example, a library function might be used by more than one running process; it can be put into a shared page frame, as long as the operating system is sure that no process can modify that page frame.

The assignment

Choose an operating system to which you have access. Recommendations are systems running in the lab, Windows NT or Solaris 7. Write a program that tries to modify its own text segment. See if the attempt to modify the text segment is trapped.

Send you program to me by email. Attach your program. In the body of the message say (1) what operating system you used and (2) whether the system allowed you to write to the text segment.