TCS Papers: Sample Questions 382 - 383 of 502

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 382

» Basic CS » Operating System

Essay Question▾

Describe in Detail

Describe the Buddy system of memory allocation


  • The buddy memory allocation technique is a memory allocation algorithm that devices memory into partitions to try to satisfy a memory request as suitably as possible.

  • This system makes use of splitting memory into halves to try to give a best-fit

  • Compared to the more complex memory allocation techniques that some modern operating systems use, buddy memory allocation is relatively easy to implement.

  • It supports limited but efficient splitting and coalescing of memory blocks.

  • Free memory is maintained in linked lists, each of equal sized blocks.

  • Any such block is of size .

  • When some memory is required by a process, the block size of next higher order is chosen, and broken into two.

  • Note that the two such pieces differ in address only in their bit. Such pieces are called buddies.

  • When any used block is freed, the OS checks to see if its buddy is also free.

  • If so, it is rejoined, and put into the original free-block linked-list.

Image of Buddy System

Image of Buddy System

Given the image is define the buddy system example

Question number: 383

» Basic CS » Networks

Essay Question▾

Describe in Detail

What are the important topologies for networks?


BUS Topology

  • Bus is central cable that connects all devices on a local-area network also called the backbone.

  • Often used to describe the main network connections composing the Internet.

  • Relatively inexpensive and easy to install for small networks.

  • Ethernet systems use a bus topology.

    • Main Advantage: Easy to connect a computer or device and typically requires less cable than star topology.

    • Main Disadvantage: Entire network shuts down if there is a break in the bus.

 Bus topology in image

Bus Topology in Image

Given the image is define the bus topology consists of a main run of cable with a terminator at each end.

STAR Topology

  • Devices are connected to a central computer, called a hub.

  • Nodes communicate by passing data through the hub.

    • Main Advantage: One malfunctioning node does not affect the rest of the network.

    • Main disadvantage: Central computer is a single point of failure- upon its failure the entire network becomes unusable.

Star topology in image

Star Topology in Image

Given the image is define the star topology is designed with each node connected directly to a central network hub

RING Topology

  • A local-area network (LAN) whose topology is a ring- all of the nodes are connected in a closed loop.

  • Messages travel around the ring, with each node reading messages addressed to it.

    Main Advantage: It can span larger distances than other networks, such as bus networks, because each node regenerates messages as they pass through it.

Image of ring topology

Image of Ring Topology

Image of ring topology