Shared Flashcard Set

Details

OSNI 1
Lboro OSNI
55
Computer Science
Undergraduate 2
01/17/2017

Additional Computer Science Flashcards

 


 

Cards

Term
Roles of the operating systems in a multi-user environment
Definition

- Operating system should allow several user programs to use the system concurrently and run sets of programs independently

- Role of the operating system is as a resource allocator and a control program

Term
Operating system Resource Allocator
Definition
Sharing the limited system resources such as memory and peripherals
Term
Operating system Control Program
Definition
Protecting the system resources, possibly with the help of hardware such as the memory mapper
Term

How does the OS control access to the following?

- Processor

 

Definition

Processor

- This can only be used by one program at a time

- Must be allocated fairly otherwise a program could selfishly use all the processor or enter an infinite loop

- System timer is a piece of hardware that periodically causes a hardware interrupt

- This allows the OS to take back control from a potentially erronous program

Term

How does the OS control access to the following?

-Main memory

Definition

- Must be protected since different processes have their private date in different portions of the memory

- If malicious or buggy programs were able to access another program's data then this would cause chaos

-Memory mapper is a piece of hardware that checks if every access to memory is allowed

Term

How does the OS control access to the following?

-Peripheral Device

Definition

- OS should control access to peripheral devices

- For example, only certain users/groups should be able to read/write to files

- Ensures that user programs run in user mode means that programs cannot access peripherals directly

- Must make a system call for the OS to access them on their behalf

- Multi mode CPUs are the hardware allowing user state/special state

Term

Three objectives of an operating system

 

Definition

- Convenience

- Efficiency

- Ability to evolve

Term
Why are interrupts so vital to the operating system in a multi-user environment?
Definition

- Interrupts are used by hardware and software in order to signal to the (OS) that an event has occurred which it

needs to deal with.

- Interrupts are a way to start the OS running

on the CPU so that it can take appropriate action.
Term
Explain when
software programs typically use interrupts?
Definition
Interrupts are typically used by user programs to specify a system call. This
is a way for the user

program to ask the operating system to do a (prohibited) operation on its behalf.

- Interrupts can also

come from user programs if they do an illegal instruction (for example attempt to divide by zero).
Term
Hardware Interrupt
Definition

These are the interrupts that are generated by the

hardware of devices when they complete a task or need to signal something to the OS. They are not directly associated with the running of the program and therefore they are asynchronous to the running
program.
Term
Software Interrupts
Definition
Software
interrupts
occur as a result of the execution of the current program instruction and are
caused by, for example, an attempt to execute an illegal instruction or
in order to generate a system
call
. These are sometimes called traps
and they are synchronous
(since they are generated by a
CPU instruction)
.
Term

Three examples of system calls

 

Definition

- A disk read (from the hard disk

- sending some data across a network

- creating or deleting a file on disk,

Term
What is a system call?
Definition

- System call is the way in which user programs can request the OS to do an operation on its behalf

- Info about the system call is placed in the memory and an interrupt is generated to 'wake' the OS

 

Term
Why a system call?
Definition

- These operations are prohibited and can only be done by the OS which runs in a special state

- System calls are needed to ensure that potentially 'dangerous' operations can only be done by the OS which can make necessary checks

Term
Advantage and Disadvantages of Segmentation
Definition

- Segmentation offers good protection and sharing. This is because it divides a program up logically and therefore knows the type of data in each segment.

 

- The major disadvantage of segmentation is that is still allows fragmentation of main memory since each segment must occupy a contiguous area of memory. Therefore Segmentation is wasteful of space due to fragmentation.

Term
Advantage and Disadvantages of Paging?
Definition
Paging makes good use of main memory and is space efficient because each page is the same size and main memory is split up into equally sized real pages (called frames).
It does not offer good sharing and protection however since we do not split the program up in a logical way.
Both segmentation and paging also have the advantage that not all of the program has to be loaded up into main memory in order to run (e.g. error code could be left on the hard disk for example, and only loaded up into main memory IF it
were required).
Term
main difference between the device driver (or device handler) for a shareable and a non-shareable device.
Definition

- a non-shareable device (such as a printer) does not have a queue and stores requests up in a spool file on the hard disk, rather than in the device driver.

 

It does this because requests cannot be interleaved for a non-shareable device (we can’t print a page on Program A’s job and then a Page of Program B’s job then back to A etc.) so we process a single job at a time.

 

Non-shareable jobs may be quite large (e.g. a 20MB file to be printed). Rather than store that in the queue of a device driver we store the request in a spool file as it is too big for the main menu

Term
What information is normally contained within a directory entry for a given file?
Definition

- name of the file

- identification of the file's owner

- the size of the file

- dates and times

- protection details

- retrieval information

Term
Explain how using asynchronous writes to a hard disk can give the illusion of decreasing the time required to write data to the hard disk and improve efficiency?
Definition
When a user program requests that data be written to the hard disk (HD), an asynchronous write will mean the operating system (OS) stores the data to be written in the cache and to tell the calling program that it has been completed.
This gives the illusion that
the write was very fast since moving dat
a in RAM in much faster than accessing the hard disk.
The OS will then actually write the data to the HD at a later point. It may choose to wait and do
the transfer when the HD is not currently busy, and therefore improve the efficiency of the
system.
Term
What is a process control block?
Definition

A Process Control Block

(PCB)
stores information about a particular process in the
system.
Each process is represented in the OS by a
Process Control Block
(PCB), also called
task control block.
Term
Three pieces of information kept on the Process Control Block?
Definition

- Process state

- CPU registers

- Memory Management information

 

Term
What is the difference between a process and program?
Definition

- A program is just code (stable) stored on the hard disk and loaded into main menu for execution

 

- A progress is a program in execution and is therefore dynamic. It contains program code, register, program counter and data for example. The data and registers change over time.

Term
Explain what is a 'context switch'?
Definition

A context switch is what happens when we change from one running process to

another

Term
What operations must be carried out for a context switch?
Definition
All the information about the currently running process (Process A) is saved
into its Process Control Block (PCB). Once this is done, all the required information is read from the PCB of Process B (e.g. the value of the program counter, memory management info etc.) once the context has been restored for Process B, it can continue to run where it left off.
The time that is taken during the context switch is wasted or lost time since the
system is not performing useful work on the CPU at that time.
Term
What is meant by the term 'semaphore' in OS
Definition
A semaphore is a flag that can be used to lock a particular shared resource.
Term
Two operations that are defined on semaphores
Definition

P-Operation:- to see if the resource is free and lock it if not

V-Operation:- to unlock the resource so that others can use it

Term
Describe P-Operation
Definition
When one process tries to access a shared resource, it tests the semaphore (also called a lock). If the semaphore is unlocked, the process locks it and proceeds to access the shared data. If the semaphore is already locked, the process will `sleep’ and wait for another process to finish with the resource.
Term
Describe V-Operation
Definition

When a process has finished accessing some shared data, it performs a V-operation

(or

free operation), which unlocks the semaphore, allowing other processes to access the resource.

This will wake up any process which has indicated to the OS that it is waiting for the semaphore to be free

 

Term
Define Unicast
Definition

communication between a single sender and a single receiver over a network one-to-one

 

Term
Define Broadcast
Definition

a sender transmits a message which is received by all nodes

one-to-all

Term

Define

Multicast

 

Definition

communication between a single sender and multiple receivers one-to-some

 

Term

Define Unicast

 

Definition
Communication from one sender to one receiver. One to one
Term
Define Multicast
Definition
Communication from one sender to multiple receivers. One to many
Term
Define Broadcast
Definition
A message from one sender to all nodes on the network
Term
Acronym for OSI
Definition

A

P

S

T

N

D

P

Term
Acronym for TCP/IP
Definition

A

-

-

T

I

H

Term
Internet protocol
Definition

A

T

N

L

P

Term
Two types of transport services.
Definition

Contactless

- no handshaking

- no reliable sending

- no flow control

Contact

- handshaking

- reliable sending all at once

- congestion control

Term
Network Architecture
Definition
This refers to the organisation of the communication process into layers (5-layer architecture)
Term
Application Architecture
Definition
This is designed by the application developer and dictates the broad structure of the application
Term
What kind of information is needed to send a message to another host
Definition

- name and address of the of the host

- the identifier that specifies the receiving process in the destination host 

Term
What is a well-known port and give an example?
Definition
A well-known port is a port which is known to be used primarily by a single application. E.G. HTML 80
Term
Application in the 5 layer
Definition
Defines the protocols that directly support the applications.  A user agent is the software that connects the user, via suitable HCI, to the application-layer protocol.
Term

Transport 5 layer

Definition
Supports application-layer protocols by providing end-to-end communication between processes on different hosts.
Term

Network 5 layer

Definition
Supports transport-layer protocols by providing end-to-end communication between hosts across the internet
Term

Link 5 layer

Definition
Supports network-layer protocols by providing communication between neighborouring devices, such as the host and router or router and router.
Term

Physical 5 layer

Definition
Defines the format of bits as electrical signals on the cable or fibre, allowing for link-layer frames to be exchanged.
Term

Define the property

1) Secrecy
        2) Authentication
        3) Non-repudiation
        4) Integrity

Definition

n  Secrecy — only intended receiver can read the message

 

n  Authentication — the identity of the sender is assured

n  Non-repudiation — the identity of the sender cannot be denied

n  Integrity — the message has not been altered in transit

 

 

Term
Important difference between a symmetric key system and a public key system?
Definition

n  Symmetric key systems

n  both the sender and receiver must know the same (secret) key

n  Public key systems

n  Employ two keys

n  The public key is known by the entire world (including the sender)

n  but the private key is known only by the receiver

 

Term
What is compaction used for under the base-limit memory management?
Definition

-

Compaction is used to move all free contiguous
space to the end of the main

memory into a single `memory hole’.

- There may be not enough continguous space but enough suffience space. This is called external fragmentation

Term
difference between a device controller and a device driver
Definition

A device controller is a piece of hardware (electronics), which looks after the actual running of a device.

 

A device driver is a piece of software (part of the OS), which ‘looks after’ a single individual device in the system (e.g. the hard disk). It

allows
messages and commands to be sent to the device.
Term
Explain the meaning of network protocol
Definition
A protocol specifies the format and order of messages exchanged between two
parties.
For example
, HTTP, FTP.
Term
Explain network topology
Definition
The topology is the shape/
structure of a network.
Some examples of topologies
are: ring
Term
structure of a network can be described in terms of ‘network edge’ and ‘network core’.
Definition
Edge refers to hosts.#
The term core refers to links and routers.
Term
Explain two types of queries: recursive and iterative
Definition
When a recursive query is sent, the receiving DNS server will take responsibility resolving a request fully before replying with either the corresponding Resource Record, or an error message.
 
When an iterative query is sent, the receiving DNS server will either respond
with the corresponding Resource Record (if known), or the address of the next
server to contact.
Supporting users have an ad free experience!