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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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