Simulate fdisk command for allocating partitioning on a disk

Assignment Help Operating System
Reference no: EM131066615

Integrative Programming

Assignment- Simulating Linux FDISK in TCL

Objective:

To simulate the FDISK command for allocating partitioning on a disk.

Inputs:

- Input text file consisting of disk allocation information (device, starting location, ending location, block size, id, file system)
- User choice: (‘n'-Create a new partition, ‘d'-Delete a partition, ‘p'- Print the partition table, ‘w'-Write the partition table and exit, ‘q'-Quit without saving changes)

Output:

- Display of disk allocation information in a partition table
- Output text file consisting of disk allocation information (device, starting location, ending location, block size, id, file system)

Specification:

The program maintains disk partition allocation information among multiple logical devices.

Any user input should consist of:

(1) a visible prompt (requiring the use of: "flush stdout" after: puts -nonewline "prompt string"

(2) setting the user input to a new variable (requiring the use of: "set var [gets stdin]")

Each option should be implemented as a separate function, so that its function can be called using either a (i) switch or an (ii) if-elseif-else statement.

The disk partition allocation information will be loaded from an input file and stored in a list. The list will be passed as a parameter from the "main" portion of the script to the appropriate function in the file and updated according to the function. To search for a pattern within a list (for checking if a device label exists/doesn't exist), use: lsearch $list $pattern* which returns -1 if the pattern is not found, or the first instance of the pattern within the list if found.

Initially, the program prompts for an input text file to read from. If the file does not exist, it should be created. The program should then loop until the user chooses to quit (either selects choice as 'w' or ‘q'). If the user enters an illegal status, the program will prompt again for the status input. Upon quitting, the program prompts the user to save the list to an output file with the same name as the original input text file.

Attachment:- asmt3_Al.tcl

Reference no: EM131066615

Questions Cloud

Airline claims that the no-show rate for passengers : An airline claims that the no-show rate for passengers is less than 5%. In a sample of 420 randomly selected reservations, 19 were no-shows. Use the z-test for proportions and test the airline's claim. Use a = 0.01. Solution:
Complete a rough draft for the market research : You are to complete a rough draft for the "Market Research" in the GE Project (from the syllabus). Additionally, in your post, please also discuss who your main competitor is and why.
Effects of the insecticide ddt on wild birds : Assume that an ecologist is studying the effects of the insecticide DDT on wild birds in Sumatra. DDT sprayed on insects and vegetation subsequently eaten by female birds seems to affect the thickness of their eggshells and thus affects the protec..
Amount of baldwin cash flow from assets : During the year, the firm issued $45,000 in net new equity and paid off $16,000 in long-term debt. What is the amount of Baldwin's cash flow from assets?
Simulate fdisk command for allocating partitioning on a disk : To simulate the FDISK command for allocating partitioning on a disk. Output text file consisting of disk allocation information (device, starting location, ending location, block size, id, file system).
Building a new factory to produce aluminum baseball bats : (Net present value calculation) Dowling Sportswear is considering building a new factory to produce aluminum baseball bats. This project would require an initial cash outlay of $4,000,000 and would generate annual net cash inflows of $900,000 per ..
Computing the project internal rate of return : If you know that the project has a regular payback of 2.9 years, what is the project's internal rate of return?
Find the probability that the mean amount of time spent : The length of time sixth graders watch television each day is normally distributed with a mean = 118.3 minutes and standard deviation = 43.1 minutes. Use this information to answer the following:
Preparation of consolidated financial statements : 1) How are prime users considered in the preparation of Consolidated Financial Statements? (limit 200 words); 2) The differences that would arise in the consolidated financial statements of Springfield Ltd if the non- controlling interests were cl..

Reviews

Write a Review

Operating System Questions & Answers

  Medical management committees are convened for nearly all

medical management committees are convened for nearly all large health care systemsorganizations who determine which

  Difference between eigrp and ospf

Imagine that you are a network engineer tasked with implementing either an EIGRP or OSPF solution for your routers.

  Management information systems

Analyze and apply the content from a minimum of 3-recent articles about a topic of interest covered in the module.

  Write a paper describing the operating systems

Write a paper describing the operating systems used by Huffman Trucking

  Define critical path and cpm

Define Critical Path and CPM. Define Networks & Network scheduling

  The lamport''s clock and vector clock equations

If each process uses a different value for d in the Lamport's clock and vector clock equations, will the logical clocks and vector clocks schemes satisfy the total order relation => and the relation: a â--> b iff t^a

  Identify specific capabilities of computing

The creation and use of calculating technology enables new capabilities. For example, information and decision rules can be captured and copied more easily,

  What are the values of the list array after execution

For each of the following parameter-passing methods, what are the values of the list array after execution?

  Assignment of parquet definetion

What is parquet definetion and repition level.

  Question about security policy

ABC Corporation is a small but growing manufacturing corporation with revenues of approximately $25 million. Until now, the corporation has had a single headquarters and production facility in a Midwestern city,

  What type of information is kept in a rom

What type of information is kept in a ROM, and how does that information originally get into the memory?

  What is the maximum sustainable net data rate

When a 1024-bytes message is sent with AAL 3 / 4, what is the efficiency achieved? In other words, what fraction of the bits transmitted are useful data bits? Repeat for AAL 5.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd