Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Microsoft Computing: Threading Under Windows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Microsoft Computing: Threading Under Windows

    ** This thread discusses the article: Microsoft Computing: Threading Under Windows **
    ** This thread discusses the Content article: Microsoft Computing: Threading Under Windows0

  • #2
    Microsoft Computing: Threading Under Windows

    ** This thread discusses the article: Microsoft Computing: Threading Under Windows **
    Chris, Nice introductory article, but I have a problem with the following: "Here's an iSeries analogy: Suppose you have an iSeries CL program (Program A) that submits a job (Program B). The submitted job (B) begins operation, and the program that submitted it (A) keeps on going without waiting for B to finish. Now, there are two jobs running on your behalf, but they are independent of each other and can't share resources." This is simply not correct. One of the main benefits of the iSeries Single Level Store is that _every_ object (resource) exists in a shared space. Consider how easily multiple jobs share a single physical file. Try that with multiple window's processes. Want to share a chunk of memory between multiple jobs? On the iSeries you'd create a user space. Threads are used for 3 main reasons: 1) Sharing of resources 2) Faster context switching 3) Faster startup/shutdown compared to a full process http://www.serpentine.com/~bos/os-fa...1.html#Threads http://www.serpentine.com/~bos/os-fa...ory-of-threads Now on the iSeries, #1 and #2 above don't apply since the Single Level Store provides shared resources and exceptionally fast context switching between jobs. The only benefit threads provide on the iSeries is #3. Which is why thread capability needed to be added to the iSeries relatively recently in support of client server applications such as web serving. The web server's requirement that a new process/thread be created for every client request pretty much forces threads to be used. Interestingly enough, it turns out that even starting threads is not fast enough. Thus you have changes to the HTTP standards that allow for a persistent connection between client requests. Had this been foreseen and the HTTP standard originally been written to require persistent connections and the iSeries may not need threads today. Instead, a batch of pre-start jobs could handle the requests; similar to the way the non-threaded QZDASOINIT handles ODBC requests. Sincerely, Charles Wilt

    Comment


    • #3
      Microsoft Computing: Threading Under Windows

      ** This thread discusses the article: Microsoft Computing: Threading Under Windows **
      Excellent point, Charles. In fact, as applications for desktop computers become more complex, they continue to reinvent concepts we've been using on the midrange, sometimes for decades. For example, the reason I'm such a big fan of JSP Model II is that it is in effect good old 5250 access in a browser. You design your screen as a bunch of constants (the HTML in the JSP page) with holes for the data (calls to your beans). The application program (the servlet) fills buffers with data (or beans) and sends them to the workstation (the session), and then shows the screen (the JSP). The user enters data, which then is returned to the application (the servlet). Yep, it's the same old 5250. Heck, even good old stateless CGI was little more than a NEP-MRT. Another favorite is the concept of a "scrollable, updatable cursor" in JDBC. Hmm. Create a subset of a file using order and selection criteria. Then, be able to traverse this subset forward and backward usnig a cursor. At any point, be able to modify the fields in the file and then update that record (row), or be able to insert an entirely new record (row). Wow! You've just invented the logical view, a feature we've had for 30 years or so. And there are still basic capabilities that the desktops can't match. For example, the concept of directly calling another program with bi-directional parameters is a uniquely iSeries concept unmatched in any other environment. (This one I know particularly well, since I saw the hoops SSA had to jump through to attempt to make this work.) Joe

      Comment


      • #4
        Microsoft Computing: Threading Under Windows

        ** This thread discusses the article: Microsoft Computing: Threading Under Windows **
        Joe, when you mention bi-directional parameters, do you mean something other than pass-by-reference?

        Comment

        Working...
        X