04-11-2012
C/C++ are considered high/low level languages because you can write fairly high-level code, with complicated data structures and local variables and functions and various other things you'd find in "high"-level languages, and still have it translated into 100% pure uninterpreted assembly language. You can even write freestanding things like bootloaders and operating systems in C/C++ because you can exercise fine control over what external things are needed -- or, more to the point, aren't needed. You can forgo the standard libraries entirely and write code that depends on absolutely nothing.
This is very different from Java where everything has to be fed through an interpreter all the time. It's not the computer's native tongue, so to speak. You couldn't write a bootloader in it -- you'd need something else to load java first. It's not freestanding, not independent.
Your question unfortunately sounds a bit naive. Writing a disk defragmenter isn't trivial -- you need to understand a lot more than the language, you need to understand the structures of the filesystem in question. If you don't know enough about a filesystem to know which sectors to grab to find out what information, you can't write a defragmenter.
They're often written in C/C++, yes. They don't have to be, but because the structures for these filesystems are C/C++ anyway, it may be easiest to use them rather than reinvent the wheel.
If you want to build a defragmenter for educational reasons, I'd suggest working on the MS-DOS FAT16 filesystem which has very simple organization, then working up from there.
Last edited by Corona688; 04-11-2012 at 02:42 PM..
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to do a low level format like in windows (C:\format c:) but I don't know how it works in unix or linux.. Can somebody help me ? thnx :) (3 Replies)
Discussion started by: day
3 Replies
2. What is on Your Mind?
Post what languages (including scripting) you know, why and where you think that language is most usable. Also include libraries in which you're really good at (libusb, gtk, qt, etc).
assembly?
C or C++?
perl or python?
pascal?
bash or csh/tcsh?
opengl?
gtk or qt?
mono? (27 Replies)
Discussion started by: redoubtable
27 Replies
3. Programming
Hi,
I am trying to write zeroes to the hdd using a c program. I don't want to use the dd or ddrescue or any such inbuilt program because of reasons like real time progress, writing custom patterns. (my program is more like an erasure application, but does only zero fill).
here are the steps... (35 Replies)
Discussion started by: sponnusa
35 Replies
4. IP Networking
Hi,
What is the best reference that gives in detail on nic cards configuration , assigning multiple ip addresses to a single interface, netlink library etc and all basic stuff at this level..?
Thanks (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies
5. AIX
Hello All
I have a system running AIX 61 shared uncapped partition (with 11 physical processors, 24 Virtual 72GB of Memory) .
The output from NMON, vmstat show a high run queue (60+) for continous periods of time intervals, but NO paging, relatively low I/o (6000) , CPU % is 40, Low network.... (9 Replies)
Discussion started by: IL-Malti
9 Replies
6. Programming
Hi friends,
I hope everyone is fine and doing well. I queried in my previous thread about the low-level qualities of C/C++ languages.I really thank you people for explaining, it was really helpful. One more ambiquity that I have in my mind is regarding the unix system calls like open, creat,... (1 Reply)
Discussion started by: gabam
1 Replies
7. Programming
How to use X11 without Xlib not XCB? How draw window directly on low level?
I must use anyway window manager like Motif?
I have ridden that X11 has server-client architecture, client send via TCP/IP to port 6000 request for primitives and get replies.
Where is detailed description of it? In X11... (0 Replies)
Discussion started by: AndrzejB
0 Replies
LEARN ABOUT HPUX
xtappsetera
XtAppSetErrorHandler() XtAppSetErrorHandler()
Name
XtAppSetErrorHandler - set the low-level error handler procedure.
Synopsis
XtErrorHandler XtAppSetErrorHandler(app_context, handler)
XtAppContext app_context;
XtErrorHandler handler;
Inputs
app_context
Specifies the application context.
handler Specifies the new fatal error procedure, which should not return.
Returns
A pointer to the previously installed low-level error handler.
Description
XtAppSetErrorHandler() registers the procedure handler in app_context as the procedure to be invoked by XtAppError(). It returns a pointer
to the previously installed low-level fatal error handler. handler must terminate the application; if it returns the subsequent behavior
of the Intrinsics is undefined.
The default low-level error handler provided by the Intrinsics is _XtDefaultError(). On POSIX-based systems, it prints the message to
standard error and terminates the application.
Usage
Note that application-context-specific error handling is not implemented on many systems. Most implementations will have just one set of
error handlers. If they are set for different application contexts, the one performed last will prevail.
See Also
XtAppError(1), XtAppErrorMsg(1), XtAppSetErrorMsgHandler(1), XtAppSetWarningHandler(1), XtAppSetWarningMsgHandler(1), XtAppWarning(1),
XtAppWarningMsg(1),
XtErrorHandler(2).
Xt - Error Handling XtAppSetErrorHandler()