Lesson 3 of 4 · Finite receiver storage
Account for finite receiver storage
18 minute lesson · 3 checks along the way
Your goal for this lessonTrace equal-packet buffer occupancy and classify late versus capacity drops under declared event ordering.
In this lesson 3 sections · 3 checks
Read & understand
Store packets by identity, not arrival position
Now give the receiver two slots, each holding one complete packet. An accepted packet occupies a slot from arrival until its deadline. A late packet is discarded without entering storage. If an on-time packet arrives when both slots are occupied, discard that arriving packet; existing stored packets stay. These are declared teaching rules, not a description of a particular decoder.
With the one-tick startup wait, A occupies one slot at tick 2. B arrives at tick 3 before A is presented, briefly filling both slots. After A leaves, B remains until tick 4. At tick 5, D arrives while C’s scheduled presentation is missed. D is stored under its own identity; it must not be played as though it were C.
Check 1 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Trace the rest of the two-slot history
E arrives at tick 6 before D is presented, so both slots are briefly occupied. At tick 7, C is discarded as late and F enters the slot left by D. E is then presented. F remains until tick 8. The two-slot receiver presents A, B, D, E and F; it has one late packet and no capacity drop. Peak occupancy is two packets.
Count accepted packets, late arrivals and capacity drops separately. A missed presentation tells us that its packet was unavailable at the deadline, but the trace explains why. Here the missing C was late. In another configuration an on-time packet can be discarded because storage was full. Both cause a missing presentation, yet they suggest different changes to investigate.
Check 2 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Increase waiting without increasing storage
Keep two slots and increase startup wait to three ticks. Deadlines become A=5, B=6, C=7, D=8, E=9 and F=10. A and B fill storage before tick 5. D arrives at tick 5 while both are still held and is dropped under our arrival-before-presentation rule; A is presented afterward. E enters at tick 6 before B leaves.
At tick 7, E is still stored. C arrives on its deadline and fills the second slot. F then arrives at the same tick, finds both slots occupied and is dropped. C is presented afterward. Only A, B, C and E are ultimately presented: no arrival is late, but two packets are lost to capacity. The longer startup wait solved C’s lateness while worsening the number of missing presentations under this fixed-storage policy.
Two slots: which event comes first?
Original two-slot model with startup wait three ticks. Every arrival at a tick is processed before presentation; alphabetical order breaks arrival ties. Slots retain packet identities.
Open full-size diagram in a new tab: Two slots: which event comes first?Read diagram data as a table
| Tick | Stored before arrivals | Arrival decisions | Presentation and remaining storage |
|---|---|---|---|
| 5 | A, B | D dropped: full | A plays; B remains |
| 7 | E | C admitted; F dropped: full | C plays; E remains |
Original two-slot model with startup wait three ticks. Every arrival at a tick is processed before presentation; alphabetical order breaks arrival ties. Slots retain packet identities.
Check 3 of 3
10 pointsUse the reading above. You can try again without losing points.
Put it together
Your lesson progress
Each check connects to a part of the story. Complete all 3 to earn your 25-point lesson bonus.
Explore further · Optional
Go to the source
Explore the evidence behind this lesson. These optional readings and videos open in a new tab.