Month: October 2016

Shell Script and Process Scheduling Algorithms

SHELL Interface between user application or user and kernel (operating system) The shell reads a command line from its standard input and interprets it according to a fixed set of rules. The standard input and standard output file descriptors for the login shell are usually the terminal on which the user logged in If the shell recognizes the input string as a built-in command (for example, commands cd, for, while and others), it executes the command internally without creating new processes https://play.google.com/store/apps/details?id=com.pratikkataria.positivityhub Types of Shell Bourne shell (sh) C shell (csh) Korn shell (ksh) Functions of shell: Acts as command ... Read more

Process and Process Management

What is a Process? A program in execution An instance of a program running on a computer The entity that can be assigned to and executed on a processor A unit of activity characterized by the execution of a sequence of instructions, a current state, and an associated set of system instructions The system consists of a set of processes: user processes (performed by user code) and OS processes (running system code). Program is passive entity stored on disk, process is active -Program becomes process when executable file loaded into memory Process Elements A process is comprised of: -Program code ... Read more

Unix and Android Memory Management

SVR4 and Solaris use two separate schemes: paging system kernel memory allocator Paging system provides a virtual memory capability that allocates page frames in main memory to processes allocates page frames to disk block buffers Kernel Memory Allocator allocates memory for the kernel UNIX SVR4 Memory Management Formats Page Replacement The page frame data table is used for page replacement Pointers are used to create lists within the table all available frames are linked together in a list of free frames available for bringing in pages when the number of available frames drops below a certain threshold, the kernel will ... Read more

Virtual Memory

VIRTUAL MEMORY Virtual Memory is a technique that allows the execution of processes that may not be completely in memory Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution Logical address space can therefore be much larger than physical address space Allows address spaces to be shared by several processes Virtual memory can be implemented via: Demand paging Demand Segmentation Virtual Memory that is larger than Physical Memory Advantages of execution of program loaded partially in Memory A program is no longer be constrained by amount ... Read more

Swapping and Approaches for Memory Allocation

SWAPPING A process must be loaded into memory in order to execute What If there is not enough memory available?? APPROACHES FOR MEMORY ALLOCATION Contiguous Memory Allocation Paging Segmentation Loading Program into Main Memory (Contiguous Memory Location) It is assumed that OS occupies some fixed portion of memory and rest is available to user processes. Based on requirement and functionality different memory management methods are adopted. –Should the process be allocated memory in contiguous manner? FIXED PARTITIONING Main memory is divided into number of fixed size partition at system generation time. A processes can be loaded into a partition of ... Read more

Memory and Memory Management

Memory is a large array of words or bytes. CPU can only access content from main memory and registers (built into processor) Data / instruction can not be read from secondary storage by processor . It needs to be moved from secondary storage to main memory. Memory Management Tasks managing Primary Memory moving processes back and forth between main memory and disk during execution keeping track of allocated and free memory decides which process will get memory at what time Is the task carried out by the OS and hardware to accommodate multiple processes in main memory If only a ... Read more

Advance Tools and Technologies

NEED OF MAKE TOOLS Problems: Long files are harder to manage (for both programmers and machines) Every change requires long compilation Many programmers can not modify the same file simultaneously Solution: divide project to multiple files Good division to components Minimum compilation when something is changed Easy maintenance of project structure, dependencies and creation make Make: productivity enhancement utility and a program management tool Useful for managing the development of large-sized programs (very large number of functions and many developers) For big projects- common definitions hold across all the functions under development This is true regardless of number of persons ... Read more

Inter Process Communication

IPC Independent processes & co-operating processes Communicating two processes related or unrelated. Purposes for IPC Information Sharing Data Transfer Synchronization Event Notification IPC mechanism: Signal Message Passing Pipes Sockets Shared memory SYSTEM V IPC Messages: allow processes to send formatted data streams to arbitrary process Shared memory: allows processes to share parts of virtual address space Semaphores: allows processes to synchronize execution COMMON PROPERTIES Each Mechanism contains: A table whose entries describes all instances of mechanism A get system call to create a new entry or to retrieve existing entry Includes a key and flags Set IPC_CREAT bit in flag: ... Read more

Internet Traces

Accessing the Internet leaves a wide variety of information on a computer including Web sites, contents viewed, and newsgroups accessed. For instance, some Windows systems maintain a record of accounts that are used to connect to the Internet. Additionally, some Windows systems maintain a log of when the modem was used (e.g., ModemLog.txt) and some Internet dial-up services maintain a detailed log of connections such as the AT&T/IBM Global Network Dialer “Connection Log.txt” and “Message Log.txt” WEB BROWSING When an individual first views a Web page, the browser caches the page and associated elements such as images on disk—the creation ... Read more

Registry

Windows systems use the Registry to store system configuration and usage details in what are called “keys.” Registry files on Windows 95 and 98 systems are located in the Windows installation folder and are named “system.dat” and “user.dat.” The Registry on Windows NT/2000/XP is comprised of several hive files located in “%systemroot%\system32\config” and a hive file named “ntuser.dat” for each user account.