페이지

2022년 4월 28일 목요일

1.10.2 Mobile Computing

 Mobile computing refers to computing on handheld smartphones and tablet computers. These devices share the distinguishing physical features of being portable and lightweight. Historically, compared with desktop and laptop computers, mobile systems gave up screen size, memory capacity, and overall functionality in return for handheld mobile access to services such as e-mail and web browsing. Over the past few years, however, features on mobile devices have become so rich that the distinction in functionllity between, say, a comsumer laptop and tablet computer amy be difficult to discern, In fact we might argue that the features of a contemporary mobile device allow it toprovide functionality that is either unavailable or impractical on a desktop or laptop computer.

Today, mobile systems are used not only for e-mail and web browsing but also for playing music and video, reading digital books, taking photos, and recording and editing high-definition video. Accordingly, tremendous growth continues in the wide range of applications that run on such devices. Many developers are now designing applications that take advantage of the unique features of mobile devices, such as global prositioning system (GPS) chips, accelerometers, and gyroscopes. An embedded GPS chip allows a mobile device to use satelites to determine its precise on Earth. That functionality is especially useful in designing applications that provide navigation-for example, telling users which way to walk or drive or perhaps directing them to nearby services, such as restaurants. An accelerometer allows a mobile device to detect its orientation with respect to the ground and to detecct certain other forces, such as titling and shaking. In serveral computer games that employ accelerometers, players interface with the system not by using a mouse or a keyboard but rather by tilting and shaking. In serveral computer games that employ accelerometers, players interface with the system not by using a mouse or a keyboard but rather by tilting and shaking. In several computer games that employ accelerometers, players interface with  the system not by using a mouse or a keyboard but rather by titing, roating, and shaking the mobile device! Perhaps more a practial use of these features is found in augmented-reality applications, which overlay information on a display of the current environment. It it difficult to imagine how equivalent applications could be developed on traditional laptop or desktop computer systems.

To provide access to on-line services, mobile devices typically use either IEEE standard 802.11 wireless or cellular data networks. The memory capacity and processing speed of mobile devices, however, are more limited than those of PCs. Whereas a smarphone or tablet may have 256GB in storage, it isi not uncommon to find 8 TB in storage on a desktop computer, Similarly, because power consumption is such a concern, mobile devices often use processors that are smaller, are slower, and offer fewer processing core than processors found on traditional desktop and laptop computers.

Two operating systems currently dominate mobile computering: Apple iOS and Google Android. iOS was designed to run on Apple iPhone and iPad mobile devices, Android powers smartphones and tablet computers available from many manufacturers. We examine these two mobile operating system in further detail in Chapter 2.


2022년 4월 27일 수요일

1.10.1 Traditional Computing

 As computing has matured, the lines separating many of the traditional computing environments have blurred. Consider the "typical office environment." Just a few yuears ago, this environmnt consisted of PCs connected to a network, with servers profiding file and print services. Remote access was awkward, and porability was achieved by use of laptop computers.

Today, web technologies and increasing WAN bandwidth are stretching the boundaries of traditional c omputing. Companies establish portals, which provide web accessiblity to theiur internal servers. Network computers (or thin clients)-which are essentially terminals that understand web-based computing-are used in place of traditional workstationis where more security or easier maintenance is desired. Mobile computers can synchronize with PCs to allow very portable use of company information. Mobile devices can also connect to wireless networks and cellular data networks to use the company's web portal(as well as the myriad other web resources).

At home, most users once had a single computer with a slow modem connection to the office, the Internet, or both. Today, network-connection speeds once availabe only at great cost azre relatively inexpensive in many places, giving home users more access to more data. These fast data connections are allowing home computers to serve up we pages and to run networks that include printers, client PCs, and servers. Many homes use firewall to protect their networks from security breaches. Firewalls limit the communications between devices on a network.

In the latter half of the 20th century, computing resources were relatively scarce. (Before that, they were nonexistent!) For a period of time, systems were either batch or interactive. Batch systems processed jobs in bulk, with predetermined input from files or other data sources. Interactive systems waited for input from users. To optimize the use of the computing resources, multiple users shared time on these systems. These time-sharing systems used a timer and scheduling algorithms to cycle processes rapidly through the CPU, giving each user a share of the resources.

Traditional time-sharing systems are rare today. The same scheduling technique is still in use on desktop computers, laptaps, servers, and even mobile computers, but frequently all the processes are owned by the same user(or a single user and the operating system). User processes, and system processes that provide service to the user, are managed so that each frequently gets a slice of computer time. Consider the windows created while a user is working at the same time. Even a web broiwser can be composed of multiple processes, one for each website currently being visited, with time sharing applied to each web browser process.

1.10 Computing Environments

 So far, we have briefly described several aspects of computer systems and the operating system that manage them. We turn now to a discussion of how operating systems are used in a variety of computing environments.

2022년 4월 26일 화요일

1.9.4 Bitmaps

 A bitmap is a string of n binary disgits that can be used to represent the status of n items. For example, suppose we have several resources, and the avilability of each resource is indicated by the value of a binary digit:0 means that the resource is availlable, while 1 indicates that it is unavailable )or vice versa). The value of the i(th) position in the bitmap is associated with the i(th) reosurce. As an example,  consider the bitmap shown below:

001011101

Resource 2,4,5,6, and 8 unavailable; resource 0,1,3,and 7 are available.

The power of bitmaps becomes apparent when we consider their space efficiency. If we were to use an eight-bit Boolean value instead of a single bit, the resulting data structure would be eight times larger. Thus, bitmaps are commonly used when there is a need to represent the availability of a large number of resources. Disk direves provide a nice illustration. A medium-sized disk drive might be divided into several thousand individual units, called disk blocks. A bitmap can be used to indicate the availability of each disk block. 

In summary, data strures are prevasive in operating system implementations. Thus, we will see the structures discussed here, along with others, throughout this text as we explore kernel algorithms and their implementation.


1.9.3 Hash Functions and Maps

 A hash function takes data as its input, peforms a numeric operation on the data, and returns a n umberic value. This numeric value can then be used as an index into a table (typically an array) to quickly retrieve the data. Whereas searching for a data item through a list of size n can require up to O(n) compareisons, using a hash function for retrieving data from a table can be as good as O(1), depending on implementation details. Because of this performance, hash function are used extensively in operating systems.

On potential difficulty with hash functions is that two unique inputs can result in the same output value-that is, they can link to the same table location. We can accommodate this hash collision by hav ing a linked list at the table location that contains all of the items with the same hash value. Of course, the more collisions there are, the less efficient the hash functions is.

One use of hash function is to implement a hash map, which associates (or maps)[key:value] pairs using a hash function. Once the mapping is established, we can apply the ahsh function to the key to obtain the value from the hash map(Figure 1.2.1). For example, suppose that a use name is mapped to a password. Password authentication then processds as follows: a user enters which is then used to retrieve the password. The retrieved password is then compared with the password entered by the user for authentication.


2022년 4월 24일 일요일

1.9.2 Trees

 A tree is a data structure that can be used to represent data hierarchically. Data values in a tree structure are linked through parent-child relationships. In a general tree, a parent may have an umlimited number of children. In a binary tree, a parent may have at most two children, which we term the left child and the right child, A binary search tree additionally requires an ordering between the parent's two children in which left_child <= right_child. Figure 1.20 provides an example of a binary search tree. When we search for an item in a binary search tree, the worst0case performance is O(n)(consider how this can occur). To remedy this situations, we can use an algorithm to create a balanced binary search tree. Here, a tree containing n items has at most lg n levels, thus ensuring worst-case performance of O(lg n). We shall see in Section 5.7.1 that Linux uses a balanced binary search tree (known as a red-black tree) as part its CPU-scheduling algorithm.


2. Outline and Perspective

 What we've done so far

- In-depth look at convolution

- CNN architecture

- Use structure of images

- Training + Inference


What we'll do now

- Now that we know the basic pattern, what are some novel architectures that do not follow the basic pattern?(ResNet)

1) We'll also look at VGG and Inception


Transfer Learning

- We've seen that even 3-5 layer nets can take a very long time to train

1) But now we'll be looking at 50 layer nets!

- Researchers today (in machine learning) are committed to openness, and by  sharing their research it is easy for you to do the state-of-the-art at home

Random neural network => TRAINING(ImageNet)=> Neural network <<pre-trained>> on ImageNet =>FINE TUNNG(Your data)=>Trained neural network

1) No other field can archive this:biology, medicine, physics, ... Try building a particle accelerator in your bedroom!

- We can make use of pre-trained weights using transfer learning-significantly reduces training time since we now only need to do fine-tuning

1) Works for completely new/unseen problems, e.g. take inception trained on ImageNet and use it on totally new data


Systems of CNNs

- We tuched on this in Deep Learning pt 8: GANs & Variational Autoencoders

1) System of 2 CNNs -- not real people ->


Object Detection

- SSD

- Both faster and more accurate than previous state-of-the-art

- A prerequisite for any self-driving vehicle