Question

Directories in /sys/class (what doesn't belong) contain symbolic links list devices defined by different subsystems of...

  1. Directories in /sys/class (what doesn't belong)
    • contain symbolic links
    • list devices defined by different subsystems of the kernel
    • are mostly created by kernel modules
    • take up disk space
  2. In the Linux kernel processes are represented as a
    • process_struct
    • task_struct
    • thread_struct
    • program_struct
  3. getdents returns multiple directory entries per call because
    • Switching from user space to kernel space is expensive
    • Switching from kernel space to user space is expensive
    • A directory block on disk will generally hold multiple entries
    • All of the above
  4. How does a kernel module get its parameters?
    • The module reads them from a /etc/module.conf config file.
    • The module loader writes them to /proc/modules
    • The module is passed them through a write system call
    • The module has special declarations for parameters that are initialized by the module loading framework
    • The module receives them as parameters to its init function
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Q1

Ans is C

as Directory sys/class contains symbolic links and contains a single layer for the for sub-directories for each device class and to store all this space is needed

Q2

Ans is B

Task_struct is a large structure used to contain all necessary data to represent a process and also has data to maintain relationship with other processes .

Q3

Ans is C

In order to read directories entries we use getdents() function as it reads the data and return the number of bytes that he read in directory .ans as a directory contain many entries it reads all so its return many entries

Q4.

Ans is

The module has special declarations for parameters that are initialized by the module loading framework

To pass paramters to module in kernel

1. module_param() macro function is used

2.If you pass the parameters to  a module using modprobe, you can set the parameters in /etc/modprobe.conf

3,If you compile the module with the kernel (static), you can provide the parameters using the kernel command line on boot time

Add a comment
Know the answer?
Add Answer to:
Directories in /sys/class (what doesn't belong) contain symbolic links list devices defined by different subsystems of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT