GeeksforGeeks » Interview Questions

Amazon Interview Question for Software Engineer/Developer (Fresher) about Operating System

(3 posts)
  1. lalit
    guest
    Posted 7 months ago #

    A parallel program consists of 8 tasks – T1 through T8. Each task requires one time step to be executed on a single processor. Let X -> Y denote the fact that task X must be executed before task Y is executed. Suppose only the tasks X, Y are to be executed. On any multiprocessor machine it would require at least 2 time steps since in the first step X could be executed, and Y could be executed in the next time step (since it requires X to complete first). Now, suppose the following dependencies exist between the tasks T1 – T8:

    T1 -> T2

    T2 -> T3

    T3 -> T6

    T2 -> T4

    T4 -> T7

    T2 -> T5

    T5 -> T8

    What is the minimum number of time steps required to execute these 8 tasks on a 2 processor machine and a 4 processor machine?

    a)4 & 2

    b)5 & 2

    c)5 & 4

    d)6 & 2

  2. gaurav
    guest
    Posted 7 months ago #

    c) 5 and 4

  3. VD
    guest
    Posted 7 months ago #

    when 2 processor
    clock cycle process
    1 T1
    2 T2
    3 T3 T4
    4 T5 T6
    5 T7 T8
    when 4 processor
    1 T1
    2 T2
    3 T3 T4 T5
    4 T6 T7 T8


Reply

You must log in to post.

RSS feed for this topic