LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2020, 03:17 PM   #1
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Rep: Reputation: 53
At what point is a file location referred to as noids and not a human readable path name?


In a terminal we use a human readable path name. Does a file manager (nautilus) do the same thing? At what point is the file location in machine language? Are system calls invovled?
Thanks for your expertise!
 
Old 01-28-2020, 03:37 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,162

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
The open call for a file is passed the human-readable string. After that the file is referred to by a file descriptor, which may be further abstracted as a stream. The location on disk of the blocks in the file is calculated on each read or write call by the filesystem (kernel code). Reads and writes are system calls.
 
1 members found this post helpful.
Old 02-04-2020, 12:41 PM   #3
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
I just delved into this more and come up with this link on OSI.

http://luca.ntop.org/Teaching/Appunti/asn1.html

Maybe it will aide viewers of this thread that have the same interest as I do.
 
Old 02-04-2020, 02:35 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,263

Rep: Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339
I have absolutely no idea what that link has to do with, well, anything.

Application software such as Nautilus do not (typically) make system calls. Instead they call C library functions. If the application is written in C, then it would call those library functions directly. If it were written in a higher-level language, it would call a library that "wraps" or "binds", and calls the C library functions. The following, for example, is the exact same way that Nautilus probably gets a directory listing:

https://www.gnu.org/software/libc/ma...ry-Lister.html

At that level, yes, you're always dealing with filenames. Except when you're dealing with file descriptors (numbers which represent open files), which, really, are at the same level of abstraction.

The implementations of the C libraries, in turn, would make system calls.

That way, the application code is portable, and can be built and run on other platforms. That would not be the case if the applications were making system calls directly.

As for the layers involved in converting a file path to the data containing the contents of the file: the OS, which is at a level beneath the C libraries, looks up the filename's dentry, gets the inode from the dentry, and uses the inode to find the disk blocks. I recommend investing in a book on the Linux kernel and reading the chapters on the implementation of the filesystem, if you want a more detailed answer.

The blocks are the lowest level that software works at. Everything lower than that is implemented in hardware (in the disk controller).

And how would the OS communicate with the disk controller? Well, there's a link to the ATAPI interface spec here:

What kind of api does a sata hard drive expose?

Last edited by dugan; 02-05-2020 at 06:38 AM.
 
1 members found this post helpful.
Old 02-04-2020, 07:02 PM   #5
theKbStockpiler
Member
 
Registered: Sep 2009
Location: Central New York
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986

Original Poster
Rep: Reputation: 53
I thank you for the additional information.

Currently, I'm studying computers at a level that is not effected by massive abstractions, or at least that's my aim. I was reading up on FAT because it is simple and universal. This link http://csciwww.etsu.edu/barrettm/223...anagement.htmlmentioned
Quote:
The array index numbers correspond to the ASN of the disk sectors.
And the previously posted link is the best data I could find in a extensive search which is not that informative.

Last edited by theKbStockpiler; 02-04-2020 at 07:09 PM.
 
Old 02-04-2020, 07:53 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,263

Rep: Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339
I'm not sure what that quote means, but the "N" obviously stands for "Number", not "Notation".
 
2 members found this post helpful.
Old 02-04-2020, 07:53 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,263

Rep: Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339
I'm not sure what that quote means, but the "N" obviously stands for "Number", not "Notation".
 
2 members found this post helpful.
Old 02-05-2020, 06:48 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,263

Rep: Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339Reputation: 5339
Are you saying that you're interested in learning more about computer engineering?

I have never read this book, but it came up in a search:

https://mitpress.mit.edu/books/eleme...puting-systems
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
find largest file recursively with human readable format size. arun natarajan Linux - Newbie 3 01-31-2017 11:21 PM
How to convert a .bz2 file to a human-readable form in Windows 7 Professional Deedee393 Linux - Newbie 6 05-11-2012 07:57 AM
Identifying Text and Human Readable Data Files devUnix Linux - General 1 07-01-2011 03:57 AM
Ossec HIDS: alert timestamp is not human readable? h4k33m Linux - Security 1 05-25-2010 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration