DevOps

Thursday, 30 September 2010

General UNIX interview questions

  1. What are the main differences between Apache 1.x and 2.x?
  2. What does the “route” command do?
  3. What are the read/write/execute bits on a directory mean?
  4. What does iostat do?
  5. what does vmstat do?
  6. What does netstat do?
  7. What is the most graceful way to bring a system into single user mode?
  8. How do you determine disk usage?
  9. What is AWK?
  10. What is SED?
  11. What is the difference between binaries in /bin, and /usr/bin?
  12. What is a dynamically linked file?
  13. What is a statically linked file?
Networking and Unix Interview Questions & Answers

What is UTP?

UTP — Unshielded twisted pair 10BASE-T is the preferred Ethernet medium of the 90s. It is based on a star topology and provides a number of advantages over coaxial media:

It uses inexpensive, readily available copper phone wire. UTP wire is much easier to install and debug than coax. UTP uses RG-45 connectors, which are cheap and reliable.

What is a router? What is a gateway?

Routers are machines that direct a packet through the maze of networks that stand between its source and destination. Normally a router is used for internal networks while a gateway acts a door for the packet to reach the ‘outside’ of the internal network

What is Semaphore? What is deadlock?

Semaphore is a synchronization tool to solve critical-section problem, can be used to control access to the critical section for a process or thread. The main disadvantage (same of mutual-exclusion) is require busy waiting. It will create problems in a multiprogramming system, where a single CPU is shared among many processes.

Busy waiting wastes CPU cycles.

Deadlock is a situation when two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. The implementation of a semaphore with a waiting queue may result in this situation.

What is Virtual Memory?

Virtual memory is a technique that allows the execution of processes that may not be completely in memory. A separation of user logical memory from physical memory allows an extremely large virtual memory to be provided for programmers when only a smaller physical memory is available. It is commonly implemented by demand paging. A demand paging system is similar to a paging system with swapping. Processes reside on secondary memory (which is usually a disk). When we want to execute a process, we swap it into memory.

Explain the layered aspect of a UNIX system. What are the layers? What does it mean to say they are layers?

A UNIX system has essentially three main layers:

. The hardware

. The operating system kernel

. The user-level programs

The kernel hides the system’s hardware underneath an abstract, high-level programming interface. It is responsible for implementing many of the facilities that users and user-level programs take for granted.

The kernel assembles all of the following UNIX concepts from lower-level hardware features:

. Processes (time-sharing, protected address space)

. Signals and semaphores

. Virtual Memory (swapping, paging, and mapping)

. The filesystem (files, directories, namespace)

. Pipes and network connections (inter-process communication)

No comments:

Post a Comment