Question

kmalloc() Can be used by regular processes as a faster, lower-level version of malloc Allocates memory...

  1. kmalloc()
    • Can be used by regular processes as a faster, lower-level version of malloc
    • Allocates memory in the kernel with different priorities
    • Only accepts allocation requests that are evenly divisible by the page size
    • Returns the physical address of allocated memory
    • All of the above
  2. If the kernel makes use of a userspace pointer as if it was a regular pointer, the kernel could
    • return confidential kernel data to a process
    • overwrite kernel data it shouldn't
    • attempt to write to memory that isn't writable
    • attempt to read memory that isn't readable
    • all of the above
  3. When you stat a file, you are getting the contents of
    • a directory entry
    • an inode
    • a file's page table
    • a block on disk
  4. Changing the return value of getdents() involves
    • changing file permissions
    • allocating kernel memory statically
    • traversing a set of fixed-length records
    • parsing filenames
    • all of the above
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans - 1.

Kmalloc is the normal method which allo to allocate memory for objects smaller then the page size in kernel.

So option b is coorect which says that kmalloc() allocates memory in the kernel with different priorities.

Ans - 2.

If kernel makes uses use of userspace pointer as if it was a regular pointer the kernel could

Option (e) that is all of the above.

Ans - 3.

When you state a file you are getting the contents of

Option (b) an inode.

Add a comment
Know the answer?
Add Answer to:
kmalloc() Can be used by regular processes as a faster, lower-level version of malloc Allocates memory...
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