Calculating Utilization in a Stop-And-Wait Protocol

865

With any connection there is bandwidth and latency. The bandwidth defines how much data you can put onto a connection in a second - 64Mbps. Latency defines how long it takes that data to get to the other endpoint In this case, the other endpoint is a long way away, and data can travel at the speed of light maximum. So the latency is how long it take a frame to get there

If we simplify it, lets say the other end is 100 meters away, and it take 10 minutes to send a packet over 100 meters. Because we are using a stop and wait protocol, each packet will take 10 minutes to get to the other end, and the acknowledgement will take 10 minutes to get back to us, and we must wait for the response before the next packet can leave.

So that means we can only send 32KB every 20 minutes, even though our pipe can send 64Mbps.

32KB is 256kbits, and 20 minutes is 1200 seconds. So we can send 256kbits every 1200 seconds, or .213 kbps - this is a tiny fraction of 64Mbps - the connection would be 0.0003% utilised.

You can do the same calculations for the planet, and given the distance, any additional latency overheads such as encoding the packet or getting it into the transmitter can be considered negligable (this is implied by their lack of mention in the question).

Share:
865

Related videos on Youtube

Sandra Willford
Author by

Sandra Willford

Updated on September 18, 2022

Comments

  • Sandra Willford
    Sandra Willford over 1 year

    The team that I am on is using Eclipse and I need to be able to run project for frontend development. I KNOW NOTHING ABOUT THIS, but eclipse is having an issue after it closes and then when I attempt to re-open it. Here is the log it think...

    As I am not the backend developer I have no idea what this all means!

    !SESSION 2018-02-19 10:07:48.402 -----------------------------------------------
    eclipse.buildId=4.7.2.M20171130-0510
    java.version=1.8.0_162
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -product org.eclipse.epp.package.jee.product
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
    
    !ENTRY org.eclipse.ui 2 0 2018-02-19 10:07:58.125
    !MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
    !SUBENTRY 1 org.eclipse.ui 2 0 2018-02-19 10:07:58.125
    !MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.lsp4e', id='org.eclipse.lsp4e.togglehighlight'
    
    !ENTRY org.eclipse.jface 2 0 2018-02-19 10:08:06.407
    !MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2018-02-19 10:08:06.407
    !MESSAGE A conflict occurred for CTRL+SHIFT+T:
    Binding(CTRL+SHIFT+T,
        ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
            Open a type in a Java editor,
            Category(org.eclipse.ui.category.navigate,Navigate,null,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@626edbe0,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)
    Binding(CTRL+SHIFT+T,
        ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
            ,
            Category(org.eclipse.lsp4e.category,Language Servers,null,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@213a2fe3,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)
    
    !ENTRY org.eclipse.egit.ui 2 0 2018-02-19 10:08:16.989
    !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
    user global configuration and to define the default location to store repositories: 'C:\Users\TENDesign'. If this is
    not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
    EGit might behave differently since they see different configuration options.
    This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
    
    !ENTRY org.eclipse.osgi 2 0 2018-02-19 10:08:24.172
    !MESSAGE While loading class "org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer", thread "Thread[Worker-6,5,main]" timed out waiting (5001ms) for thread "Thread[Worker-7,5,main]" to finish starting bundle "org.eclipse.m2e.jdt_1.8.2.20171007-0217 [583]". To avoid deadlock, thread "Thread[Worker-6,5,main]" is proceeding but "org.eclipse.m2e.jdt.internal.MavenClasspathContainerInitializer" may not be fully initialized.
    !STACK 0
    org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="1.8.2.20171007-0217"; osgi.identity="org.eclipse.m2e.jdt"; singleton:="true" [id=583] STARTED [STARTED]
        at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
        at org.eclipse.osgi.container.Module.start(Module.java:401)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
        at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at org.eclipse.jdt.core.JavaCore.computeClasspathContainerInitializer(JavaCore.java:3595)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainerInitializer(JavaCore.java:3571)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3093)
        at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:3018)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:3056)
        at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2056)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3548)
        at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2986)
        at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3150)
        at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2255)
        at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:997)
        at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:868)
        at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2071)
        at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:473)
        at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
        at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:271)
        at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:369)
        at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1559)
        at org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager.refreshRemoteEditProject(SystemRemoteEditManager.java:794)
        at org.eclipse.rse.internal.files.ui.Activator$InitRemoteEditJob.run(Activator.java:77)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
    Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
        at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
        ... 39 more
    Root exception:
    java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
        at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
        at org.eclipse.osgi.container.Module.start(Module.java:401)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
        at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:103)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at org.eclipse.jdt.core.JavaCore.computeClasspathContainerInitializer(JavaCore.java:3595)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainerInitializer(JavaCore.java:3571)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:3093)
        at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:3018)
        at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:3056)
        at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:2056)
        at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3548)
        at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2986)
        at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:3150)
        at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2255)
        at org.eclipse.jdt.internal.core.DeltaProcessor.createExternalArchiveDelta(DeltaProcessor.java:997)
        at org.eclipse.jdt.internal.core.DeltaProcessor.checkExternalArchiveChanges(DeltaProcessor.java:868)
        at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2071)
        at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:473)
        at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
        at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:271)
        at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:369)
        at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1559)
        at org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager.refreshRemoteEditProject(SystemRemoteEditManager.java:794)
        at org.eclipse.rse.internal.files.ui.Activator$InitRemoteEditJob.run(Activator.java:77)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
    
    !ENTRY org.eclipse.jdt.core 2 0 2018-02-19 10:08:57.959
    !MESSAGE The Java indexing could not index C:/Users/TENDesign/.m2/repository/org/glassfish/hk2/external/asm-all-repackaged/2.5.0-b32/asm-all-repackaged-2.5.0-b32.jar|module-info.class. This .class file doesn't follow the class file format specification. Please report this issue against the .class file vendor
    
    !ENTRY org.eclipse.jface 2 0 2018-02-19 10:26:40.945
    !MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2018-02-19 10:26:40.945
    !MESSAGE A conflict occurred for CTRL+R:
    Binding(CTRL+R,
        ParameterizedCommand(Command(org.eclipse.debug.ui.commands.RunToLine,Run to Line,
            Resume and break when execution reaches the current line,
            Category(org.eclipse.debug.ui.category.run,Run/Debug,Run/Debug command category,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@6e7c0efa,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.debug.ui.debugging,,,system)
    Binding(CTRL+R,
        ParameterizedCommand(Command(org.springframework.ide.eclipse.boot.restart.commands.restart,Trigger Restart,
            Restart Spring Boot Application,
            Category(org.eclipse.debug.ui.category.run,Run/Debug,Run/Debug command category,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@202411a,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.debug.ui.console,,,system)
    
    !ENTRY org.eclipse.jface.text 2 0 2018-02-19 10:45:10.896
    !MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number'
    
    !ENTRY org.eclipse.jface.text 2 0 2018-02-19 10:45:10.909
    !MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round'
    

    removing

    -javaagent:lombok.jar
    

    from the configuration file allows it to start.

    • Paul
      Paul over 11 years
      Stop and wait means that each frame is sent upon acknowledgement of the last frame. You are sending 32KB per frame, and you have a round trip defined by the distance and SoL. So you can work out how many frames you can send per second and so how much data per second, and this will be a fraction of 64Mbps.
    • pneumatics
      pneumatics over 11 years
      so 32kb/64 MB thats 32/64000?
    • Paul
      Paul over 11 years
      32KB is bytes, 64Mbps is bits, so you need to convert. Also you obviously cannot ignore the distance and SoL.
    • pneumatics
      pneumatics over 11 years
      oh right you are, so 32/8000, but what is the formula of utilization i should use? I have found various on the net, and there is no one such formula in the book
    • Paul
      Paul over 11 years
      You have to work it out. How long does it take to get the frame to the planet?
    • pneumatics
      pneumatics over 11 years
      there is no delay mentioned in the text book
    • Paul
      Paul over 11 years
    • pneumatics
      pneumatics over 11 years
      sorry about that paul, the presidential debate was on, i posted in chat though.