Skip to main content

AI Agents: What They Are and How They Will Change Work

Artificial intelligence has moved beyond simply answering questions and generating text. A new generation of AI systems—known as AI agents—is emerging with the ability to plan tasks, use tools, make decisions, and complete multi-step workflows with less human intervention. From managing emails and analyzing data to writing software and assisting customers, AI agents could significantly change how people work. What Are AI Agents? An AI agent is a software system that can perceive information, reason about a goal, take actions, and adapt based on the results. Traditional AI tools usually respond to a specific instruction. For example, you might ask an AI chatbot to summarize a document, and it provides a summary. An AI agent can go further. You could give an agent a goal such as: "Research three competitors, compare their pricing, summarize their main features, and prepare a report." The agent may then: 1) Understand the objective. 2) Break the task into smaller steps. 3) Searc...

Allocation Methods

Allocation Methods
There are three main methods of storing files on disks: 
* contiguous, 
* linked, and 
* indexed.

Contiguous Allocation
* Contiguous Allocation requires that all blocks of a file be kept together continously.
* Performance is very fast, because reading following blocks of the same file generally requires no movement of the disk heads, or at most one small step to the next adjacent cylinder.
* Storage allocation involves the same issues discussed earlier for the allocation of contiguous blocks of memory ( first fit, best fit, fragmentation problems, etc. ) The distinction is that the high time fine required for moving the disk heads from spot to spot may now justify the benefits of keeping files continously when possible.
* ( Even file systems that do not by default store files contiguously can benefit from certain utilities that compact the disk and make all files contiguous in the process. )
* Problems can raise when files grow, or if the exact size of a file is unknown at creation time:
• Over-estimation of the file's final size increases external segmentation and wastes disk space.
• Under-estimation may need that a file be moved or a process aborted if the file 
grows beyond its originally allocated space.
• If a file grows slowly over a long time period and the total final space must be 
allocated initially, then a lot of space becomes not usable before the file fills the space.
* A variation is to allocate file space in large contiguous blocks, called extents. When a file outgrows its original extent, then an additional one is allocated. ( For example an extent may be the size of a complete track or even cylinder, aligned on an appropriate track or cylinder boundary) The high-performance files system Veritas uses extents to optimize performance.
Linked Allocation
* Disk files can be saved as linked lists, with the expense of the storage space consumed by each link. ( E.g. a block may be 508 bytes instead of 512. )
* Linked allocation involves no external fragmentation, does not require pre-known filesizes, and allows files to grow dynamically at any time.
* Unfortunately linked allocation is only efficient for continous access files, as random access requires starting at the beginning of the list for each new location access.
* Allocating clusters of blocks decreases the space wasted by pointers, at the cost of internal fragmentation.
* Another big problem with linked allocation is reliability if a pointer is lost or fault. Doubly linked lists provide some protection, at the cost of additional overhead and wasted space.
* The File Allocation Table, FAT, used by DOS is a difference of linked allocation, where all the links are stored in a separate table at the beginning of the disk. The benefit of this approach is that the FAT table can be cached in memory, greatly improving random access speeds.
Indexed Allocation
* Indexed Allocation groups all of the indexes for accessing each file into a common block ( for that file ), as opposed to spreading them all over the disk or storing them in a FAT table.
* Some disk space is wasted ( relative to linked lists or FAT tables ) because an entire index block must be allocated for each file, regardless of how many data blocks the file contains. This leads to questions of how big the index block should be, and how it should be implemented. There are several approaches:
• Linked Scheme - An index block is one disk block, which can be read and written in a single disk operation. The first index block contains some header information, the first N block addresses, and if necessary a pointer to additional linked index blocks.
• Multi-Level Index - The first index block contains a set of pointers to secondary 
index blocks, which in back contain pointers to the actual data blocks.
• Combined Scheme - This is the scheme used in UNIX inodes, in which the first 
12 or so data block pointers are store directly in the inode, and then singly, 
doubly, and triply indirect pointers provide access to more data blocks as needed. 
( See below. ) The advantage of this scheme is that for small files ( which many are ), the data blocks are readily accessible (up to 48K with 4K block sizes); files up to about 4144K ( using 4K blocks ) are accessible with only a single indirect 
block ( which can be cached ), and huge files are still accessible using a relatively 
small number of disk accesses ( larger in theory than can be addressed by a 32-bit 
address, which is why some systems have moved to 64-bit file pointers. )
Performance
* The optimal allocation method is different for sequential access files than for random access files, and is also different for small files than for large files.
* Some systems support more than one allocation method, which may require specifying how the file is to be used (sequential or random access ) at the time it is allocated. Such systems also provide conversion utilities.
* Some systems have been known to use contiguous access for small files, and 
automatically switch to an indexed scheme when file sizes surpass a certain threshold.
* And of course some systems adjust their allocation schemes ( e.g. block sizes ) to best match the characteristics of the hardware for optimum performance.

Popular posts from this blog

MEMORY MAPPED FILES

Memory-mapped files           Rather than retriving data files directly via the file system with every file access, data files can be paged into memory the same as process files, resulting in much faster retrieves ( except of course when page-faults occur. ) This is called as memory-mapping a file. Basic Mechanism * Basically a file is mapped to an address range within a process's virtual address space, and then paged in as required using the ordinary demand paging system. * Note that file matches are made to the memory page frames, and are not immediately written out to disk. ( This is the purpose of the "flush( )" system call, which may also be needed for stdout in some cases. See the time killer program for an example of this) * This is also why it is important to "close()" a file when one is done writing to it - So that the data can be safely flushed out to disk and so that the memory frames can be release for other purposes. * Some systems issue special sys...

Deadlock Characterisation

Deadlock Characterization Necessary Conditions: There are four conditions that are required to achieve deadlock: Mutual Exclusion  - At least one resource must be grip in a non-sharable mode; If any other process requests this resource, then that process must wait for the resource to be released. Hold and Wait  - A process must be concurrently gripping at least one resource and waiting for at least one resource that is presently being grip by some other process. No preemption  - Once a process is belonging a resource ( i.e. once its request has been allowed ), then that resource not be taken away from that process until the process freely releases it. Circular Wait -  A group of processes { P0, P1, P2, . . ., PN } must exist such that every P[ i ] is waiting for P[ ( i + 1 ) % ( N + 1 ) ]. ( Note that this situation implied the hold-and-wait condition, but it is easier to deal with the conditions if the four are considered individually. ) Resource-Allocation Graph In...

how to improve your English vocabulary easily

Improving your English vocabulary is an essential skill for anyone who wants to communicate effectively in English. Whether you are a student, a professional, or a casual learner, having a strong vocabulary can make a significant difference in your language proficiency. However, building a robust English vocabulary may seem daunting, especially if English is not your native language. In this blog post, we will explore some effective ways to improve your English vocabulary easily. Read regularly One of the most effective ways to build your English vocabulary is by reading regularly. Reading exposes you to new words and phrases, which can help expand your vocabulary. Start with simple books, newspapers, or magazines and gradually move to more complex materials. You can also read online articles, blogs, or websites on topics that interest you. Make it a habit to look up any unfamiliar words and learn their meanings. Use flashcards Flashcards are an excellent tool for learning and memoriz...