1) What is the difference between Swapping and Paging? Swapping
Swapping:
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory.
It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in themain memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly
2) What is a FIFO in UNIX OS?
FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end of the pipe (producer) and the other reads from the other end (consumer)
3) What exactly is UNIX?
UNIX is written in C and it is portable. It runs on a range of computers from microprocessors to the largest mainframes. The source code is available and written in high level language which makes it easy to adapt for a particular requirement
4) I need to write a command using redirection characters to output the number of unique users working on your system.
who > file1
Who command lists all the users currently working & output can be stored in a file named file1.
5) What is the difference between soft link and hard link in Unix operating system ?
Hard Links :
1. All Links have same inode number.
2.ls -l command shows all the links with the link column(Second) shows No. of links.
3. Links have actual file contents
4.Removing any link ,just reduces the link count , but doesn't affect other links.
Soft Links(Symbolic Links) :
1.Links have different inode numbers.
2. ls -l command shows all links with second column value 1 and the link points to original file.
3. Link has the path for original file and not the contents.
4.Removing soft link doesn't affect anything but removing original file ,the link becomes "dangling" link which points to nonexistant file.
6) Define and explain COM?
Component Object Model, or COM, is a Microsoft platform for software componentry. It is used to enable cross-application communication and dynamic object creation in any programming language that supports the technology. COM is often used in the software development world as an umbrella term that encompasses the OLE, ActiveX, COM+ and DCOM technologies. COM has been around since 1993, however Microsoft only really started emphasizing the name around 1997.
7) What is Page-Stealer process?
This is the Kernel process that makes rooms for the incoming pages, by swapping the memory pages that are not the part of the working set of a process. Page-Stealer is created by the Kernel at the system initialization and invokes it throughout the lifetime of the system. Kernel locks a region when a process faults on a page in the region, so that page stealer cannot steal the page, which is being faulted in.
8) Explain Scheduling.Explain Scheduling.
The way by which the processes are alloated to CPU to use the CPU time is called scheduling.
there are different types of schedulings algorithms
1.FCFS(first come first serve)
2.SJF(shortest job first)
3. SHORTEST JOB NEXT
4.ROUND ROBIN
5. MULTILEVEL FEEDBACK SCHEDULING
9) What are the different process states?
new
ready
running
waiting
terminate
10) Explain the UNIX Kernel.
UNIX Kernel is heart of the operating system. UNIX kernal is loaded first when UNIX system is booted. It handles allocation of devices, cpu, memory from that ponint on
11) What is Semaphore?
A semaphore is a type of Interprocess communication resource used for synchronization and mutual exclusion between any two asynchronous processes.
12) Explain Memory Partitioning, Paging, Segmentation.
PAGING: Paging memory allocation algorithms divide computer memory into small partitions, and allocates memory using a page as the smallest building block.
SEGMENTAION: Segmentation means that a part or parts of the memory will be sealed off from the currently running process, through the use of hardware registers. If the data that is about to be read or written to is outside the permitted address space of that process, asegmentation fault will result.
13) What is ?the principle of locality??
It?s the nature of the processes that they refer only to the small subset of the total data space of the process. i.e. the process frequently calls the same subroutines or executes the loop instructions.
14) Discuss the mount and unmount system calls
The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument tomount call is the mount point, that is , a directory in the current file naming system. The second argument is the file system to mount to that point. When you insert a cdrom to your unix system's drive, the file system in the cdrom automatically mounts to /dev/cdrom in your system.
15) What does the following command do? cp $ABC/$SUP/xyz.tct .;
This command will copy the file abc.txt (picked up from the location $ABC/$SUP/) to the current directory u are working on. The file created on the currect directory will also be of the same name abc.txt
16) Brief about the initial process sequence while the UNIX system boots up
While booting, special process called the 'swapper' or 'scheduler' is created with Process-ID 0. The swapper manages memory allocation for processes and influences CPU allocation. The swapper inturn creates 3 children:
the process dispatcher,
vhand and
dbflush
with IDs 1,2 and 3 respectively.
This is done by executing the file /etc/init. Process dispatcher gives birth to the shell. Unix keeps track of all the processes in an internal data structure called the Process Table (listing command is ps -el).
17) What are data structures that are used for Demand Paging?
Kernel contains 4 data structures for Demand paging. They are,
Page table entries,
Disk block descriptors,
Page frame data table (pfdata),
Swap-use tabl
18)
No comments:
Post a Comment