OkCredit | Phone | Design Sync Async instruction API and Implement Class for read, write
Anonymous User
178

Design Question 1:
Design an API which has following set of synchronous (denoted as S1, S2 and so on) and asynchronous instruction (denoted as AS1, AS2 and so on).

API (S1, AS1, S2, AS2, S3)

All these instruction will get invoked in sequence as mentioned above.

Synchrnous instruction will always execute in seqential manner.

We have to design the system for following two scenarios:

  1. AS1 and AS2 are non sequential
  2. AS1 and AS2 are sequential (means AS2 execution will start execution if AS1 is finished).

Question 2:

One class (named as Resources) is having two methods.

  1. Read()
  2. Write()

We have to implement this class with following constraint.

  1. parallel Read() call is possible.
  2. parallel Write() call is not possible.
  3. parallel Read() and Write() is not possible
Comments (2)