1
Record data in memory buffer Is memory buffer full? NO YES Break up Data into projects Copy projects in UNRESOLVED DB & mark time Every time screen saver loads or a project is complete; slave contacts master Projects take roughly 100 000 G clock cycles (10 hours at 2.4GHz) of processing UNRESOLVED DB contains Data & a time flag of when it got copied in DB Is slave attempting contact? NO Scan SOLVING DB for entries older than 1 month SOLVING DB contains a copy of all projects sent to slaves and the time when slave made last connetion attempt Found any? NO YES Send data in RECYCLING DB Pus Slave’s ID on BLACKLIST Assume the slave gave up on SETI, it’s data needs to be processed ASAP. RECYCLING DB is a FIFO QUE START START YES Is slave’s ID on the BLACKLIST? Is slave requesting a Project? NO YES Warn user that he needs to check in once a month to keep contributing Clear BLACKLIST Flag Since slave BLACKLISTED, his data was sent to the RECYCLING DB so his results are ignored and a new project is sent NO YES Is there something in the RECYCLING FIFO QUE? YES Send oldest entry to slave Copy Project DATA in SOLVING DB Done Project? Copy current date in SOLVING DB besides Project DATA NO YES Gather RESULTS & copy in RESOLVED DB Delete entry in SOLVING DB Add 0x values of 1499 digits received % 0xF Add to that sum the number of odd digits which’s values are larger than 0xF5 Determin the 1500th digit such that the sum %0xF == 0 SENDER Send the 1500th digit as computed RECEIVER Is computed value == 1500th digit received YES Do nothing NO Send error message to sender delete the corrupted data and request resend of sequence If receiver reports an error Mark the sequence of corrupted data & resend after transfer ERROR DETECTION ALGORITHM The error detection algorith is the same used in transfering credit and bank card numbers, except that we are are processing 1500 digits at a time instead of 15. The odds of accidently Due to the complexity of the algorithm, the odd of accidently not flaging corrupted data are extremely minimal. Once data is transfered, if there has been a corrupted sequence, it is sent at the end. If a data transfer is not completed (conncetion breaks before transfer complete), the uncompleted data is deleted and the incomplete conncetion is ignored (at next connection, transfer will start from the begenning as if no previous attempts had been made. MASTER / SLAVE SYNCHRONISATION FOR TASH SHARING OPERATING SYSTEMS ASSIGNMENT 1 SETI FLOWCHART SIMON FOUCHER 260 223 197

OPERATING SYSTEMS ASSIGNMENT 1 SETI FLOWCHART SIMON ...simonfoucher.com/McGill/ECSE427 OS/Assignment1/sub... · Record data in memory bu˜er Is memory bu˜er full? NO YES Break up

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OPERATING SYSTEMS ASSIGNMENT 1 SETI FLOWCHART SIMON ...simonfoucher.com/McGill/ECSE427 OS/Assignment1/sub... · Record data in memory bu˜er Is memory bu˜er full? NO YES Break up

Record data inmemory bu�er

Is memory bu�er full?

NO

YES

Break up Datainto projects

Copy projects inUNRESOLVED DB& mark time

Every time screen saverloads or a project is complete; slave contacts master

Projects take roughly 100 000 G clock cycles(10 hours at 2.4GHz)

of processing

UNRESOLVED DBcontains Data & a

time �ag of when it gotcopied in DB

Is slaveattempting

contact?

NO Scan SOLVING DBfor entries older

than 1 month

SOLVING DB containsa copy of all projects

sent to slaves and thetime when slave madelast connetion attempt

Foundany?

NOYES Send data in

RECYCLING DBPus Slave’s IDon BLACKLIST

Assume the slave gaveup on SETI, it’s data

needs to be processedASAP. RECYCLING DB is a

FIFO QUESTART

START

YES

Is slave’sID on the BLACKLIST?

Is slaverequesting a

Project?

NO

YES

Warn user that heneeds to check inonce a month to

keep contributing

Clear BLACKLISTFlag

Since slave BLACKLISTED,his data was sent to the

RECYCLING DB so his results are ignored and

a new project is sent

NO

YES

Is theresomething in the RECYCLING

FIFO QUE?

YES

Send oldestentry to slave

Copy Project DATAin SOLVING DB

DoneProject?

Copy current datein SOLVING DB

besides Project DATA

NO

YES Gather RESULTS& copy in

RESOLVED DB

Delete entryin SOLVING DB

Add 0x values of1499 digits received

% 0xF

Add to that sum the numberof odd digits which’s values

are larger than 0xF5

Determin the 1500th digit suchthat the sum %0xF == 0

SENDERSend the 1500th

digit as computed

RECEIVER

Iscomputed value== 1500th digit

received

YESDo nothing

NO

Send error message to senderdelete the corrupted data andrequest resend of sequence

If receiverreports an error

Mark the sequenceof corrupted data

& resend after transfer

ERROR DETECTION ALGORITHM

The error detection algorith is the same used in transfering credit and bank cardnumbers, except that we are are processing 1500 digits at a time instead of 15. The odds of accidently Due to the complexity of the algorithm, the odd of accidently not �aging corrupted data are extremely minimal. Once data is transfered, if there has been a corrupted sequence, it is sent at the end.

If a data transfer is not completed (conncetion breaks before transfer complete),the uncompleted data is deleted and the incomplete conncetion is ignored (at next connection, transfer will start from the begenning as if no previous attempts had been made.

MASTER / SLAVE SYNCHRONISATION FOR TASH SHARING

OPERATING SYSTEMS ASSIGNMENT 1SETI FLOWCHARTSIMON FOUCHER260 223 197