kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: amirali.shambayati@gmail.com (Amirali Shambayati)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel list data structure
Date: Mon, 6 Jun 2011 11:01:37 +0430	[thread overview]
Message-ID: <BANLkTimRRTaMkVu=Yiw3y3p8nkP8os4Xyw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTin1yNceh7d6d8AdTqDCiSmFxp976A@mail.gmail.com>

As I have read this pdf, I think I have assigned them right. I don't know
what's wrong? :-?
https://prof.hti.bfh.ch/myf1/adv-linux/courseNotes/*klist*-*intro*-1.3.*pdf*

On Mon, Jun 6, 2011 at 10:52 AM, Amirali Shambayati <
amirali.shambayati@gmail.com> wrote:

> As I have read the attached pdf, I think I have assigned them right. I
> don't know what's wrong? :-?
>
>
> On Mon, Jun 6, 2011 at 10:43 AM, Amirali Shambayati <
> amirali.shambayati at gmail.com> wrote:
>
>> Ali thanks for your valuable comments. Would you suggest me an alternative
>> method to implement the structure I explained?
>>
>>
>> On Mon, Jun 6, 2011 at 10:05 AM, Ali Bahar <ali@internetdog.org> wrote:
>>
>>>
>>> All right, let's take another stab at this.
>>>
>>> > list.  But as I debugged my code, it seems that my concept is wrong.
>>> Would
>>> > anyone guide me how to implement a two-dimensioned list, or introduce
>>> me a
>>>
>>>
>>> My interpretation of what you got is as follows, based on what you've
>>> said you'll be assigning each list_head to:
>>>
>>> struct noop_data {
>>>    struct list_head readQueue; // You haven't explicitly stated which
>>>                                // LL this will be assigned to.
>>>    struct list_head writeQueue;// The head of a LL of 'struct bundle'
>>>                                // nodes.
>>>     struct bundle {
>>>      int bundleNumber;
>>>      int size;
>>>       struct list_head bundlesQueue; // The LL of 'struct bundle'
>>>      struct list_head reqsQueue; // The head of a LL of
>>>                                  // 'struct request'?
>>>      int filled[8];
>>>    } bun;
>>>    unsigned int starved;
>>> };
>>>
>>> Depending on how you're going to assign these, you may end up with
>>> spaghetti. As I indicated before, the nested inclusion of 'struct
>>> bundle' is likely wrong.
>>>
>>> later,
>>> ali
>>>
>>>
>>> > "noop_data" has a reference to start point of bundles list, called
>>> > "writeQueue"
>>> > "bundle" has a reference to start point of requests list, called
>>> > "reqsQueue".
>>> > "bundle" knows its related list using "bundlesQueue".
>>> > "request" knows its related list using "queuelist". (request struct is
>>> > already implemented in kernel)
>>> >
>>> > struct bundle {
>>> >     int bundleNumber;
>>> >     int size;
>>> >     struct list_head bundlesQueue;
>>> >     struct list_head reqsQueue;
>>> >     int filled[8];
>>> > };
>>> >
>>> > struct noop_data {
>>> >     struct list_head readQueue;
>>> >     struct list_head writeQueue;
>>> >     struct bundle bun;
>>> >     unsigned int starved;
>>> > };
>>>
>>
>>
>>
>> --
>> Amirali Shambayati
>> Bachelor Student
>> Computer Engineering Department
>> Sharif University of Technology
>> Tehran, Iran
>>
>>
>
>
> --
> Amirali Shambayati
> Bachelor Student
> Computer Engineering Department
> Sharif University of Technology
> Tehran, Iran
>
>


-- 
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110606/3f9f0ac5/attachment-0001.html 

  parent reply	other threads:[~2011-06-06  6:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 13:39 kernel list data structure Amirali Shambayati
2011-06-06  1:47 ` Jonathan Neuschäfer
2011-06-06  2:19   ` Ali Bahar
2011-06-06  4:00     ` Ali Bahar
2011-06-06  1:59 ` Ali Bahar
2011-06-06  5:35 ` Ali Bahar
2011-06-06  6:13   ` Amirali Shambayati
     [not found]     ` <BANLkTin1yNceh7d6d8AdTqDCiSmFxp976A@mail.gmail.com>
2011-06-06  6:31       ` Amirali Shambayati [this message]
2011-06-06  8:16         ` Amirali Shambayati
2011-06-06 14:31         ` Jonathan Neuschäfer
2011-06-07  1:51     ` Ali Bahar
2011-06-12 15:42       ` Amirali Shambayati
2011-06-13 10:57         ` Amirali Shambayati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTimRRTaMkVu=Yiw3y3p8nkP8os4Xyw@mail.gmail.com' \
    --to=amirali.shambayati@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).