Assignment 1
We know that there are different disk allocation methods that help the operating system
decide how disk blocks are allocated for files. In the contiguous disk allocation method, each
file occupies a set of consecutive addresses on the disk. While this makes file allocation
easier, an increase in the file size means that it has to be assigned elsewhere on the disk.
The linked disk allocation method requires including a pointer in the current file, which points
to the location of the next file. This method makes better use of disk space, but can make
file access times longer.
Consider this scenario - A file has 100 blocks.
Write a program in C to calculate the disk I/O operations required for each allocation method
- contiguous and linked, assuming the following:
1. For the contiguous allocation method, one block is added to the end.
2. For the linked allocation method, one block is added to the end and only the address of
the starting block is in the memory.
Assignment 2
In this assignment, you will design the class Member and implement it using C++ or Java
Programming language.
Each object of Member class can hold the name of a person, member ID, number of books
bought and amount spent (these are the data members of the Member class).
Include the methods to perform the various operations on the objects of the class Member,
for example, modify, set, and show a person's name. Similarly, update, modify, and show
the number of books bought and the amount spent.
Write the definitions of the methods of the class Member and create one Member object (in
the main method), assign data to the object and display it on the screen.
Get Free Quote!
363 Experts Online