Stupid Questions.....

This is a discussion on Stupid Questions..... within the C++ Programming forums, part of the General Programming Boards category; 1.) What is a thread in terms of programs? 2.) What is a segmentation fault?...

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Stupid Questions.....

    1.) What is a thread in terms of programs?
    2.) What is a segmentation fault?

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    a thread is a process. ie, your web browser is most likely running multiple threads. one thread is listening to window events, or for simplicity, waiting for a button (back, forward, close) to be clicked. while that's waiting, another thread is downloading web pages and displaying them for you.

    a segmentation fault is when you try to access memory incorrectly or memory that doesn't exist.
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  3. #3
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    A thread belongs to a process and is an independently executing series of instructions (meaning they run concurrently with any other threads in the same process and external processes).

    A segmentation fault is...

    [edit]
    Quote Originally Posted by misplaced
    a thread is a process
    A thread is not a process. Generally speaking, a process is an executing program/application, while threads are children of processes.
    Last edited by LuckY; 07-07-2005 at 12:51 PM.

  4. #4
    C Programmer Stack Overflow's Avatar
    Join Date
    Apr 2004
    Posts
    477
    Hello,

    2) You can have a look at my signature or view this short document I wrote about it: Locating a Segmentation Fault

    And/or, view this detailed CBoard article: Debugging Segmentation Faults. It explains the 4 common mistakes that can lead to a segfault.


    Regards,

    Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Foldoc

    A good place to look-up computer/programming termonology is FOLDOC (Free On Line Dictionary Of Computing.)

  6. #6
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    I used to use webopedia, but I find that wikipedia is usually a better source for information.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  7. #7
    Registered User
    Join Date
    Sep 2004
    Posts
    719
    Quote Originally Posted by LuckY
    A thread belongs to a process and is an independently executing series of instructions (meaning they run concurrently with any other threads in the same process and external processes).

    A segmentation fault is...

    [edit]
    A thread is not a process. Generally speaking, a process is an executing program/application, while threads are children of processes.

    you mean, technically speaking
    i seem to have GCC 3.3.4
    But how do i start it?
    I dont have a menu for it or anything.

  8. #8
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Quote Originally Posted by misplaced
    you mean, technically speaking
    While I appreciate your attempt to inform me of my own thoughts, I said what I meant. Rather than providing a detailed description of all things involved in a computer process and how one is created/maintained by an operating system, I felt it would only be beneficial for our dear Krak to understand it's general definition. Besides, my definition is not what a process is in technical terms; I simply stated precisely what a process is.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple (stupid) questions - no programming
    By jvu in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 02-07-2009, 03:44 PM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 08:44 AM
  4. Yet Another Of My Stupid Questions
    By DeepBlackMagic in forum C++ Programming
    Replies: 3
    Last Post: 10-01-2003, 06:18 PM
  5. Companies and their stupid interview questions...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 01-30-2003, 05:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21