1. The home position is at (240, 360, 180) from the origin. The origin lies on...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. The home position is at (240, 360, 180) from the origin. The origin lies on the top of the part as shown in Figure 1. The thickness of the part is 9 in. The end mill tool to be used has a tool index 04, with a diameter of 10 in. Write an NC program to machine the outer profile, given the following conditions: Spindle speed 900 RPM Feed rate 50 in/min Depth of cut = 1.25 in Retract height = 2 in above the top surface The contour motion should be performed in the clockwise direction, starting from the origin. R20 50 -38 -R7 13 -21-14.10- 31.50 R8 87 -24- Figure 1 - All dimensions in inches. I -R10 34.50 Question 3 Implement system security and access control in Linux operating system. You could also describe how the processes are managed after you have implemented your script. Using Ubuntu OS, write and implement ONE (1) bash shell script (only one script should be written for whole Question 3). You are to use the root account to execute the script. The script will implement a modified version of Shortest Process Next (SPN) scheduling algorithm. The bash shell script should have the following specifications: Q3(a) 1. The script will prompt the user to enter a text file (.txt) in the current folder (Note: each line of the text file consists of arrival time and service time of a process). As an example, if there are six processes, and the processes arrival time are 0, 1, 4, 5, 6, 9, and the service time are 3, 5, 5, 1, 3, 1, then the text file will have 6 lines, and the content of the text file will be as follow (use colon as delimiter between arrival time and service time): 0:3 1:5 4:5 5:1 6:3 9:1 2. It will check whether the text file exist in the current folder, and if the text file does NOT exist, it will ask the user to re-enter the text file (it will keep asking until the user enter a text file that exists). 3. It will read in the values from the text file and display the number of processes on the screen. (15 marks) Q3(b) 1. It will then calculate the finish time for each process and display each process finish time on the screen (the time needs to be displayed in ascending order). 2. It will also calculate the turnaround time for each process and display each process turnaround time on the screen (the time needs to be displayed in the order as correspond to point 1). 3. The average turnaround time for all processes will then be appended to a file "avetime.txt" (note that the average turnaround time should NOT be displayed on the screen). (15 marks) Q3(c) 1. 2. The following will then be changed: Owner and group of "avetime.txt" to root user. Permissions of "avetime.txt" to the owner can read, write and execute, group can read and execute, and others can read. Validation check needs to be done in the bash shell script whenever possible (e.g. when inputting the text file, the script should check whether the text file is empty or not). (10 marks) Q3 (d) A documentation (with appropriate screenshots and explanations) needs to be produced on the execution of the bash shell script with different conditions (e.g. text file existed, text file does not exist, etc.). Necessary checking needs to be done (e.g. check that the permissions of the file "avetime.txt" has changed, etc.). Appropriate comments should be added in the script to make it easier to understand. (15 marks) In this problem, we illustrate man-in-the-middle attack when Alice and Bob employ Diffie-Hellman key exchange. Answer the questions. Alice and Bob are sender and recipients of the message respectively. Darth is the attacker who acts as the middleman. Alice chooses a large prime number p. Let us choose p = 11. Choose an integer a = {2,3,4,...p-2). Let us choose a = 5. public Publish p and a to [Select] private Alice chooses a = {2,3,4,..,p-2); a is referred to as private key of Alice (Kpr. A). Let us choose a = 3. Alice computes X = a mod p. This is the public key of Alice (kpub. A). X = 4 [Select] Alice sends public key X to Bob. Darth captures the public key X from Alice. Captures public key X from Alice Alice 11 125 Captures public key X from Alice Alice Darth (Attacker) Darth generates a random prime number d1 = {2,3,4,..,p-2}; Let us assume d1 = 2. Darth computes X1 = a mod p. Darth replaces X as (kpub. A) with Xd1 as (kpub. D1) as the public key of Alice. XD1 = [Select] 2 3 25 Darth (Attacker) 5 9 Bob sends public key Y to Alice. Darth captures the public key from Bob. Bob chooses b = {2,3,4,...,p-2); b is referred to as private key of Bob (kpr.B). Let us choose b = 4. Bob computes Y = ba mod p. This is the public key of Bob (kpub.B). Y = [Select] Bob V 3 4 Sends Xa as public key from Alice Darth generates a random prime number d2 = {2,3,4,...p-2}; Let us assume d2 = 7. Darth computes Yd2 = qd mod p. Darth replaces Y as (Kpub, B) with Yd2 as (Kpub, D2) as the public key of Bob. YD2 = [Select] 9 Bob 1. The home position is at (240, 360, 180) from the origin. The origin lies on the top of the part as shown in Figure 1. The thickness of the part is 9 in. The end mill tool to be used has a tool index 04, with a diameter of 10 in. Write an NC program to machine the outer profile, given the following conditions: Spindle speed 900 RPM Feed rate 50 in/min Depth of cut = 1.25 in Retract height = 2 in above the top surface The contour motion should be performed in the clockwise direction, starting from the origin. R20 50 -38 -R7 13 -21-14.10- 31.50 R8 87 -24- Figure 1 - All dimensions in inches. I -R10 34.50 Question 3 Implement system security and access control in Linux operating system. You could also describe how the processes are managed after you have implemented your script. Using Ubuntu OS, write and implement ONE (1) bash shell script (only one script should be written for whole Question 3). You are to use the root account to execute the script. The script will implement a modified version of Shortest Process Next (SPN) scheduling algorithm. The bash shell script should have the following specifications: Q3(a) 1. The script will prompt the user to enter a text file (.txt) in the current folder (Note: each line of the text file consists of arrival time and service time of a process). As an example, if there are six processes, and the processes arrival time are 0, 1, 4, 5, 6, 9, and the service time are 3, 5, 5, 1, 3, 1, then the text file will have 6 lines, and the content of the text file will be as follow (use colon as delimiter between arrival time and service time): 0:3 1:5 4:5 5:1 6:3 9:1 2. It will check whether the text file exist in the current folder, and if the text file does NOT exist, it will ask the user to re-enter the text file (it will keep asking until the user enter a text file that exists). 3. It will read in the values from the text file and display the number of processes on the screen. (15 marks) Q3(b) 1. It will then calculate the finish time for each process and display each process finish time on the screen (the time needs to be displayed in ascending order). 2. It will also calculate the turnaround time for each process and display each process turnaround time on the screen (the time needs to be displayed in the order as correspond to point 1). 3. The average turnaround time for all processes will then be appended to a file "avetime.txt" (note that the average turnaround time should NOT be displayed on the screen). (15 marks) Q3(c) 1. 2. The following will then be changed: Owner and group of "avetime.txt" to root user. Permissions of "avetime.txt" to the owner can read, write and execute, group can read and execute, and others can read. Validation check needs to be done in the bash shell script whenever possible (e.g. when inputting the text file, the script should check whether the text file is empty or not). (10 marks) Q3 (d) A documentation (with appropriate screenshots and explanations) needs to be produced on the execution of the bash shell script with different conditions (e.g. text file existed, text file does not exist, etc.). Necessary checking needs to be done (e.g. check that the permissions of the file "avetime.txt" has changed, etc.). Appropriate comments should be added in the script to make it easier to understand. (15 marks) In this problem, we illustrate man-in-the-middle attack when Alice and Bob employ Diffie-Hellman key exchange. Answer the questions. Alice and Bob are sender and recipients of the message respectively. Darth is the attacker who acts as the middleman. Alice chooses a large prime number p. Let us choose p = 11. Choose an integer a = {2,3,4,...p-2). Let us choose a = 5. public Publish p and a to [Select] private Alice chooses a = {2,3,4,..,p-2); a is referred to as private key of Alice (Kpr. A). Let us choose a = 3. Alice computes X = a mod p. This is the public key of Alice (kpub. A). X = 4 [Select] Alice sends public key X to Bob. Darth captures the public key X from Alice. Captures public key X from Alice Alice 11 125 Captures public key X from Alice Alice Darth (Attacker) Darth generates a random prime number d1 = {2,3,4,..,p-2}; Let us assume d1 = 2. Darth computes X1 = a mod p. Darth replaces X as (kpub. A) with Xd1 as (kpub. D1) as the public key of Alice. XD1 = [Select] 2 3 25 Darth (Attacker) 5 9 Bob sends public key Y to Alice. Darth captures the public key from Bob. Bob chooses b = {2,3,4,...,p-2); b is referred to as private key of Bob (kpr.B). Let us choose b = 4. Bob computes Y = ba mod p. This is the public key of Bob (kpub.B). Y = [Select] Bob V 3 4 Sends Xa as public key from Alice Darth generates a random prime number d2 = {2,3,4,...p-2}; Let us assume d2 = 7. Darth computes Yd2 = qd mod p. Darth replaces Y as (Kpub, B) with Yd2 as (Kpub, D2) as the public key of Bob. YD2 = [Select] 9 Bob
Expert Answer:
Answer rating: 100% (QA)
G17 G21 G40 G49 G80 G90 M3 S900 G54 T04 M06 G43 H04 G00 X240 Y360 Z180 G01 Z125 F500 G02 X221 Y114 R020 F500 X224 Y124 X231 Y150 X240 Y187 X249 Y224 X... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Assuming that Ska Companys cost of equity capital is 14% and it expects to grow earnings at a rate of 8% per year, we would expect Skas P/E ratio to be ?
-
Discuss what you see as the role of ethics as it pertains to management and managers. Does management, in your view, help shape the values and ethics of an organization? What about an organization's...
-
On each nondelinquent sale Cast Iron receives revenues with a present value of $1,200 and incurs costs with a present value of $1,050. Assuming there is no possibility of repeat orders and that the...
-
The mean birthweight of a sample of 25 babies is 3500 g with a standard deviation of 500 g. The standard error of the mean birthweight is: A. 25 g B. 50 g C. 100 g D. 500 g E. 3500 g
-
On which areas do governing boards focus?
-
Winans Company uses the lower-of-cost-or-market method, on an individual-item basis, in pricing its inventory items. The inventory at December 31, 2013, included product X. Relevant per-unit data for...
-
Behind the counselling environment as well as the an introduction of the helping skills, you will now critique an important contribution of one of the most influential psychologists, Carl Rogers, in...
-
1. In "The Blessing of SoccerLinks to an external site.," what is the specific historical reason Enrique Krauz hypothesizes as to why soccer/ futbol is so popular in Mxico? 2. According to Joshua H....
-
Explain the following terms: (a) Grant date (b) Measurement date (c) Vesting date (d) Vesting conditions (e) Forfeiture rate
-
The consequences of climate change on the economy is a popular topic in the media. Suppose that a series of wildfires destroys crops in the western states at the same time a hurricane destroys...
-
In what situations can a hedged item be either a fair value hedge or a cash flow hedge? Explain why each type of hedge is applicable to the situation.
-
A firm that intends to hedge against commodity price risk has to decide whether to use a forward contract or an options contract to hedge the risk. What factors should the firm consider before...
-
Company X purchased $2 million face value of bonds issued by company Y on 2 January 2013 at purchase cost of $1.94 million. The bond had coupon of 5% payable annually, and matures on 31 December...
-
Consider acetic acid, CH 3 COOH, the active ingredient in vinegar. It is also responsible for the sour taste of wine when wine gets exposed to air. Bacterial oxidation turns alcohol to acid. C 2 H 5...
-
What types of questions can be answered by analyzing financial statements?
-
The root locus of unity feedback system is shown below. The open-loop transfer function is given by (a) \(\frac{\mathrm{K}}{s(s+1)(s+2)}\) (b) \(\frac{\mathrm{K}(s+1)}{s(s+2)}\) (c)...
-
A speed control system of an engine is shown in Fig. P1.2. Determine: (a) Sensitivity of closed loop system to changes in engine gain \(k_{1}\) and tachometer feedback gain \(k_{2}\). (b) Steady...
-
Convert the block diagram shown in Fig. P3.11 into signal flow graph and obtain following system functions. \(\begin{array}{llll}\text { (a) }...
-
a. Suppose that General Hospital has a current ratio of 0.5. Which of the following actions would improve (increase) this ratio? Use cash to pay off current liabilities. Collect some of the current...
-
What is the role of internal control in an organization?
-
What are the elements and principles of the COSO framework?
Study smarter with the SolutionInn App