ans the following Qs - VxWorks

This is a discussion on ans the following Qs - VxWorks ; Can you pls someone ans the following Q's? 1. What are the differences between VxWorks & Linux regarding Process/Task, Scheduling? 2. What are the differences regarding network interface initialization between VxWorks and Linux 3. What's Priority inversion and inheritance? 4. ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: ans the following Qs

  1. ans the following Qs

    Can you pls someone ans the following Q's?

    1. What are the differences between VxWorks & Linux regarding
    Process/Task, Scheduling?
    2. What are the differences regarding network interface initialization
    between VxWorks and Linux
    3. What's Priority inversion and inheritance?
    4. Describe Multi thread programming and mutex in Linux and VxWorks.
    5. Describe Socket c/s programming model, creating sockets in both
    ends, then what?
    6. Describe TCP flow control and handshake from Initial SYN to FIN

    its urgent

    Thanks
    Venkat


  2. Re: ans the following Qs

    I found all your answers quickly - using google.com, except 6, where I
    recommend Doug Comer's excellent works on TCP.

    I hope you're not posting from a cell phone taking a closed book test
    expecting the talented developers on this forum to answer questions you
    should have studied?

    lc
    venkat wrote:
    > Can you pls someone ans the following Q's?
    >
    > 1. What are the differences between VxWorks & Linux regarding
    > Process/Task, Scheduling?
    > 2. What are the differences regarding network interface initialization
    > between VxWorks and Linux
    > 3. What's Priority inversion and inheritance?
    > 4. Describe Multi thread programming and mutex in Linux and VxWorks.
    > 5. Describe Socket c/s programming model, creating sockets in both
    > ends, then what?
    > 6. Describe TCP flow control and handshake from Initial SYN to FIN
    >
    > its urgent
    >
    > Thanks
    > Venkat



  3. Re: ans the following Qs

    I am working on linux, I dont much abt vxworks, I am not able to get
    the ans. for 1 and 2 . can some one explain clearly on how to do
    Network initialisation and scheduling in both vxworks and linux.


    LarryC wrote:
    > I found all your answers quickly - using google.com, except 6, where I
    > recommend Doug Comer's excellent works on TCP.
    >
    > I hope you're not posting from a cell phone taking a closed book test
    > expecting the talented developers on this forum to answer questions you
    > should have studied?
    >
    > lc
    > venkat wrote:
    > > Can you pls someone ans the following Q's?
    > >
    > > 1. What are the differences between VxWorks & Linux regarding
    > > Process/Task, Scheduling?
    > > 2. What are the differences regarding network interface initialization
    > > between VxWorks and Linux
    > > 3. What's Priority inversion and inheritance?
    > > 4. Describe Multi thread programming and mutex in Linux and VxWorks.
    > > 5. Describe Socket c/s programming model, creating sockets in both
    > > ends, then what?
    > > 6. Describe TCP flow control and handshake from Initial SYN to FIN
    > >
    > > its urgent
    > >
    > > Thanks
    > > Venkat



  4. Re: ans the following Qs

    Hi:

    Given this is a vxWorks news group, we're best at answering those types
    of questions. Information on open source OS, their variations, and the
    use of desktop OS in embedded environments, are probably best handled
    by their own particular newsgroups.

    vxWorks has an excellent FAQ that can be found online. I suggest the
    answer to one of the first questions Q: What are differences between
    traditional UNIX and VxWorks - might shed some light on your questions.

    RE the network initialization, please be clearer. Are you talking
    about device drivers, protocol stacks, web servers? vxWorks provides a
    multitude of device drivers to support most networking chips, and has
    both built-in and third party protocol stacks as well as applications
    like SNMP, web servers, ftp, etc. A standard BSD-style socket
    interface is provided.

    One think of interest if you are porting open source applications to
    vxWorks is the Posix compliant interface - if your application is
    written to the Posix api, it may run directly on vxWorks.

    Good luck,

    lc
    venkat wrote:
    > I am working on linux, I dont much abt vxworks, I am not able to get
    > the ans. for 1 and 2 . can some one explain clearly on how to do
    > Network initialisation and scheduling in both vxworks and linux.
    >
    >
    > LarryC wrote:
    > > I found all your answers quickly - using google.com, except 6, where I
    > > recommend Doug Comer's excellent works on TCP.
    > >
    > > I hope you're not posting from a cell phone taking a closed book test
    > > expecting the talented developers on this forum to answer questions you
    > > should have studied?
    > >
    > > lc
    > > venkat wrote:
    > > > Can you pls someone ans the following Q's?
    > > >
    > > > 1. What are the differences between VxWorks & Linux regarding
    > > > Process/Task, Scheduling?
    > > > 2. What are the differences regarding network interface initialization
    > > > between VxWorks and Linux
    > > > 3. What's Priority inversion and inheritance?
    > > > 4. Describe Multi thread programming and mutex in Linux and VxWorks.
    > > > 5. Describe Socket c/s programming model, creating sockets in both
    > > > ends, then what?
    > > > 6. Describe TCP flow control and handshake from Initial SYN to FIN
    > > >
    > > > its urgent
    > > >
    > > > Thanks
    > > > Venkat



  5. Re: ans the following Qs

    See below... comments are inserted after each Q's.


    venkat wrote:
    > Can you pls someone ans the following Q's?
    >
    > 1. What are the differences between VxWorks & Linux regarding
    > Process/Task, Scheduling?


    Linux has processes with full contexts. VxWorks (traditionally) has
    tasks (threads) with shared memory space with the rest of the system.
    Linux model is tradtional heavy-weight Unix style process model, with
    support for threading. VxWorks was originally designed to be used in
    realtime control, so it was designed to be used with thread (task)
    based model. Task switches are fast, predictable (priority based
    preemption) and realtime in vxWorks. Linux scheduling is similar to
    most other Unix kernel scheduling, with some extensions for realtime.


    > 2. What are the differences regarding network interface initialization
    > between VxWorks and Linux


    VxWorks networking code is based on BSD Unix. Linux has a different
    code base written from scratch. Initializations are similar, but the
    code structure differs. Initializing a network device is specific to
    the type of device, but mostly setting up registers and enabling
    interrupts, allocating buffers and assigning them to the queues, etc.
    Similar in that regard from logical point of view. The code base is
    quite different and porting would require detailed understanding of
    both systems.

    > 3. What's Priority inversion and inheritance?


    Priority inversion is when a task A with a high priority ends up
    waiting for a resource held by a task B with a lower priority. This is
    solved by inherited higher priority during short duration of the time
    when task B holds the resource being requested by task A.

    This does not happen alot but when it happens it is fatal. A famous
    example is when Mars Lander was stuck in the vxWorks priority inversion
    problem. They fixed it on the fly, using the built-in shell debugger.


    > 4. Describe Multi thread programming and mutex in Linux and VxWorks.


    Threads are default in vxWorks. taskSpawn creates a thread, not a
    full-scale process (as in Unix). Linux thread support allows pthread
    based programming (among others), which is very similar to the taskLib
    in vxWorks. vxWorks uses semaphores of different types for mutex.
    pthread has mutex similar to vxWorks semLib. it is easy to emulate
    pthread in taskLib, and vice versa.


    > 5. Describe Socket c/s programming model, creating sockets in both
    > ends, then what?


    socket library in vxWorks is based on BSD API. so is LInux socket API.
    They are largely compatible. There are some differences but not much.
    vxWorks has additional support for more realtime oriented socket usage,
    e.g. connectWithTimeout() which can be emulated in Unix but usually
    such things are not part of proper API in Unix systems.

    > 6. Describe TCP flow control and handshake from Initial SYN to FIN
    >


    Both Iinux and vxWorks TCP implementations have to follow the RFC or
    they will not work (of course).

    Here is the famous state diagram from the RFC 793
    (http://www.ibiblio.org/pub/docs/rfc/rfc793.txt):


    +---------+ ---------\ active OPEN
    | CLOSED | \ -----------
    +---------+<---------\ \ create TCB
    | ^ \ \ snd SYN
    passive OPEN | | CLOSE \ \
    ------------ | | ---------- \ \
    create TCB | | delete TCB \ \
    V | \ \
    +---------+ CLOSE | \
    | LISTEN | ---------- | |
    +---------+ delete TCB | |
    rcv SYN | | SEND | |
    ----------- | | ------- | V
    +---------+ snd SYN,ACK / \ snd SYN +---------+
    | |<----------------- ------------------>| |
    | SYN | rcv SYN | SYN |
    | RCVD |<-----------------------------------------------| SENT |
    | | snd ACK | |
    | |------------------ -------------------| |
    +---------+ rcv ACK of SYN \ / rcv SYN,ACK +---------+
    | -------------- | | -----------
    | x | | snd ACK
    | V V
    | CLOSE +---------+
    | ------- | ESTAB |
    | snd FIN +---------+
    | CLOSE | | rcv FIN
    V ------- | | -------
    +---------+ snd FIN / \ snd ACK +---------+
    | FIN |<----------------- ------------------>| CLOSE |
    | WAIT-1 |------------------ | WAIT |
    +---------+ rcv FIN \ +---------+
    | rcv ACK of FIN ------- | CLOSE |
    | -------------- snd ACK | ------- |
    V x V snd FIN V
    +---------+ +---------+ +---------+
    |FINWAIT-2| | CLOSING | | LAST-ACK|
    +---------+ +---------+ +---------+
    | rcv ACK of FIN | rcv ACK of FIN |
    | rcv FIN -------------- | Timeout=2MSL -------------- |
    | ------- x V ------------ x V
    \ snd ACK +---------+delete TCB +---------+
    ------------------------>|TIME WAIT|------------------>| CLOSED |
    +---------+ +---------+

    > its urgent
    >
    > Thanks
    > Venkat



+ Reply to Thread