Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the program is designed to make application of scheduling process that uses a queue in a control processor of switch in a network Task 1:
the program is designed to make application of scheduling process that uses a queue in a control processor of switch in a networkTask 1: Application of scheduling process in a control processor of a switch in a network System Details:- Design a system that uses a queue in a control processor of a switch in a network. A request for the establishment of a new virtual connection that arrives to the switch generates a job of type A. If that job has to wait for other jobs, it is put in a buffer. Finally, the job is executed and the connection is established. When the connection shall be taken down, a new job is generated. Some jobs have quite a long time to be processed and thus jobs with a short time which came in late need to wait quite a long time. The jobs that tear down connections (jobs of type B) have a higher priority than jobs of type A. Thus, when a job has been served, need to check if there are any jobs of type B in the buffer. If there are no jobs of type B in the buffer, the processor can start to serve jobs of type A, if there are any. This code has been written in python, please run the program and show the output. File Edit Format Run Options Window Help 1#!/usr/bin/env python 2 import get pass 3 import telnetlib 4 5 user = ("Admin") 6 password = ("password") 7 8 1 = open("C:\\Users\\user.name\Desktop\\python Ciscosuitch.txt") 9 10 for line in f: 11 print "Getting Serials from Device " + (line) 12 HOST - line.strip() 13 tn = telnet lib. Telnet (HOST) 14 15 tn.read_until("Username:") 16 tn.write(user + " ") if password: tn.read_until("Password:") 19 tn.write(password + " ") 20 21 #this section is the switch configuration part tn.write("enable ") 23 tn.write("password ") 24 17 18 22 25 26 tn.write("show version | section WS-C29609-48LPS-L ") 27 28 tn.write("exit ") 29 #tn.write("exit ") 30 readoutput - tn.read_all) 31 32 saveoutput = open("C:\\Users\\user.name\\Desktop\\serials\\switch" + HOST + ".txt", "W") 34 saveoutput.write (readoutput) saveoutput.write(" ") 36 saveoutput.close 33 35 37 38 print tn.read_a11() 39
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started